@titaui/pc 1.12.11 → 1.12.13-beta.2
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 +11 -0
- package/lib/components/attachments-preview/index.js +112 -0
- package/lib/components/auto-save/img/failed.svg +17 -0
- package/lib/components/auto-save/img/success.svg +16 -0
- package/lib/components/auto-save/index.css +39 -0
- package/lib/components/auto-save/index.js +78 -0
- package/lib/components/auto-save/interface.js +5 -0
- package/lib/components/change-okr-modal/index.js +2 -4
- package/lib/components/color-date-picker/index.css +72 -0
- package/lib/components/color-date-picker/index.js +129 -0
- package/lib/components/color-date-picker/interface.js +14 -0
- package/lib/components/common-share/publishMblog.js +2 -4
- 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/request-api.js +12 -16
- package/lib/components/create-okr-modal/utils/helper.js +2 -6
- package/lib/components/dialog-confirm/index.css +1 -0
- package/lib/components/dialog-confirm/index.js +5 -3
- package/lib/components/dialog-upload/img/doc.svg +1 -0
- package/lib/components/dialog-upload/img/other.svg +1 -0
- package/lib/components/dialog-upload/img/pdf.svg +1 -0
- package/lib/components/dialog-upload/img/ppt.svg +1 -0
- package/lib/components/dialog-upload/img/radio.svg +1 -0
- package/lib/components/dialog-upload/img/video.svg +1 -0
- package/lib/components/dialog-upload/img/xls.svg +1 -0
- package/lib/components/dialog-upload/index.css +77 -0
- package/lib/components/dialog-upload/index.js +330 -0
- package/lib/components/dialog-upload/type.js +35 -0
- package/lib/components/dialog-upload/uploaded-preview.css +77 -0
- package/lib/components/dialog-upload/uploaded-preview.js +132 -0
- package/lib/components/dialog-upload/util.js +131 -0
- package/lib/components/drawer-manager/drawerWrapper.js +2 -4
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/api.js +27 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/encourage.js +119 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/APP-shoucang-m.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/ascore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curEfforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGood.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGreat.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/efforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/good.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/great.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/halfscore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/loading.gif +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/score.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/top.svg +14 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.css +75 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +195 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/rate.js +143 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.js +1 -5
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +31 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +171 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +151 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/request-api.js +10 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/utils.js +10 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.js +26 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.js +26 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.css +197 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +220 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/request-api.js +20 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/util.js +134 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.js +60 -0
- package/lib/components/dynamic/dynamic-item/components/progress/index.css +25 -0
- package/lib/components/dynamic/dynamic-item/components/progress/index.js +71 -0
- package/lib/components/dynamic/dynamic-item/components/progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +35 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +55 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +166 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +359 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +49 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +24 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +52 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +50 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +65 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +201 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +169 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +5 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +27 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/evaluate-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +68 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +43 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +87 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +184 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +231 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +30 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/index.css +1 -0
- package/lib/components/dynamic/dynamic-item/index.js +18 -5
- package/lib/components/firework/index.js +2 -6
- package/lib/components/form/form-fields/date/index.js +6 -6
- package/lib/components/form/form-fields/input-verification-code/index.js +2 -4
- package/lib/components/grid-layout/util/network.js +6 -10
- package/lib/components/import-modal/helper.js +225 -0
- package/lib/components/import-modal/image/loading.gif +0 -0
- package/lib/components/import-modal/import-okr-modal/index.css +18 -0
- package/lib/components/import-modal/import-okr-modal/index.js +137 -0
- package/lib/components/import-modal/import-task-modal/index.css +18 -0
- package/lib/components/import-modal/import-task-modal/index.js +243 -0
- package/lib/components/import-modal/import-task-modal/search-form.js +141 -0
- package/lib/components/import-modal/index.css +30 -0
- package/lib/components/import-modal/index.js +20 -0
- package/lib/components/import-modal/radio.js +62 -0
- package/lib/components/import-modal/request-api.js +204 -0
- package/lib/components/import-modal/search/category-select.js +74 -0
- package/lib/components/import-modal/search/okr-classify-select.js +74 -0
- package/lib/components/import-modal/search/okr-status-select.js +74 -0
- package/lib/components/import-modal/search/okr-type-select.js +87 -0
- package/lib/components/import-modal/search/principal.js +135 -0
- package/lib/components/import-modal/search/relation.js +80 -0
- package/lib/components/import-modal/search/search-dropdown/index.css +50 -0
- package/lib/components/import-modal/search/search-dropdown/index.js +32 -0
- package/lib/components/import-modal/search/task-relation.js +80 -0
- package/lib/components/import-modal/search/task-status-select.js +87 -0
- package/lib/components/import-modal/search/work-relation.js +83 -0
- package/lib/components/import-modal/search/work-status-select.js +74 -0
- package/lib/components/import-modal/tree/okr-tree/index.css +61 -0
- package/lib/components/import-modal/tree/okr-tree/index.js +267 -0
- package/lib/components/import-modal/tree/okr-tree/search-form.js +169 -0
- package/lib/components/import-modal/tree/task-work-tree/index.css +124 -0
- package/lib/components/import-modal/tree/task-work-tree/index.js +190 -0
- package/lib/components/import-modal/tree-node/index.css +0 -0
- package/lib/components/import-modal/tree-node/index.js +51 -0
- package/lib/components/import-modal/tree-node/kr-node/index.css +65 -0
- package/lib/components/import-modal/tree-node/kr-node/index.js +112 -0
- package/lib/components/import-modal/tree-node/milestone-node/index.css +61 -0
- package/lib/components/import-modal/tree-node/milestone-node/index.js +118 -0
- package/lib/components/import-modal/tree-node/o-node/index.css +53 -0
- package/lib/components/import-modal/tree-node/o-node/index.js +142 -0
- package/lib/components/import-modal/tree-node/work-node/index.css +51 -0
- package/lib/components/import-modal/tree-node/work-node/index.js +108 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/caidan-enjoy.svg +14 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-setup.svg +18 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-zongjie.svg +15 -0
- package/lib/components/menus/components/menu-tree/images/summary-menu/zongjie-s.svg +15 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.css +120 -0
- package/lib/components/menus/components/menu-tree/tree-node/index.js +22 -2
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +78 -0
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +78 -0
- package/lib/components/menus/export-modules/interview-menus/constant.js +22 -1
- package/lib/components/menus/export-modules/summary-menus/depart-menus/helper.js +56 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.css +32 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +231 -0
- package/lib/components/menus/export-modules/summary-menus/index.css +9 -0
- package/lib/components/menus/export-modules/summary-menus/index.js +136 -0
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +76 -0
- package/lib/components/menus/export-modules/summary-menus/menus.js +189 -0
- package/lib/components/menus/export-modules/summary-menus/request-api.js +17 -0
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/helper.js +28 -0
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.css +14 -0
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.js +201 -0
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +242 -0
- package/lib/components/menus/i18n.js +8 -0
- package/lib/components/menus/index.js +6 -0
- package/lib/components/menus/request-apis.js +8 -2
- package/lib/components/nav-top/components/menu/index.js +1 -1
- package/lib/components/new-confidence/constant.js +53 -0
- package/lib/components/new-confidence/img/1.svg +40 -0
- package/lib/components/new-confidence/img/10.svg +33 -0
- package/lib/components/new-confidence/img/2.svg +40 -0
- package/lib/components/new-confidence/img/3.svg +40 -0
- package/lib/components/new-confidence/img/4.svg +40 -0
- package/lib/components/new-confidence/img/5.svg +40 -0
- package/lib/components/new-confidence/img/6.svg +40 -0
- package/lib/components/new-confidence/img/7.svg +40 -0
- package/lib/components/new-confidence/img/8.svg +40 -0
- package/lib/components/new-confidence/img/9.svg +40 -0
- package/lib/components/new-confidence/index.css +62 -0
- package/lib/components/new-confidence/index.js +115 -0
- package/lib/components/new-confidence/interface.js +5 -0
- 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/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/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/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/kr-node/index.js +2 -4
- 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 +23 -4
- 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 +2 -4
- 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/period-selector/helper/index.js +2 -6
- package/lib/components/photo-card/components/card/index.js +12 -9
- package/lib/components/picker/components/cross.svg +17 -0
- package/lib/components/picker/components/panels/date-panel/date-body.js +14 -2
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.css +5 -0
- package/lib/components/picker/components/panels/month-panel/index.js +34 -4
- package/lib/components/picker/components/panels/month-panel/month-body.js +2 -3
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/week-panel/index.css +42 -0
- package/lib/components/picker/components/panels/week-panel/index.js +49 -0
- package/lib/components/picker/components/panels/week-panel/utils.js +124 -0
- package/lib/components/picker/components/panels/week-panel/week-body.js +71 -0
- package/lib/components/picker/components/panels/week-panel/week-head.js +80 -0
- package/lib/components/picker/components/panels/year-panel/index.css +5 -0
- package/lib/components/picker/components/panels/year-panel/index.js +34 -3
- package/lib/components/picker/components/panels/year-panel/year-body.js +10 -3
- package/lib/components/picker/components/picker-trigger/index.css +6 -1
- package/lib/components/picker/components/picker-trigger/index.js +9 -4
- package/lib/components/picker/context.js +17 -2
- package/lib/components/picker/index.css +29 -1
- package/lib/components/picker/index.js +3 -0
- package/lib/components/picker/picker-panels.js +98 -61
- package/lib/components/picker/picker.js +44 -30
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +97 -0
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +109 -0
- package/lib/components/picker/range-picker/components/placeholder/index.js +91 -0
- package/lib/components/picker/range-picker/components/select-input/index.js +72 -0
- package/lib/components/picker/range-picker/components/shortcuts/index.js +45 -0
- package/lib/components/picker/range-picker/index.css +158 -0
- package/lib/components/picker/range-picker/index.js +263 -0
- package/lib/components/picker/utils.js +168 -11
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +117 -0
- package/lib/components/promise-confirm/interface.js +5 -0
- package/lib/components/rate/index.css +111 -0
- package/lib/components/rate/index.js +52 -0
- package/lib/components/regulation-setting-item/index.css +33 -0
- package/lib/components/regulation-setting-item/index.js +37 -0
- package/lib/components/rich-editor/schemas/list.js +0 -1
- package/lib/components/rich-editor-at/components/index.css +66 -0
- package/lib/components/rich-editor-at/components/index.js +189 -0
- package/lib/components/rich-editor-at/index.css +40 -0
- package/lib/components/rich-editor-at/index.js +113 -0
- package/lib/components/rich-editor-upload/index.css +11 -0
- package/lib/components/rich-editor-upload/index.js +87 -0
- package/lib/components/search-input/index.js +5 -0
- package/lib/components/select-tags/index.js +7 -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/task-relation-modal/index.js +4 -6
- 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/work-relation/index.js +4 -6
- 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/textarea/index.js +7 -5
- package/lib/components/toast/index.js +8 -12
- package/lib/components/upvote/index.js +4 -6
- package/lib/components/version-change-modal/index.js +4 -6
- package/lib/components/version-change-modal/request-api.js +2 -6
- 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/write-summary-modal/index.css +79 -0
- package/lib/components/write-summary-modal/index.js +167 -0
- package/lib/components/write-summary-modal/interface.js +19 -0
- package/lib/components/write-summary-modal/request-api.js +18 -0
- package/lib/components/write-summary-modal/utils.js +31 -0
- package/lib/index.js +64 -0
- package/lib/pages/group-management/groupInterface.js +2 -6
- package/lib/pages/new-okr-list/request-api.js +14 -18
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +2 -4
- package/lib/pages/okr-map/request-apis.js +2 -6
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +14 -2
- package/lib/utils/helpers.js +56 -11
- package/lib/utils/open-data.js +4 -6
- package/lib/utils/request-v1.js +2 -6
- package/lib/utils/request.js +2 -6
- package/package.json +2 -1
|
@@ -47,7 +47,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
47
47
|
|
|
48
48
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
49
|
|
|
50
|
-
var preCls =
|
|
50
|
+
var preCls = 'titaui-photo-card';
|
|
51
51
|
|
|
52
52
|
function Card(props) {
|
|
53
53
|
var userInfo = props.userInfo,
|
|
@@ -93,7 +93,7 @@ function Card(props) {
|
|
|
93
93
|
if (userInfo.avatar.hasAvatar) {
|
|
94
94
|
setBackGroundstyle({
|
|
95
95
|
backgroundImage: "url(".concat(userInfo.avatar.big, ")"),
|
|
96
|
-
backgroundSize:
|
|
96
|
+
backgroundSize: '278px 190px'
|
|
97
97
|
});
|
|
98
98
|
} else {
|
|
99
99
|
setBackGroundstyle({
|
|
@@ -146,21 +146,24 @@ function Card(props) {
|
|
|
146
146
|
mouseEnterDelay: 0.8
|
|
147
147
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
148
148
|
className: (0, _classnames["default"])("".concat(preCls, "__header-depart"))
|
|
149
|
-
},
|
|
149
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
|
|
150
|
+
name: userInfo.departmentName,
|
|
151
|
+
id: userInfo.departmentId
|
|
152
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
150
153
|
className: (0, _classnames["default"])("".concat(preCls, "__data"))
|
|
151
154
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
152
155
|
className: (0, _classnames["default"])("".concat(preCls, "__data-attention"))
|
|
153
156
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
154
157
|
className: (0, _classnames["default"])("".concat(preCls, "__data-attention-count"))
|
|
155
|
-
}, attentionData >= 10000 ?
|
|
158
|
+
}, attentionData >= 10000 ? '1w+' : attentionData), /*#__PURE__*/_react["default"].createElement("span", {
|
|
156
159
|
className: (0, _classnames["default"])("".concat(preCls, "__data-attention-title"))
|
|
157
|
-
}, (0, _getLocale.getLocale)(
|
|
160
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Ow_Followers'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
158
161
|
className: (0, _classnames["default"])("".concat(preCls, "__data-visit"))
|
|
159
162
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
160
163
|
className: (0, _classnames["default"])("".concat(preCls, "__data-visit-count"))
|
|
161
|
-
}, visitData >= 10000 ?
|
|
164
|
+
}, visitData >= 10000 ? '1w+' : visitData), /*#__PURE__*/_react["default"].createElement("span", {
|
|
162
165
|
className: (0, _classnames["default"])("".concat(preCls, "__data-visit-title"))
|
|
163
|
-
}, (0, _getLocale.getLocale)(
|
|
166
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Visitors')))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
164
167
|
condition: userInfo.userId !== userownInfo.Id
|
|
165
168
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
166
169
|
className: (0, _classnames["default"])("".concat(preCls, "__attention-btn")),
|
|
@@ -172,9 +175,9 @@ function Card(props) {
|
|
|
172
175
|
className: (0, _classnames["default"])("".concat(preCls, "__attention-btn-img"), _defineProperty({}, "".concat(preCls, "__attention-btn-img--hide"), isAttention))
|
|
173
176
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
174
177
|
className: (0, _classnames["default"])("".concat(preCls, "__attention-btn-img--hide"), _defineProperty({}, "".concat(preCls, "__attention-btn-img--show"), isAttention))
|
|
175
|
-
}, (0, _getLocale.getLocale)(
|
|
178
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Followed')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
179
|
className: (0, _classnames["default"])("".concat(preCls, "__attention-btn-title"), _defineProperty({}, "".concat(preCls, "__attention-btn-img--hide"), isAttention))
|
|
177
|
-
}, (0, _getLocale.getLocale)(
|
|
180
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Follow')))));
|
|
178
181
|
}
|
|
179
182
|
|
|
180
183
|
var _default = Card;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>切片</title>
|
|
4
|
+
<g id="10、日期时间组件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="日期范围选择器-Date" transform="translate(-411.000000, -3250.000000)" fill="#BFC7D5">
|
|
6
|
+
<g id="编组-4" transform="translate(254.000000, 3190.000000)">
|
|
7
|
+
<g id="日期基础组件" transform="translate(0.000000, 36.000000)">
|
|
8
|
+
<g id="编组-6" transform="translate(20.000000, 16.000000)">
|
|
9
|
+
<g id="cross" transform="translate(137.000000, 8.000000)">
|
|
10
|
+
<path d="M8,1.33333333 C9.84066667,1.33333333 11.5073333,2.07966667 12.7143333,3.286 C13.9206667,4.49233333 14.6666667,6.159 14.6666667,8 C14.6666667,9.84066667 13.9206667,11.5073333 12.7143333,12.7143333 C11.5073333,13.9206667 9.84066667,14.6666667 8,14.6666667 C6.159,14.6666667 4.49233333,13.9206667 3.286,12.7143333 C2.07966667,11.5073333 1.33333333,9.84066667 1.33333333,8 C1.33333333,6.159 2.07966667,4.49233333 3.286,3.286 C4.49233333,2.07966667 6.159,1.33333333 8,1.33333333 Z M6.00687497,5.25130819 C5.79859535,5.04302857 5.46090736,5.04302857 5.25262774,5.25130819 C5.04434812,5.45958782 5.04434812,5.7972758 5.25262774,6.00555543 L5.25262774,6.00555543 L7.23241802,7.98509848 L5.25262774,9.9653534 L5.19091526,10.0392178 C5.04691947,10.2470772 5.0674903,10.5344632 5.25262774,10.7196006 L5.25262774,10.7196006 L5.32649215,10.7813131 C5.5343515,10.9253089 5.82173753,10.9047381 6.00687497,10.7196006 L6.00687497,10.7196006 L7.98641802,8.73909848 L9.96667295,10.7196006 C10.1749526,10.9278803 10.5126406,10.9278803 10.7209202,10.7196006 C10.9291998,10.511321 10.9291998,10.173633 10.7209202,9.9653534 L10.7209202,9.9653534 L8.74041802,7.98509848 L10.7209202,6.00555543 L10.7826327,5.93169101 C10.9266284,5.72383166 10.9060576,5.43644564 10.7209202,5.25130819 L10.7209202,5.25130819 L10.6470558,5.18959571 C10.4391964,5.04559992 10.1518104,5.06617075 9.96667295,5.25130819 L9.96667295,5.25130819 L7.98641802,7.23109848 Z" id="形状结合"></path>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</g>
|
|
15
|
+
</g>
|
|
16
|
+
</g>
|
|
17
|
+
</svg>
|
|
@@ -39,6 +39,7 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
39
39
|
onSelect = props.onSelect;
|
|
40
40
|
|
|
41
41
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
42
|
+
format = _useContext.format,
|
|
42
43
|
value = _useContext.value;
|
|
43
44
|
|
|
44
45
|
var weekStartDaySun = weekStartDay === 'SUNDAY';
|
|
@@ -50,7 +51,18 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
50
51
|
var _classNames;
|
|
51
52
|
|
|
52
53
|
var date = (0, _moment["default"])(sunday).add(day, 'd');
|
|
53
|
-
|
|
54
|
+
|
|
55
|
+
var _isCurrentDateInRange = (0, _utils.isCurrentDateInRanges)({
|
|
56
|
+
nowDate: date,
|
|
57
|
+
values: value
|
|
58
|
+
}),
|
|
59
|
+
inRanges = _isCurrentDateInRange.inRanges,
|
|
60
|
+
rangeStart = _isCurrentDateInRange.rangeStart,
|
|
61
|
+
rangeEnd = _isCurrentDateInRange.rangeEnd;
|
|
62
|
+
|
|
63
|
+
var classes = (0, _classnames["default"])(_utils.PickerCellClass, (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--today"), date.isSame((0, _moment["default"])(), 'date')), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-view"), date.format('YYYY/MM') === currentMonth), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-ranges"), inRanges), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-ranges--start"), rangeStart), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--in-ranges--end"), rangeEnd), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), value === null || value === void 0 ? void 0 : value.some(function (v) {
|
|
64
|
+
return date.isSame((0, _moment["default"])(v).format('YYYY/MM/DD'), 'date');
|
|
65
|
+
})), _classNames));
|
|
54
66
|
dates.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
55
67
|
className: classes,
|
|
56
68
|
key: date.format('YYYY/MM/DD')
|
|
@@ -73,7 +85,7 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
73
85
|
var getRows = function getRows(date) {
|
|
74
86
|
var currentDate = (0, _moment["default"])(date);
|
|
75
87
|
var monthFirstDay = currentDate.date(1);
|
|
76
|
-
var currentMonth = monthFirstDay.format('
|
|
88
|
+
var currentMonth = monthFirstDay.format('YYYY/MM');
|
|
77
89
|
var daysDiff = weekStartDaySun ? 0 : 1;
|
|
78
90
|
var weekStartDay = monthFirstDay.subtract(monthFirstDay.day() - daysDiff, 'days');
|
|
79
91
|
var rows = [];
|
|
@@ -29,7 +29,7 @@ var DatePanel = function DatePanel(props) {
|
|
|
29
29
|
|
|
30
30
|
var onMonthChange = function onMonthChange(diff) {
|
|
31
31
|
if (onViewDateChange) {
|
|
32
|
-
onViewDateChange((0, _moment["default"])(viewDate).add(diff,
|
|
32
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, 'M'));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
13
|
|
|
@@ -23,8 +25,24 @@ var _excluded = ["viewDate", "onPanelChange", "onViewDateChange"];
|
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
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
|
+
|
|
26
32
|
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
33
|
|
|
34
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
|
|
36
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
43
|
+
|
|
44
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
+
|
|
28
46
|
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
47
|
|
|
30
48
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -35,16 +53,28 @@ var MonthPanel = function MonthPanel(props) {
|
|
|
35
53
|
onViewDateChange = props.onViewDateChange,
|
|
36
54
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
37
55
|
|
|
56
|
+
var _useState = (0, _react.useState)(viewDate),
|
|
57
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
+
newViewDate = _useState2[0],
|
|
59
|
+
setNewViewDate = _useState2[1];
|
|
60
|
+
|
|
38
61
|
var onYearChange = function onYearChange(diff) {
|
|
39
62
|
if (onViewDateChange) {
|
|
40
|
-
onViewDateChange((0, _moment["default"])(
|
|
63
|
+
onViewDateChange((0, _moment["default"])(newViewDate[0]).add(diff, 'y'));
|
|
41
64
|
}
|
|
42
65
|
};
|
|
43
66
|
|
|
67
|
+
(0, _react.useEffect)(function () {
|
|
68
|
+
if (typeof viewDate === 'string') {
|
|
69
|
+
setNewViewDate(viewDate.split('~')[0]);
|
|
70
|
+
} else {
|
|
71
|
+
setNewViewDate(viewDate);
|
|
72
|
+
}
|
|
73
|
+
}, []);
|
|
44
74
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
45
75
|
className: (0, _classnames["default"])("".concat(_utils.PickerPanelClass, "__month"))
|
|
46
76
|
}, /*#__PURE__*/_react["default"].createElement(_monthHead["default"], _extends({}, restProps, {
|
|
47
|
-
viewDate:
|
|
77
|
+
viewDate: newViewDate,
|
|
48
78
|
onPrevYear: function onPrevYear() {
|
|
49
79
|
onYearChange(-1);
|
|
50
80
|
},
|
|
@@ -52,7 +82,7 @@ var MonthPanel = function MonthPanel(props) {
|
|
|
52
82
|
onYearChange(1);
|
|
53
83
|
},
|
|
54
84
|
onYearClick: function onYearClick() {
|
|
55
|
-
onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(
|
|
85
|
+
onPanelChange === null || onPanelChange === void 0 ? void 0 : onPanelChange(newViewDate, 'year');
|
|
56
86
|
}
|
|
57
87
|
})), /*#__PURE__*/_react["default"].createElement(_monthBody["default"], _extends({
|
|
58
88
|
viewDate: viewDate
|
|
@@ -35,8 +35,7 @@ var MonthPanelBody = function MonthPanelBody(props) {
|
|
|
35
35
|
onSelect = props.onSelect;
|
|
36
36
|
|
|
37
37
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
38
|
-
value = _useContext.value
|
|
39
|
-
mode = _useContext.mode;
|
|
38
|
+
value = _useContext.value;
|
|
40
39
|
|
|
41
40
|
var getCells = function getCells(baseMonth) {
|
|
42
41
|
var cols = [];
|
|
@@ -46,7 +45,7 @@ var MonthPanelBody = function MonthPanelBody(props) {
|
|
|
46
45
|
|
|
47
46
|
var month = col + baseMonth;
|
|
48
47
|
cols.push( /*#__PURE__*/_react["default"].createElement("td", {
|
|
49
|
-
className: (0, _classnames["default"])(_utils.PickerCellClass, "".concat(_utils.PickerCellClass, "--in-view"), (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-month"), month === (0, _moment["default"])().month()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), month === (0, _moment["default"])(
|
|
48
|
+
className: (0, _classnames["default"])(_utils.PickerCellClass, "".concat(_utils.PickerCellClass, "--in-view"), (_classNames = {}, _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--this-month"), month === (0, _moment["default"])().month()), _defineProperty(_classNames, "".concat(_utils.PickerCellClass, "--selected"), month === (0, _moment["default"])(viewDate).month()), _classNames)),
|
|
50
49
|
key: month
|
|
51
50
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
52
51
|
onClick: function onClick() {
|
|
@@ -40,7 +40,7 @@ var MonthPanelHead = function MonthPanelHead(props) {
|
|
|
40
40
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
41
41
|
onClick: onYearClick,
|
|
42
42
|
type: "button"
|
|
43
|
-
}, viewDate.year()));
|
|
43
|
+
}, (0, _moment["default"])(viewDate).year()));
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
var _default = MonthPanelHead;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.tita-ui__picker-panel__date {
|
|
2
|
+
max-height: 252px;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.tita-ui__picker-panel__date .tita-ui__picker-head-btn__prev {
|
|
7
|
+
margin-right: 8px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.tita-ui__picker-panel__date .tita-ui__picker-content {
|
|
11
|
+
width: 100%;
|
|
12
|
+
margin-top: 15px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.tita-ui__picker-panel__date .tita-ui__picker-content thead {
|
|
16
|
+
background: #fff;
|
|
17
|
+
position: relative;
|
|
18
|
+
z-index: 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.titaui__picker__week {
|
|
22
|
+
height: 36px;
|
|
23
|
+
line-height: 36px;
|
|
24
|
+
color: #141C28;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.titaui__picker__week--select {
|
|
28
|
+
color: #2879ff;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.titaui__picker__week-box {
|
|
32
|
+
background: #F6F8FC;
|
|
33
|
+
border-radius: 8px;
|
|
34
|
+
height: 36px;
|
|
35
|
+
padding-left: 24px;
|
|
36
|
+
margin-bottom: 8px;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.titaui__picker__week-index {
|
|
41
|
+
margin-right: 12px;
|
|
42
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
+
|
|
14
|
+
var _utils = require("../../../utils");
|
|
15
|
+
|
|
16
|
+
var _weekHead = _interopRequireDefault(require("./week-head"));
|
|
17
|
+
|
|
18
|
+
var _weekBody = _interopRequireDefault(require("./week-body"));
|
|
19
|
+
|
|
20
|
+
require("./index.css");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
var DatePanel = function DatePanel(props) {
|
|
27
|
+
var viewDate = props.viewDate,
|
|
28
|
+
onViewDateChange = props.onViewDateChange;
|
|
29
|
+
|
|
30
|
+
var onMonthChange = function onMonthChange(diff) {
|
|
31
|
+
if (onViewDateChange) {
|
|
32
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, "M"));
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
37
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerPanelClass, "__date"))
|
|
38
|
+
}, /*#__PURE__*/_react["default"].createElement(_weekHead["default"], _extends({}, props, {
|
|
39
|
+
onPrev: function onPrev() {
|
|
40
|
+
return onMonthChange(-1);
|
|
41
|
+
},
|
|
42
|
+
onNext: function onNext() {
|
|
43
|
+
return onMonthChange(1);
|
|
44
|
+
}
|
|
45
|
+
})), /*#__PURE__*/_react["default"].createElement(_weekBody["default"], props));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var _default = DatePanel;
|
|
49
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.endTime = endTime;
|
|
7
|
+
exports.getWeeksNum = exports.getWeekNumber = exports.getPointYearMonthWeeksRange = exports.getPointYearMonthWeekStartTimeAndEndTime = exports.getDaysOfMonth = void 0;
|
|
8
|
+
exports.startTime = startTime;
|
|
9
|
+
|
|
10
|
+
//获取当前日期在这个月是第几周
|
|
11
|
+
var getWeekNumber = function getWeekNumber(date) {
|
|
12
|
+
var currentDate = new Date(date).getDate();
|
|
13
|
+
var day = new Date(date).getDay(); //今天是星期几 星期天返回0
|
|
14
|
+
|
|
15
|
+
var week = Math.ceil((currentDate + 6 - day) / 7);
|
|
16
|
+
return week;
|
|
17
|
+
}; //获取某年某月有多少天
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.getWeekNumber = getWeekNumber;
|
|
21
|
+
|
|
22
|
+
var getDaysOfMonth = function getDaysOfMonth(year, month) {
|
|
23
|
+
switch (month) {
|
|
24
|
+
case 1:
|
|
25
|
+
case 3:
|
|
26
|
+
case 5:
|
|
27
|
+
case 7:
|
|
28
|
+
case 8:
|
|
29
|
+
case 10:
|
|
30
|
+
case 12:
|
|
31
|
+
return 31;
|
|
32
|
+
|
|
33
|
+
case 4:
|
|
34
|
+
case 6:
|
|
35
|
+
case 9:
|
|
36
|
+
case 11:
|
|
37
|
+
return 30;
|
|
38
|
+
|
|
39
|
+
case 2:
|
|
40
|
+
return year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ? 29 : 28;
|
|
41
|
+
|
|
42
|
+
default:
|
|
43
|
+
return 0;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
exports.getDaysOfMonth = getDaysOfMonth;
|
|
48
|
+
|
|
49
|
+
function startTime(time) {
|
|
50
|
+
var nowTimeDate = new Date(time);
|
|
51
|
+
return nowTimeDate.setHours(0, 0, 0, 0);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function endTime(time) {
|
|
55
|
+
var nowTimeDate = new Date(time);
|
|
56
|
+
return nowTimeDate.setHours(23, 59, 59, 999);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var getWeeksNum = function getWeeksNum(year, month) {
|
|
60
|
+
var d = new Date(); // 该月第一天
|
|
61
|
+
|
|
62
|
+
d.setFullYear(year, month - 1, 1);
|
|
63
|
+
var w1 = d.getDay();
|
|
64
|
+
if (w1 == 0) w1 = 7; // 该月天数
|
|
65
|
+
|
|
66
|
+
d.setFullYear(year, month, 0);
|
|
67
|
+
var dd = d.getDate(); // 第一个周一
|
|
68
|
+
|
|
69
|
+
var d1;
|
|
70
|
+
if (w1 != 1) d1 = 7 - w1 + 2;else d1 = 1;
|
|
71
|
+
var week_count = Math.ceil((dd - d1 + 1) / 7);
|
|
72
|
+
return week_count;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
exports.getWeeksNum = getWeeksNum;
|
|
76
|
+
|
|
77
|
+
var getPointYearMonthWeekStartTimeAndEndTime = function getPointYearMonthWeekStartTimeAndEndTime(year, month, week) {
|
|
78
|
+
// 获取当月的周期
|
|
79
|
+
var date = new Date("".concat(year, "/").concat(month, "/1"));
|
|
80
|
+
var nowDayOfWeek = date.getDay();
|
|
81
|
+
if (nowDayOfWeek === 0) nowDayOfWeek = 7;
|
|
82
|
+
var dayNum = 1 * 24 * 60 * 60 * 1000;
|
|
83
|
+
var firstDate = new Date(date.valueOf() - (nowDayOfWeek - 1) * dayNum);
|
|
84
|
+
var lastDate = new Date(new Date(firstDate).valueOf() + 6 * dayNum * week);
|
|
85
|
+
var startDate = new Date(startTime(new Date(firstDate).valueOf() + 7 * dayNum * (week - 1)));
|
|
86
|
+
var endDate = new Date(endTime(lastDate));
|
|
87
|
+
var startMonth = startDate.getMonth() + 1 > 9 ? startDate.getMonth() + 1 : '0' + (startDate.getMonth() + 1);
|
|
88
|
+
var startDateValue = startDate.getDate() > 9 ? startDate.getDate() : '0' + startDate.getDate();
|
|
89
|
+
var endMonth = endDate.getMonth() + 1 > 9 ? endDate.getMonth() + 1 : '0' + (endDate.getMonth() + 1);
|
|
90
|
+
var endDateValue = endDate.getDate() > 9 ? endDate.getDate() : '0' + endDate.getDate();
|
|
91
|
+
return {
|
|
92
|
+
startTime: "".concat(startMonth, "/").concat(startDateValue),
|
|
93
|
+
endTime: "".concat(endMonth, "/").concat(endDateValue)
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
exports.getPointYearMonthWeekStartTimeAndEndTime = getPointYearMonthWeekStartTimeAndEndTime;
|
|
98
|
+
|
|
99
|
+
var getPointYearMonthWeeksRange = function getPointYearMonthWeeksRange(year, month) {
|
|
100
|
+
var startDate = new Date("".concat(year, "/").concat(month, "/1"));
|
|
101
|
+
var calDays = new Date(startDate.valueOf());
|
|
102
|
+
calDays.setMonth(calDays.getMonth() + 1);
|
|
103
|
+
calDays.setDate(0);
|
|
104
|
+
var days = calDays.getDate();
|
|
105
|
+
var dayNum = 1 * 24 * 60 * 60 * 1000;
|
|
106
|
+
var result = [];
|
|
107
|
+
|
|
108
|
+
for (var i = 0; i < days; i++) {
|
|
109
|
+
var date = new Date(startDate.valueOf() + i * dayNum);
|
|
110
|
+
|
|
111
|
+
if (date.getDay() === 1) {
|
|
112
|
+
var endDate = new Date(date.valueOf() + 6 * dayNum);
|
|
113
|
+
result.push({
|
|
114
|
+
startTime: "".concat(date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1), "/").concat(date.getDate() >= 10 ? date.getDate() : '0' + date.getDate()),
|
|
115
|
+
endTime: "".concat(endDate.getMonth() + 1 >= 10 ? endDate.getMonth() + 1 : '0' + (endDate.getMonth() + 1), "/").concat(endDate.getDate() >= 10 ? endDate.getDate() : '0' + endDate.getDate())
|
|
116
|
+
});
|
|
117
|
+
i += 6;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return result;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
exports.getPointYearMonthWeeksRange = getPointYearMonthWeeksRange;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
+
|
|
14
|
+
var _utils = require("./utils");
|
|
15
|
+
|
|
16
|
+
var _utils2 = require("../../../utils");
|
|
17
|
+
|
|
18
|
+
var _constant = require("../../../../../utils/constant");
|
|
19
|
+
|
|
20
|
+
require("./index.css");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
+
|
|
26
|
+
var preCls = 'titaui__picker';
|
|
27
|
+
|
|
28
|
+
var WeekPanelBody = function WeekPanelBody(props) {
|
|
29
|
+
var viewDate = props.viewDate,
|
|
30
|
+
onSelect = props.onSelect;
|
|
31
|
+
var currentYear = new Date().getFullYear();
|
|
32
|
+
var currentMonth = new Date().getMonth() + 1;
|
|
33
|
+
var currentWeek = (0, _utils.getWeekNumber)(new Date());
|
|
34
|
+
|
|
35
|
+
var getCells = function getCells(date) {
|
|
36
|
+
var year = (0, _moment["default"])(date).format('YYYY'); //获取年
|
|
37
|
+
|
|
38
|
+
var month = (0, _moment["default"])(date).format('MM'); //获取月
|
|
39
|
+
|
|
40
|
+
var range = (0, _utils.getPointYearMonthWeeksRange)(year, month);
|
|
41
|
+
|
|
42
|
+
if (range) {
|
|
43
|
+
return range.map(function (item, i) {
|
|
44
|
+
return /*#__PURE__*/_react["default"].createElement("tr", {
|
|
45
|
+
key: i,
|
|
46
|
+
className: (0, _classnames["default"])("".concat(preCls, "__week"), _defineProperty({}, "".concat(preCls, "__week--select"), currentWeek === i + 1 && parseInt(year) == currentYear && parseInt(month) == currentMonth))
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
48
|
+
onClick: function onClick() {
|
|
49
|
+
if (onSelect) {
|
|
50
|
+
onSelect("".concat(year, "/").concat(item.startTime, "~").concat(year, "/").concat(item.endTime), 'week', year);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
className: "".concat(preCls, "__week-box")
|
|
54
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
55
|
+
className: "".concat(preCls, "__week-index")
|
|
56
|
+
}, (0, _constant.getWeekly)()[i]), "".concat(item.startTime, "~").concat(item.endTime)));
|
|
57
|
+
});
|
|
58
|
+
} else {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
64
|
+
className: (0, _classnames["default"])(_utils2.PickerBodyClass)
|
|
65
|
+
}, /*#__PURE__*/_react["default"].createElement("table", {
|
|
66
|
+
className: (0, _classnames["default"])("".concat(_utils2.PickerClass, "-content"))
|
|
67
|
+
}, /*#__PURE__*/_react["default"].createElement("tbody", null, getCells((0, _moment["default"])(viewDate)))));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var _default = WeekPanelBody;
|
|
71
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
|
|
12
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../../../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
var _utils = require("../../../utils");
|
|
17
|
+
|
|
18
|
+
require("./index.css");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
function DatePanelHead(props) {
|
|
23
|
+
var viewDate = props.viewDate,
|
|
24
|
+
onPrev = props.onPrev,
|
|
25
|
+
onNext = props.onNext,
|
|
26
|
+
onPanelChange = props.onPanelChange;
|
|
27
|
+
var yearText = parseInt((0, _moment["default"])(viewDate).format('YYYY'));
|
|
28
|
+
var monthText = parseInt((0, _moment["default"])(viewDate).format('MM'));
|
|
29
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
30
|
+
className: (0, _classnames["default"])(_utils.PickerHeadClass)
|
|
31
|
+
}, !_getLocale.isEn && /*#__PURE__*/_react["default"].createElement("div", {
|
|
32
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "__view"))
|
|
33
|
+
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
34
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
35
|
+
onClick: function onClick() {
|
|
36
|
+
return onPanelChange && onPanelChange(viewDate, 'year');
|
|
37
|
+
},
|
|
38
|
+
type: "button"
|
|
39
|
+
}, yearText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
40
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerClass, "-unit"))
|
|
41
|
+
}, "\xA0\u5E74"), /*#__PURE__*/_react["default"].createElement("button", {
|
|
42
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
43
|
+
onClick: function onClick() {
|
|
44
|
+
return onPanelChange && onPanelChange(viewDate, 'month');
|
|
45
|
+
},
|
|
46
|
+
type: "button"
|
|
47
|
+
}, monthText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
48
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerClass, "-unit"))
|
|
49
|
+
}, "\u6708")), _getLocale.isEn && /*#__PURE__*/_react["default"].createElement("div", {
|
|
50
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "__view"))
|
|
51
|
+
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
52
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
53
|
+
onClick: function onClick() {
|
|
54
|
+
return onPanelChange && onPanelChange(viewDate, 'month');
|
|
55
|
+
},
|
|
56
|
+
style: {
|
|
57
|
+
marginRight: 4
|
|
58
|
+
},
|
|
59
|
+
type: "button"
|
|
60
|
+
}, _utils.MONTHDATAMAPEN[Number(monthText) - 1]), /*#__PURE__*/_react["default"].createElement("button", {
|
|
61
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
62
|
+
onClick: function onClick() {
|
|
63
|
+
return onPanelChange && onPanelChange(viewDate, 'year');
|
|
64
|
+
},
|
|
65
|
+
type: "button"
|
|
66
|
+
}, yearText)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
67
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "__operation"))
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
69
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__prev"), 'tu-icon-arrow-up1'),
|
|
70
|
+
onClick: onPrev,
|
|
71
|
+
type: "button"
|
|
72
|
+
}), /*#__PURE__*/_react["default"].createElement("button", {
|
|
73
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__next"), 'tu-icon-arrow-down1'),
|
|
74
|
+
onClick: onNext,
|
|
75
|
+
type: "button"
|
|
76
|
+
})));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var _default = DatePanelHead;
|
|
80
|
+
exports["default"] = _default;
|