@titaui/pc 1.15.41 → 1.15.43-beta.1
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/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-qq-docs/index.js +9 -11
- package/lib/components/dialog-qq-docs/utils.js +2 -6
- package/lib/components/dialog-select/index.js +1 -1
- package/lib/components/dialog-upload/index.js +2 -4
- 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.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/dynamic-item/components/progress/components/okr-progress/index.js +2 -4
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +10 -12
- 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 +1 -1
- 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/components/firework/index.js +2 -6
- package/lib/components/form/form-fields/date/index.js +1 -1
- 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.js +1 -1
- 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/index.js +1 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.js +22 -3
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +1 -5
- package/lib/components/menus/components/menu-tree/tree-node/summary-follower/index.css +47 -0
- package/lib/components/menus/components/menu-tree/tree-node/summary-follower/index.js +77 -0
- package/lib/components/menus/components/menu-tree/tree-node/summary-user-concern.js +95 -0
- package/lib/components/menus/context.js +6 -2
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +1 -1
- package/lib/components/menus/export-modules/summary-menus/menus.js +122 -0
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +49 -3
- package/lib/components/menus/request-apis.js +38 -2
- package/lib/components/nav-top/components/app-center/index.js +8 -0
- 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/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/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 +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/praise-record/PraiseRecordItem.js +2 -2
- package/lib/components/praise-record/index.js +2 -2
- package/lib/components/quick-entrance/index.js +9 -0
- 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 +1 -1
- 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 +4 -6
- package/lib/components/upload/index2.js +2 -4
- 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 +2 -2
- package/lib/utils/helpers.js +2 -6
- package/lib/utils/open-data.js +20 -71
- package/lib/utils/request-v1.js +2 -6
- package/lib/utils/request.js +2 -6
- package/package.json +1 -1
|
@@ -43,7 +43,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
43
43
|
|
|
44
44
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
45
45
|
|
|
46
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
46
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
47
47
|
|
|
48
48
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
53
53
|
|
|
54
54
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
55
55
|
|
|
56
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf
|
|
56
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
57
57
|
|
|
58
58
|
var prefix = 'titaui-mblog';
|
|
59
59
|
|
|
@@ -23,7 +23,7 @@ var _excluded = ["data", "onSelect", "loadData", "selectedKeys", "onExpand"];
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
26
|
-
function _extends() { _extends = Object.assign
|
|
26
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
27
|
|
|
28
28
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
29
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.USER_NODE = exports.USER_CONCERN_NODE = exports.TONGJI_NODE = exports.SUB_MENU_ITEM_NOE = exports.SUBORDINATES_NODE = exports.SHARE_NODE = exports.SAME_LEVEL_USER_NODE = exports.PARENT_MENU_NODE = exports.NO_SUBORDINATES_NODE = exports.NO_FOLLOWER_NODE = exports.MENU_ITEM_NOE = exports.MENU_ASSESS_TEMPLATE = exports.MENU_ASSESS_MANAGE = exports.LOADING_NODE = exports.GROUP_NAME_NODE = exports.FOLLOWER_NODE = exports.DEPART_NODE = exports.COMPANY_NODE = exports.COMPANY_ALL_NODE = void 0;
|
|
6
|
+
exports.USER_NODE = exports.USER_CONCERN_NODE = exports.TONGJI_NODE = exports.SUMMARY_USER_CONCERN_NODE = exports.SUMMARY_FOLLOWER_NODE = exports.SUB_MENU_ITEM_NOE = exports.SUBORDINATES_NODE = exports.SHARE_NODE = exports.SAME_LEVEL_USER_NODE = exports.PARENT_MENU_NODE = exports.NO_SUBORDINATES_NODE = exports.NO_FOLLOWER_NODE = exports.MENU_ITEM_NOE = exports.MENU_ASSESS_TEMPLATE = exports.MENU_ASSESS_MANAGE = exports.LOADING_NODE = exports.GROUP_NAME_NODE = exports.FOLLOWER_NODE = exports.DEPART_NODE = exports.COMPANY_NODE = exports.COMPANY_ALL_NODE = void 0;
|
|
7
7
|
exports["default"] = _default;
|
|
8
8
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -18,6 +18,8 @@ var _groupName = _interopRequireDefault(require("./group-name"));
|
|
|
18
18
|
|
|
19
19
|
var _userConcern = _interopRequireDefault(require("./user-concern"));
|
|
20
20
|
|
|
21
|
+
var _summaryUserConcern = _interopRequireDefault(require("./summary-user-concern"));
|
|
22
|
+
|
|
21
23
|
var _subordinates = _interopRequireDefault(require("./subordinates"));
|
|
22
24
|
|
|
23
25
|
var _summaryShare = _interopRequireDefault(require("./summary-share"));
|
|
@@ -38,6 +40,8 @@ var _noFollower = _interopRequireDefault(require("./no-follower"));
|
|
|
38
40
|
|
|
39
41
|
var _follower = _interopRequireDefault(require("./follower"));
|
|
40
42
|
|
|
43
|
+
var _summaryFollower = _interopRequireDefault(require("./summary-follower"));
|
|
44
|
+
|
|
41
45
|
var _loading = _interopRequireDefault(require("./loading"));
|
|
42
46
|
|
|
43
47
|
var _noSubordinates = _interopRequireDefault(require("./no-subordinates"));
|
|
@@ -50,7 +54,7 @@ require("./index.css");
|
|
|
50
54
|
|
|
51
55
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
52
56
|
|
|
53
|
-
function _extends() { _extends = Object.assign
|
|
57
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
54
58
|
|
|
55
59
|
function _default(node, level, _ref) {
|
|
56
60
|
var onExpand = _ref.onExpand;
|
|
@@ -64,6 +68,11 @@ function _default(node, level, _ref) {
|
|
|
64
68
|
level: level
|
|
65
69
|
}));
|
|
66
70
|
|
|
71
|
+
case SUMMARY_FOLLOWER_NODE:
|
|
72
|
+
return /*#__PURE__*/_react["default"].createElement(_summaryFollower["default"], _extends({}, node, {
|
|
73
|
+
level: level
|
|
74
|
+
}));
|
|
75
|
+
|
|
67
76
|
case NO_SUBORDINATES_NODE:
|
|
68
77
|
return /*#__PURE__*/_react["default"].createElement(_noSubordinates["default"], null);
|
|
69
78
|
|
|
@@ -151,6 +160,12 @@ function _default(node, level, _ref) {
|
|
|
151
160
|
onExpand: onExpand
|
|
152
161
|
}));
|
|
153
162
|
|
|
163
|
+
case SUMMARY_USER_CONCERN_NODE:
|
|
164
|
+
return /*#__PURE__*/_react["default"].createElement(_summaryUserConcern["default"], _extends({}, node, {
|
|
165
|
+
level: level,
|
|
166
|
+
onExpand: onExpand
|
|
167
|
+
}));
|
|
168
|
+
|
|
154
169
|
default:
|
|
155
170
|
}
|
|
156
171
|
}
|
|
@@ -192,4 +207,8 @@ exports.SHARE_NODE = SHARE_NODE;
|
|
|
192
207
|
var TONGJI_NODE = 'tongji';
|
|
193
208
|
exports.TONGJI_NODE = TONGJI_NODE;
|
|
194
209
|
var SAME_LEVEL_USER_NODE = 'same-level-user';
|
|
195
|
-
exports.SAME_LEVEL_USER_NODE = SAME_LEVEL_USER_NODE;
|
|
210
|
+
exports.SAME_LEVEL_USER_NODE = SAME_LEVEL_USER_NODE;
|
|
211
|
+
var SUMMARY_USER_CONCERN_NODE = 'summary-user-concern';
|
|
212
|
+
exports.SUMMARY_USER_CONCERN_NODE = SUMMARY_USER_CONCERN_NODE;
|
|
213
|
+
var SUMMARY_FOLLOWER_NODE = 'summary-follower';
|
|
214
|
+
exports.SUMMARY_FOLLOWER_NODE = SUMMARY_FOLLOWER_NODE;
|
|
@@ -49,10 +49,7 @@ var Subordinates = function Subordinates(props) {
|
|
|
49
49
|
if (data.href) {
|
|
50
50
|
window.location.href = data.href;
|
|
51
51
|
}
|
|
52
|
-
};
|
|
53
52
|
|
|
54
|
-
var handleShowSubordinatesList = function handleShowSubordinatesList(e) {
|
|
55
|
-
e.stopPropagation();
|
|
56
53
|
onExpand(e);
|
|
57
54
|
setIsShowSubordinates(!isShowSubordinates);
|
|
58
55
|
};
|
|
@@ -66,8 +63,7 @@ var Subordinates = function Subordinates(props) {
|
|
|
66
63
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
67
64
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-concern-node-title"), "noselect")
|
|
68
65
|
}, title), /*#__PURE__*/_react["default"].createElement("span", {
|
|
69
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-concern-node-add"), "noselect")
|
|
70
|
-
onClick: handleShowSubordinatesList
|
|
66
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-concern-node-add"), "noselect")
|
|
71
67
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
72
68
|
className: (0, _classnames["default"])('tu-icon-APP-xi', _defineProperty({}, "".concat(_precls["default"], "__subordinates-arrow-down"), isShowSubordinates))
|
|
73
69
|
})));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.titaui-menus-tree__follower-node {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 40px;
|
|
5
|
+
line-height: 40px;
|
|
6
|
+
border-radius: 12px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.titaui-menus-tree__follower-node:hover .titaui-menus-tree__follower-node-cancel {
|
|
12
|
+
opacity: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.titaui-menus-tree__follower-node:hover .titaui-menus-tree__follower-node-username {
|
|
16
|
+
color: #2879ff;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.titaui-menus-tree__follower-node-username {
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
font-weight: 400;
|
|
22
|
+
color: #3f4755;
|
|
23
|
+
line-height: 20px;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
text-overflow: ellipsis;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.titaui-menus-tree__follower-node-cancel {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
position: absolute;
|
|
33
|
+
right: 5px;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
transition: all 0.2s cubic-bezier(0.785, 0.135, 0.15, 0.86) 0s;
|
|
36
|
+
will-change: opacity;
|
|
37
|
+
color: #a4acb9;
|
|
38
|
+
border: 5px solid transparent;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.titaui-menus-tree__follower-node-cancel > span {
|
|
42
|
+
color: #a4acb9 !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.titaui-menus-tree__follower-node-cancel:hover > span {
|
|
46
|
+
color: #f05e5e !important;
|
|
47
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = _default;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _i18n = require("../../../../i18n");
|
|
15
|
+
|
|
16
|
+
var _openData = require("../../../../../../utils/open-data");
|
|
17
|
+
|
|
18
|
+
var _tooltip = _interopRequireDefault(require("../../../../../tooltip"));
|
|
19
|
+
|
|
20
|
+
var _context = require("../../../../context");
|
|
21
|
+
|
|
22
|
+
var _avatar = _interopRequireDefault(require("../avatar"));
|
|
23
|
+
|
|
24
|
+
var _precls = _interopRequireDefault(require("../../precls"));
|
|
25
|
+
|
|
26
|
+
var _getLocale = require("../../../../../../utils/getLocale");
|
|
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 _default(props) {
|
|
37
|
+
var user = props.data,
|
|
38
|
+
_props$level = props.level,
|
|
39
|
+
level = _props$level === void 0 ? 0 : _props$level;
|
|
40
|
+
|
|
41
|
+
var _useContext = (0, _react.useContext)(_context.SummaryMenusContext),
|
|
42
|
+
onRemoveConcerner = _useContext.onRemoveConcerner;
|
|
43
|
+
|
|
44
|
+
var onCancelFollowHandler = function onCancelFollowHandler(e) {
|
|
45
|
+
e.stopPropagation();
|
|
46
|
+
onRemoveConcerner(user);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
50
|
+
title: "",
|
|
51
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__follower-node")),
|
|
52
|
+
style: {
|
|
53
|
+
paddingLeft: 12 + level * 10
|
|
54
|
+
}
|
|
55
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
56
|
+
user: user
|
|
57
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
58
|
+
style: {
|
|
59
|
+
width: "calc(100% - ".concat(12 + 13 + 15 + level * 10, "px)")
|
|
60
|
+
},
|
|
61
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__follower-node-username"), "noselect")
|
|
62
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
63
|
+
name: user.name,
|
|
64
|
+
id: user.userId
|
|
65
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__follower-node-cancel")),
|
|
67
|
+
onClick: onCancelFollowHandler
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
69
|
+
overlay: /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)(_i18n.locale.unsubscribe)),
|
|
70
|
+
placement: "top",
|
|
71
|
+
align: {
|
|
72
|
+
offset: [0, 5]
|
|
73
|
+
}
|
|
74
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
75
|
+
className: "tu-icon-cross"
|
|
76
|
+
}))));
|
|
77
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = _default;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _userSelector = _interopRequireDefault(require("../../../../user-selector"));
|
|
15
|
+
|
|
16
|
+
var _requestApis = require("../../../request-apis");
|
|
17
|
+
|
|
18
|
+
var _toast = _interopRequireDefault(require("../../../../toast"));
|
|
19
|
+
|
|
20
|
+
var _context = require("../../../context");
|
|
21
|
+
|
|
22
|
+
var _precls = _interopRequireDefault(require("../precls"));
|
|
23
|
+
|
|
24
|
+
require("./index.css");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
function _default(props) {
|
|
33
|
+
var onExpand = props.onExpand,
|
|
34
|
+
title = props.title,
|
|
35
|
+
data = props.data;
|
|
36
|
+
var userRef = (0, _react.useRef)();
|
|
37
|
+
|
|
38
|
+
var _useContext = (0, _react.useContext)(_context.SummaryMenusContext),
|
|
39
|
+
onAddConcerner = _useContext.onAddConcerner;
|
|
40
|
+
|
|
41
|
+
var onExpandHander = function onExpandHander(e) {
|
|
42
|
+
onExpand(e);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var onAddConcernHandler = function onAddConcernHandler(e) {
|
|
46
|
+
e.stopPropagation(); // @ts-ignore
|
|
47
|
+
|
|
48
|
+
userRef.current && userRef.current.open();
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var onUserSelectHandler = function onUserSelectHandler(users, _, e) {
|
|
52
|
+
(0, _requestApis.addSummaryFollower)(users[0].data.userId).then(function (res) {
|
|
53
|
+
if (res.Code != 1) {
|
|
54
|
+
_toast["default"].Error(res.Message, {});
|
|
55
|
+
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
onAddConcerner(users[0]);
|
|
60
|
+
})["catch"](function (err) {
|
|
61
|
+
return console.log(err);
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
66
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-concern-node")),
|
|
67
|
+
onClick: onExpandHander,
|
|
68
|
+
title: ""
|
|
69
|
+
}, data.icon && /*#__PURE__*/_react["default"].createElement("span", {
|
|
70
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-concern-node-icon"), data.icon)
|
|
71
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
72
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-concern-node-title"), "noselect")
|
|
73
|
+
}, title), /*#__PURE__*/_react["default"].createElement("span", {
|
|
74
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "__user-concern-node-add"), "noselect"),
|
|
75
|
+
onClick: onAddConcernHandler
|
|
76
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
77
|
+
className: "tu-icon-add1"
|
|
78
|
+
})), /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
79
|
+
ref: userRef,
|
|
80
|
+
multiple: false,
|
|
81
|
+
position: "bottomLeft",
|
|
82
|
+
onSelect: onUserSelectHandler,
|
|
83
|
+
disabledDepartSelect: true,
|
|
84
|
+
showSearchInput: true,
|
|
85
|
+
searchedPanes: {
|
|
86
|
+
user: true,
|
|
87
|
+
depart: false,
|
|
88
|
+
group: false
|
|
89
|
+
},
|
|
90
|
+
trigger: /*#__PURE__*/_react["default"].createElement("span", null),
|
|
91
|
+
panes: {
|
|
92
|
+
depart: true
|
|
93
|
+
}
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.OkrMenusContext = exports.FlipContext = void 0;
|
|
6
|
+
exports.SummaryMenusContext = exports.OkrMenusContext = exports.FlipContext = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -15,4 +15,8 @@ exports.OkrMenusContext = OkrMenusContext;
|
|
|
15
15
|
|
|
16
16
|
var FlipContext = /*#__PURE__*/_react["default"].createContext();
|
|
17
17
|
|
|
18
|
-
exports.FlipContext = FlipContext;
|
|
18
|
+
exports.FlipContext = FlipContext;
|
|
19
|
+
|
|
20
|
+
var SummaryMenusContext = /*#__PURE__*/_react["default"].createContext();
|
|
21
|
+
|
|
22
|
+
exports.SummaryMenusContext = SummaryMenusContext;
|
|
@@ -176,7 +176,7 @@ var _default = function _default() {
|
|
|
176
176
|
deWeightData[item.id] = item;
|
|
177
177
|
});
|
|
178
178
|
var result = Object.values(deWeightData);
|
|
179
|
-
setRawTreeData(
|
|
179
|
+
setRawTreeData(_toConsumableArray(result));
|
|
180
180
|
setTreeData((0, _utils.toTree)(rawTreeData));
|
|
181
181
|
resolve(true);
|
|
182
182
|
});
|
|
@@ -13,6 +13,18 @@ var _getLocale = require("../../../../utils/getLocale");
|
|
|
13
13
|
|
|
14
14
|
var _bsGlobal = require("../../../../utils/bs-global");
|
|
15
15
|
|
|
16
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
17
|
+
|
|
18
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
23
|
+
|
|
24
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
16
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
29
|
|
|
18
30
|
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); } }
|
|
@@ -61,6 +73,7 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
61
73
|
_classCallCheck(this, summaryMenus);
|
|
62
74
|
|
|
63
75
|
this.COMPANYALL = _index.COMPANY_ALL_NODE;
|
|
76
|
+
this.USERCONCERN = _index.SUMMARY_USER_CONCERN_NODE;
|
|
64
77
|
this.SHARE = _index.SHARE_NODE;
|
|
65
78
|
this.TONGJI = _index.TONGJI_NODE;
|
|
66
79
|
this.SUBORDINATES = _index.SUBORDINATES_NODE;
|
|
@@ -105,6 +118,13 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
105
118
|
children: [],
|
|
106
119
|
href: "#/summary/share",
|
|
107
120
|
isShow: props.isShowShare
|
|
121
|
+
}, {
|
|
122
|
+
icon: "guanzhu",
|
|
123
|
+
label: _i18n.locale.menu_concerned_user,
|
|
124
|
+
key: this.USERCONCERN,
|
|
125
|
+
type: this.USERCONCERN,
|
|
126
|
+
href: "#/summary/all",
|
|
127
|
+
isShow: true
|
|
108
128
|
}, {
|
|
109
129
|
icon: "bumen",
|
|
110
130
|
label: _i18n.locale.menu_department,
|
|
@@ -278,6 +298,108 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
278
298
|
|
|
279
299
|
this.menus[3].children = treeNodeUsers;
|
|
280
300
|
}
|
|
301
|
+
}, {
|
|
302
|
+
key: "setConcernLoading",
|
|
303
|
+
value: function setConcernLoading(loading) {
|
|
304
|
+
this.menus[5].children = [];
|
|
305
|
+
|
|
306
|
+
if (loading) {
|
|
307
|
+
this.menus[5].children.push({
|
|
308
|
+
icon: '',
|
|
309
|
+
label: 'loading',
|
|
310
|
+
key: 'loading-concern',
|
|
311
|
+
type: _index.LOADING_NODE,
|
|
312
|
+
href: '',
|
|
313
|
+
data: {}
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}, {
|
|
318
|
+
key: "checkConcernExist",
|
|
319
|
+
value: function checkConcernExist(user) {
|
|
320
|
+
var concerns = this.menus[5].children;
|
|
321
|
+
|
|
322
|
+
for (var i = 0; i < concerns.length; i++) {
|
|
323
|
+
var it = concerns[i];
|
|
324
|
+
|
|
325
|
+
if (it.key == "concern-".concat(user.userId)) {
|
|
326
|
+
return true;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
}, {
|
|
333
|
+
key: "insertConcern",
|
|
334
|
+
value: function insertConcern(users) {
|
|
335
|
+
var treeNodeUsers = []; // 如果没有关注者,显示空
|
|
336
|
+
|
|
337
|
+
this.setEmptyConcerners(false);
|
|
338
|
+
|
|
339
|
+
if (!users || !users.length) {
|
|
340
|
+
this.setEmptyConcerners(true);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
for (var i = 0; i < users.length; i++) {
|
|
344
|
+
var user = users[i];
|
|
345
|
+
if (this.checkConcernExist(user)) continue;
|
|
346
|
+
treeNodeUsers.push({
|
|
347
|
+
icon: '',
|
|
348
|
+
label: user.name,
|
|
349
|
+
key: "concern-".concat(user.userId),
|
|
350
|
+
type: _index.SUMMARY_FOLLOWER_NODE,
|
|
351
|
+
href: '',
|
|
352
|
+
data: user
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
this.menus[5].children = this.menus[5].children.concat(treeNodeUsers);
|
|
357
|
+
}
|
|
358
|
+
}, {
|
|
359
|
+
key: "addConcerner",
|
|
360
|
+
value: function addConcerner(user) {
|
|
361
|
+
if (this.menus[5].children.length && this.menus[5].children[0].key == 'empty-concerners') {
|
|
362
|
+
this.menus[5].children = [];
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
this.menus[5].children.push({
|
|
366
|
+
icon: '',
|
|
367
|
+
label: user.name,
|
|
368
|
+
key: "concern-".concat(user.userId),
|
|
369
|
+
type: _index.SUMMARY_FOLLOWER_NODE,
|
|
370
|
+
href: '',
|
|
371
|
+
data: user
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
}, {
|
|
375
|
+
key: "setEmptyConcerners",
|
|
376
|
+
value: function setEmptyConcerners(empty) {
|
|
377
|
+
this.menus[5].children = [];
|
|
378
|
+
|
|
379
|
+
if (empty) {
|
|
380
|
+
this.menus[5].children.push({
|
|
381
|
+
icon: '',
|
|
382
|
+
label: 'empty-concerners',
|
|
383
|
+
key: 'empty-concerners',
|
|
384
|
+
type: _index.NO_FOLLOWER_NODE,
|
|
385
|
+
href: '',
|
|
386
|
+
data: {}
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}, {
|
|
391
|
+
key: "removeConcerner",
|
|
392
|
+
value: function removeConcerner(user) {
|
|
393
|
+
var newChildren = _toConsumableArray(this.menus[5].children).filter(function (it) {
|
|
394
|
+
return it.key != "concern-".concat(user.userId);
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
if (!newChildren.length) {
|
|
398
|
+
this.setEmptyConcerners(true);
|
|
399
|
+
} else {
|
|
400
|
+
this.menus[5].children = newChildren;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
281
403
|
}, {
|
|
282
404
|
key: "getMenus",
|
|
283
405
|
value: function getMenus() {
|
|
@@ -25,6 +25,8 @@ var _requestApis = require("../../request-apis");
|
|
|
25
25
|
|
|
26
26
|
var _requestApi = require("./request-api");
|
|
27
27
|
|
|
28
|
+
var _context = require("../../context");
|
|
29
|
+
|
|
28
30
|
var _auth = require("../../../../utils/auth");
|
|
29
31
|
|
|
30
32
|
require("../../index.css");
|
|
@@ -122,7 +124,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
122
124
|
var nodeType = node.nodeType,
|
|
123
125
|
data = node.data;
|
|
124
126
|
|
|
125
|
-
if (nodeType == _index.USER_NODE || nodeType == _index.FOLLOWER_NODE || nodeType == _index.SAME_LEVEL_USER_NODE) {
|
|
127
|
+
if (nodeType == _index.USER_NODE || nodeType == _index.FOLLOWER_NODE || nodeType == _index.SAME_LEVEL_USER_NODE || nodeType == _index.SUMMARY_FOLLOWER_NODE) {
|
|
126
128
|
location.href = "#/summary/manage?toUserId=".concat(data.userId, "&subordinates=1");
|
|
127
129
|
}
|
|
128
130
|
|
|
@@ -196,6 +198,23 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
196
198
|
resolve(true);
|
|
197
199
|
})["catch"](reject);
|
|
198
200
|
});
|
|
201
|
+
}; // 获取关注的人数据列表
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
var getConcerners = function getConcerners() {
|
|
205
|
+
return new Promise(function (resolve, reject) {
|
|
206
|
+
var mdata = summaryMenusData.current; // 初始化 Loading
|
|
207
|
+
|
|
208
|
+
mdata.setConcernLoading(true);
|
|
209
|
+
setMenus(mdata.getMenus());
|
|
210
|
+
resolve(true); // 获取数据
|
|
211
|
+
|
|
212
|
+
(0, _requestApis.getSummaryFollowerList)().then(function (user) {
|
|
213
|
+
mdata.setConcernLoading(false);
|
|
214
|
+
mdata.insertConcern(user);
|
|
215
|
+
setMenus(mdata.getMenus());
|
|
216
|
+
})["catch"](reject);
|
|
217
|
+
});
|
|
199
218
|
};
|
|
200
219
|
|
|
201
220
|
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
@@ -218,6 +237,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
218
237
|
})["catch"](function () {
|
|
219
238
|
return resolve(true);
|
|
220
239
|
});
|
|
240
|
+
} else if (treeNode.key == summaryMenusData.current.USERCONCERN) {
|
|
241
|
+
getConcerners().then(function () {
|
|
242
|
+
return resolve(true);
|
|
243
|
+
})["catch"](function () {
|
|
244
|
+
return resolve(true);
|
|
245
|
+
});
|
|
221
246
|
} else {
|
|
222
247
|
resolve(true);
|
|
223
248
|
}
|
|
@@ -230,6 +255,22 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
230
255
|
setExpandedKeys(expandKeys);
|
|
231
256
|
};
|
|
232
257
|
|
|
258
|
+
var onAddConcerner = function onAddConcerner(user) {
|
|
259
|
+
var mdata = summaryMenusData.current;
|
|
260
|
+
mdata.addConcerner(user.data);
|
|
261
|
+
setMenus(mdata.getMenus());
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
var onRemoveConcerner = function onRemoveConcerner(user) {
|
|
265
|
+
(0, _requestApis.removeSummaryFollower)(user.userId).then(function (res) {
|
|
266
|
+
if (res.Code == 1) {
|
|
267
|
+
var mdata = summaryMenusData.current;
|
|
268
|
+
mdata.removeConcerner(user);
|
|
269
|
+
setMenus(mdata.getMenus());
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
|
|
233
274
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
234
275
|
return {
|
|
235
276
|
setSelectedMenuKeys: setSelectedMenuKeys
|
|
@@ -279,7 +320,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
279
320
|
obs.unobserve(document.body);
|
|
280
321
|
};
|
|
281
322
|
}, []);
|
|
282
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
323
|
+
return /*#__PURE__*/_react["default"].createElement(_context.SummaryMenusContext.Provider, {
|
|
324
|
+
value: {
|
|
325
|
+
onAddConcerner: onAddConcerner,
|
|
326
|
+
onRemoveConcerner: onRemoveConcerner
|
|
327
|
+
}
|
|
328
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
283
329
|
style: {
|
|
284
330
|
maxHeight: maxHeight
|
|
285
331
|
}
|
|
@@ -290,7 +336,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
290
336
|
onSelect: onSelectHandler,
|
|
291
337
|
onExpand: onExpandHandler,
|
|
292
338
|
loadData: onLoadTreeNodeDataHandler
|
|
293
|
-
})));
|
|
339
|
+
}))));
|
|
294
340
|
});
|
|
295
341
|
|
|
296
342
|
exports["default"] = _default;
|