@titaui/pc 1.12.14 → 1.12.17-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/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/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/communication/index.js +6 -0
- 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 +332 -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/index.css +14 -5
- package/lib/components/drawer/index.js +5 -2
- 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 +152 -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 +222 -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 +170 -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-assessment/index.js +1 -1
- 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 +267 -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 +27 -6
- package/lib/components/dynamic/dynamic-list/index.js +22 -5
- package/lib/components/form/form-fields/date/index.js +8 -7
- package/lib/components/help-card/image/liaojie1.svg +50 -0
- package/lib/components/help-card/index.css +4 -4
- 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 +269 -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/appraisal-menus/index.js +32 -14
- package/lib/components/menus/export-modules/appraisal-menus/menu-highlight.js +22 -6
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +148 -47
- package/lib/components/menus/export-modules/interview-menus/constant.js +12 -12
- package/lib/components/menus/export-modules/okr-menus/index.js +6 -6
- package/lib/components/menus/export-modules/okr-menus/menus.js +64 -61
- package/lib/components/menus/export-modules/okr-menus/okr-front-menus.js +2 -2
- package/lib/components/menus/export-modules/summary-menus/depart-menus/helper.js +56 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.css +32 -0
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +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/app-center/images/chart.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/file.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/interview.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/learning.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/okr.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/performance.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/plan.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/project.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/summary.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/yuyue.png +0 -0
- package/lib/components/nav-top/components/app-center/index.css +170 -0
- package/lib/components/nav-top/components/app-center/index.js +211 -0
- package/lib/components/nav-top/components/app-center/interface.js +19 -0
- package/lib/components/nav-top/components/menu/index.js +13 -13
- package/lib/components/nav-top/components/user-message/images/bell-1.svg +13 -0
- package/lib/components/nav-top/components/user-message/index.js +2 -2
- package/lib/components/nav-top/images/app-center.png +0 -0
- package/lib/components/nav-top/images/home.svg +16 -0
- package/lib/components/nav-top/index.css +61 -8
- package/lib/components/nav-top/index.js +74 -53
- package/lib/components/nav-top/utils.js +464 -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/components/header/o-avatar.js +12 -6
- package/lib/components/okr-flow/export-modal/color.png +0 -0
- package/lib/components/okr-flow/export-modal/index.css +28 -13
- package/lib/components/okr-flow/export-modal/index.js +82 -34
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- package/lib/components/order-have-award/img/award.png +0 -0
- package/lib/components/order-have-award/index.css +5 -0
- package/lib/components/order-have-award/index.js +83 -0
- package/lib/components/order-have-award/interface.js +19 -0
- package/lib/components/period-selector/components/button/style.js +6 -6
- package/lib/components/period-selector/index.css +1 -0
- package/lib/components/period-selector/index.js +7 -2
- package/lib/components/picker/components/cross.svg +17 -0
- package/lib/components/picker/components/panels/date-panel/date-body.js +31 -19
- package/lib/components/picker/components/panels/date-panel/date-head.js +8 -8
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.css +5 -0
- package/lib/components/picker/components/panels/month-panel/index.js +34 -4
- package/lib/components/picker/components/panels/month-panel/month-body.js +4 -5
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/week-panel/index.css +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 +16 -11
- package/lib/components/picker/context.js +17 -2
- package/lib/components/picker/index.css +29 -1
- package/lib/components/picker/index.js +3 -0
- package/lib/components/picker/picker-panels.js +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-layer/index.js +22 -8
- package/lib/components/select-tags/index.js +7 -1
- package/lib/components/task-relation-modal/helper.js +7 -62
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +1 -4
- package/lib/components/task-relation-modal/okr-relation/request-api.js +2 -6
- package/lib/components/task-relation-modal/request-api.js +14 -11
- package/lib/components/task-relation-modal/tree/work-tree/index.js +27 -31
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +26 -7
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +16 -16
- package/lib/components/textarea/index.js +7 -5
- package/lib/components/tooltip/tooltip.js +10 -5
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +11 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +21 -3
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +4 -4
- package/lib/components/user-selector/request-apis.js +52 -22
- package/lib/components/user-selector/searched-panel/index.js +7 -1
- 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 +56 -0
- package/lib/pages/aha2021/index.css +7 -0
- package/lib/pages/aha2021/index.js +17 -11
- package/lib/pages/aha2021/new-menu-switcher/index.css +44 -0
- package/lib/pages/aha2021/new-menu-switcher/index.js +85 -0
- package/lib/pages/aha2021/new-menu-switcher/new-menu-bg.png +0 -0
- package/lib/pages/aha2021/request-api.js +15 -0
- package/lib/pages/okr-map/level2-search/user.js +1 -0
- 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/planDataJson.js +1 -11115
- package/package.json +2 -1
|
@@ -21,6 +21,10 @@ var _toast = _interopRequireDefault(require("../../toast"));
|
|
|
21
21
|
|
|
22
22
|
var _dialog = _interopRequireDefault(require("../../dialog"));
|
|
23
23
|
|
|
24
|
+
var _tooltip = _interopRequireDefault(require("../../tooltip"));
|
|
25
|
+
|
|
26
|
+
var _selectLayer = _interopRequireDefault(require("../../select-layer"));
|
|
27
|
+
|
|
24
28
|
var _utils = require("../utils");
|
|
25
29
|
|
|
26
30
|
var _context2 = require("../context");
|
|
@@ -101,8 +105,25 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
101
105
|
isExport = _useState6[0],
|
|
102
106
|
setIsExport = _useState6[1];
|
|
103
107
|
|
|
108
|
+
var _useState7 = (0, _react.useState)({
|
|
109
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_HDmode'),
|
|
110
|
+
value: 20
|
|
111
|
+
}),
|
|
112
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
113
|
+
model = _useState8[0],
|
|
114
|
+
setModel = _useState8[1];
|
|
115
|
+
|
|
104
116
|
var modalRef = (0, _react.useRef)();
|
|
105
117
|
var virtualElements = (0, _react.useRef)([]);
|
|
118
|
+
var models = [{
|
|
119
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_Standardmode'),
|
|
120
|
+
value: 10,
|
|
121
|
+
toolText: (0, _getLocale.getLocale)('Rep_NewS_SmallFileSuita')
|
|
122
|
+
}, {
|
|
123
|
+
label: (0, _getLocale.getLocale)('Rep_NewS_HDmode'),
|
|
124
|
+
value: 20,
|
|
125
|
+
toolText: (0, _getLocale.getLocale)('Rep_NewS_LargeileSize')
|
|
126
|
+
}];
|
|
106
127
|
(0, _react.useEffect)(function () {
|
|
107
128
|
if ((0, _bsGlobal.isWx)() && window.WWOpenData) {
|
|
108
129
|
if (window.WWOpenData.enableCanvasSharing) {
|
|
@@ -134,7 +155,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
134
155
|
|
|
135
156
|
canvas = document.createElement('canvas'); // 创建一个canvas节点
|
|
136
157
|
|
|
137
|
-
scale =
|
|
158
|
+
scale = model.value; // 定义任意放大倍数 支持小数
|
|
138
159
|
|
|
139
160
|
canvas.width = width * scale; // 定义canvas 宽度 * 缩放
|
|
140
161
|
|
|
@@ -211,41 +232,29 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
211
232
|
scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
|
|
212
233
|
});
|
|
213
234
|
(0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
|
|
214
|
-
|
|
235
|
+
// const image = new Image()
|
|
236
|
+
// @ts-ignore
|
|
215
237
|
// window.titaTracker && window.titaTracker("action").record({
|
|
216
238
|
// actionName: userId+'租户:'+telentId+'我获得了地址'+url.Data.obj,
|
|
217
239
|
// actionGroup: 'okr地图接口',
|
|
218
240
|
// productName: 'okr地图导出',
|
|
219
241
|
// });
|
|
220
|
-
|
|
221
242
|
Sentry.withScope(function (scope) {
|
|
222
243
|
scope.setTag('error-level', "P0");
|
|
223
244
|
scope.setTag('error-type', '地图导出-图片地址');
|
|
224
245
|
scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
|
|
225
246
|
});
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
var a = document.createElement('a'); // 生成一个a元素
|
|
241
|
-
|
|
242
|
-
var event = new MouseEvent('click'); // 创建一个单击事件
|
|
243
|
-
|
|
244
|
-
a.download = 'okr地图'; // 设置图片名称
|
|
245
|
-
|
|
246
|
-
a.href = url.Data.obj; // 将生成的URL设置为a
|
|
247
|
-
|
|
248
|
-
a.dispatchEvent(event); // 触发a的单击事件
|
|
247
|
+
var newUrl = url.Data.obj;
|
|
248
|
+
var x = new XMLHttpRequest();
|
|
249
|
+
x.open('GET', newUrl, true);
|
|
250
|
+
x.responseType = 'blob';
|
|
251
|
+
|
|
252
|
+
x.onload = function (e) {
|
|
253
|
+
var url = window.URL.createObjectURL(x.response);
|
|
254
|
+
var a = document.createElement('a');
|
|
255
|
+
a.href = url;
|
|
256
|
+
a.download = model.value === 20 ? '高清图片' : '标清图片';
|
|
257
|
+
a.click();
|
|
249
258
|
|
|
250
259
|
_toast["default"].Success('导出成功');
|
|
251
260
|
|
|
@@ -256,7 +265,24 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
256
265
|
}
|
|
257
266
|
};
|
|
258
267
|
|
|
259
|
-
image.
|
|
268
|
+
x.send(); // image.setAttribute('crossOrigin', 'anonymous')
|
|
269
|
+
// image.onload = async() => {
|
|
270
|
+
// if (!url.Data.obj) {
|
|
271
|
+
// Toast.Error('导出失败,请稍后重试', { canClose: false })
|
|
272
|
+
// }
|
|
273
|
+
// await downloadFile(url.Data.obj,model.value===20?'高清分享图片':'标准分享图片')
|
|
274
|
+
// // const a = document.createElement('a') // 生成一个a元素
|
|
275
|
+
// // const event = new MouseEvent('click') // 创建一个单击事件
|
|
276
|
+
// // a.download = '123' // 设置图片名称
|
|
277
|
+
// // a.href = url.Data.obj // 将生成的URL设置为a
|
|
278
|
+
// // a.dispatchEvent(event) // 触发a的单击事件
|
|
279
|
+
// Toast.Success('导出成功')
|
|
280
|
+
// setIsExport(false)
|
|
281
|
+
// if (onCloseHandler) {
|
|
282
|
+
// onCloseHandler()
|
|
283
|
+
// }
|
|
284
|
+
// }
|
|
285
|
+
// image.src = imgUrl
|
|
260
286
|
});
|
|
261
287
|
})["catch"](function (err) {
|
|
262
288
|
setIsExport(false);
|
|
@@ -296,6 +322,10 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
296
322
|
setMapInstance(instance);
|
|
297
323
|
};
|
|
298
324
|
|
|
325
|
+
var onChangeHandler = function onChangeHandler(data) {
|
|
326
|
+
setModel(data);
|
|
327
|
+
};
|
|
328
|
+
|
|
299
329
|
var colorChangeHandler = function colorChangeHandler(colors) {
|
|
300
330
|
setBgColor(colors ? colors.color : 'none');
|
|
301
331
|
};
|
|
@@ -317,7 +347,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
317
347
|
title: (0, _getLocale.getLocale)('OKR_Ali_Exportmap'),
|
|
318
348
|
noFooterLine: true,
|
|
319
349
|
visible: visible,
|
|
320
|
-
width: "
|
|
350
|
+
width: "840px",
|
|
321
351
|
onClose: onCloseHandler,
|
|
322
352
|
onOk: confirmHandler,
|
|
323
353
|
onCancel: onCloseHandler,
|
|
@@ -327,9 +357,11 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
327
357
|
forceRender: true
|
|
328
358
|
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
329
359
|
className: "export-map-modal__setting"
|
|
360
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
361
|
+
className: "export-map-modal__setting-color"
|
|
330
362
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
331
363
|
style: {
|
|
332
|
-
marginRight:
|
|
364
|
+
marginRight: 16
|
|
333
365
|
}
|
|
334
366
|
}, (0, _getLocale.getLocale)('OKR_Ali_Selectbackground')), /*#__PURE__*/_react["default"].createElement(_rcColorPicker["default"], {
|
|
335
367
|
animation: "slide-up",
|
|
@@ -337,12 +369,28 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
337
369
|
onChange: colorChangeHandler,
|
|
338
370
|
className: "titaui-color-picker",
|
|
339
371
|
mode: "HSB"
|
|
372
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
373
|
+
overlay: (0, _getLocale.getLocale)('Mod_Customization'),
|
|
374
|
+
placement: "top"
|
|
340
375
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
341
|
-
className: "export-map-
|
|
342
|
-
})), /*#__PURE__*/_react["default"].createElement("
|
|
343
|
-
|
|
376
|
+
className: "export-map-modal__setting-color-trigger"
|
|
377
|
+
}))), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
378
|
+
overlay: (0, _getLocale.getLocale)('OKR_Ali_Butt_Transparent'),
|
|
379
|
+
placement: "top"
|
|
380
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
381
|
+
className: "export-map-modal__setting-color-trans",
|
|
344
382
|
onClick: colorChangeHandler
|
|
345
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
|
383
|
+
}))), /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
|
|
384
|
+
onChangeSelect: onChangeHandler,
|
|
385
|
+
items: models,
|
|
386
|
+
initValue: model.value
|
|
387
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
388
|
+
className: "titaui-search-dropdown"
|
|
389
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
390
|
+
className: "titaui-search-dropdown__text"
|
|
391
|
+
}, model.label), /*#__PURE__*/_react["default"].createElement("span", {
|
|
392
|
+
className: "tu-icon-sort-down"
|
|
393
|
+
})))), /*#__PURE__*/_react["default"].createElement("div", null, visible && /*#__PURE__*/_react["default"].createElement(_context2.CommonContext.Provider, {
|
|
346
394
|
value: {
|
|
347
395
|
direction: direction,
|
|
348
396
|
showkr: showkr,
|
|
@@ -361,7 +409,7 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
361
409
|
zoomOnDoubleClick: false,
|
|
362
410
|
paneMoveable: false,
|
|
363
411
|
style: {
|
|
364
|
-
height:
|
|
412
|
+
height: 446,
|
|
365
413
|
width: '100%',
|
|
366
414
|
background: bgColor
|
|
367
415
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _bookDemo = _interopRequireDefault(require("../book-demo"));
|
|
15
|
+
|
|
16
|
+
var _interface = require("./interface");
|
|
17
|
+
|
|
18
|
+
var _errorBoundary = _interopRequireDefault(require("../error-boundary"));
|
|
19
|
+
|
|
20
|
+
var _errorLevel = _interopRequireDefault(require("../../utils/error-level"));
|
|
21
|
+
|
|
22
|
+
var _award = _interopRequireDefault(require("./img/award.png"));
|
|
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
|
+
var preCls = 'order-have-award';
|
|
33
|
+
|
|
34
|
+
var OrderAward = function OrderAward() {
|
|
35
|
+
var bookDemoRef = (0, _react.useRef)();
|
|
36
|
+
|
|
37
|
+
var getBookDemoVersion = function getBookDemoVersion() {
|
|
38
|
+
var menuVersion = window.BSGlobal.tenantAuthentication.MenuVersion;
|
|
39
|
+
|
|
40
|
+
if (menuVersion === _interface.ETrialVersion.OKR) {
|
|
41
|
+
return _bookDemo["default"].DemoType.TryOKR;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (menuVersion === _interface.ETrialVersion.Performance) {
|
|
45
|
+
return _bookDemo["default"].DemoType.TryPerformance;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return _bookDemo["default"].DemoType.UniversalBookDemo;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var handlePoint = function handlePoint() {
|
|
52
|
+
if (bookDemoRef.current) {
|
|
53
|
+
bookDemoRef.current.show();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (window.titaTracker) {
|
|
57
|
+
window.titaTracker('action').record({
|
|
58
|
+
actionName: '申请演示',
|
|
59
|
+
actionGroup: '试用版-申请演示',
|
|
60
|
+
productName: '系统内-申请演示'
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
66
|
+
className: (0, _classnames["default"])('order-have-award'),
|
|
67
|
+
onClick: handlePoint
|
|
68
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
69
|
+
className: (0, _classnames["default"])("".concat(preCls, "__img")),
|
|
70
|
+
src: _award["default"],
|
|
71
|
+
alt: "\u9884\u7EA6\u6709\u5956"
|
|
72
|
+
})), /*#__PURE__*/_react["default"].createElement(_errorBoundary["default"], {
|
|
73
|
+
errorLevel: _errorLevel["default"].P0,
|
|
74
|
+
errorTag: "\u7533\u8BF7\u9884\u7EA6\u6F14\u793A\u5F02\u5E38"
|
|
75
|
+
}, /*#__PURE__*/_react["default"].createElement(_bookDemo["default"].BookDemoPC, {
|
|
76
|
+
visible: false,
|
|
77
|
+
ref: bookDemoRef,
|
|
78
|
+
type: getBookDemoVersion()
|
|
79
|
+
})));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var _default = OrderAward;
|
|
83
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.ETrialVersion = void 0;
|
|
7
|
+
var ETrialVersion;
|
|
8
|
+
exports.ETrialVersion = ETrialVersion;
|
|
9
|
+
|
|
10
|
+
(function (ETrialVersion) {
|
|
11
|
+
ETrialVersion[ETrialVersion["OKR"] = 9] = "OKR";
|
|
12
|
+
ETrialVersion[ETrialVersion["Performance"] = 8] = "Performance";
|
|
13
|
+
ETrialVersion[ETrialVersion["Pro"] = 6] = "Pro";
|
|
14
|
+
})(ETrialVersion || (exports.ETrialVersion = ETrialVersion = {}));
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
ETrialVersion: ETrialVersion
|
|
18
|
+
};
|
|
19
|
+
exports["default"] = _default;
|
|
@@ -13,21 +13,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
13
13
|
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
|
|
16
|
-
var DefaultWrapper = _styledComponents["default"].button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: inline-flex;\n\n align-items: center;\n justify-content: center;\n color: #6f7886;\n cursor: pointer;\n outline: none;\n transition: color 0.3s ease, border 0.3s ease;\n background: transparent;\n border-radius: 3px;\n border: 1px solid #e9ecf0;\n &.btn-size-m {\n min-width: 90px;\n height: 36px;\n padding: 0 18px;\n font-size: 14px;\n font-weight: 400;\n }\n &.btn-size-s {\n min-width: 68px;\n height: 26px;\n padding: 0 20px;\n font-size: 13px;\n font-weight: 400;\n }\n :hover {\n color: #2879ff;\n border-color: #2879ff;\n }\n :disabled {\n cursor: not-allowed;\n background-color: #f0f2f5;\n color: #a4acb9;\n border: none;\n :hover {\n border: none;\n color: #bfc7d5;\n opacity: 1;\n background-color: #f0f2f5;\n }\n }\n"])));
|
|
16
|
+
var DefaultWrapper = _styledComponents["default"].button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: inline-flex;\n\n align-items: center;\n justify-content: center;\n color: #6f7886;\n cursor: pointer;\n outline: none;\n transition: color 0.3s ease, border 0.3s ease;\n background: transparent;\n border-radius: 3px;\n border: 1px solid #e9ecf0;\n &.btn-size-m {\n min-width: 90px;\n height: 36px;\n border-radius: 18px;\n padding: 0 18px;\n font-size: 14px;\n font-weight: 400;\n }\n &.btn-size-s {\n min-width: 68px;\n height: 26px;\n padding: 0 20px;\n font-size: 13px;\n font-weight: 400;\n }\n :hover {\n color: #2879ff;\n border-color: #2879ff;\n }\n :disabled {\n cursor: not-allowed;\n background-color: #f0f2f5;\n color: #a4acb9;\n border: none;\n :hover {\n border: none;\n color: #bfc7d5;\n opacity: 1;\n background-color: #f0f2f5;\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.DefaultWrapper = DefaultWrapper;
|
|
19
19
|
var PrimaryWrapper = (0, _styledComponents["default"])(DefaultWrapper)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: #ffffff;\n background: #2879ff;\n border: none;\n :hover {\n color: #ffffff;\n background-color: #5c8eff;\n border: none;\n }\n"])));
|
|
20
20
|
exports.PrimaryWrapper = PrimaryWrapper;
|
|
21
21
|
var BorderWrapper = (0, _styledComponents["default"])(DefaultWrapper)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background: transparent;\n border: 1px solid ", ";\n :hover {\n background: ", ";\n color: ", ";\n border-color: ", ";\n }\n"])), function (p) {
|
|
22
|
-
return p.theme ==
|
|
22
|
+
return p.theme == 'danger' ? '#F05E5E' : '#2879ff';
|
|
23
23
|
}, function (p) {
|
|
24
|
-
return p.theme ==
|
|
24
|
+
return p.theme == 'danger' ? '#F05E5E' : '#2879ff';
|
|
25
25
|
}, function (p) {
|
|
26
|
-
return p.theme ==
|
|
26
|
+
return p.theme == 'danger' ? 'rgba(240,94,94,.1)' : '#e9f1ff';
|
|
27
27
|
}, function (p) {
|
|
28
|
-
return p.theme ==
|
|
28
|
+
return p.theme == 'danger' ? '#F05E5E' : '#2879ff';
|
|
29
29
|
}, function (p) {
|
|
30
|
-
return p.theme ==
|
|
30
|
+
return p.theme == 'danger' ? '#F05E5E' : '#2879ff';
|
|
31
31
|
});
|
|
32
32
|
exports.BorderWrapper = BorderWrapper;
|
|
33
33
|
|
|
@@ -52,9 +52,12 @@ function PeriodSelector(_ref) {
|
|
|
52
52
|
onChange = _ref.onChange,
|
|
53
53
|
getPopupContainer = _ref.getPopupContainer,
|
|
54
54
|
selected = _ref.selected,
|
|
55
|
+
lastSelected = _ref.lastSelected,
|
|
55
56
|
selectorClass = _ref.selectorClass,
|
|
56
57
|
_ref$showCustom = _ref.showCustom,
|
|
57
58
|
showCustom = _ref$showCustom === void 0 ? true : _ref$showCustom,
|
|
59
|
+
_ref$isShowCustom = _ref.isShowCustom,
|
|
60
|
+
isShowCustom = _ref$isShowCustom === void 0 ? true : _ref$isShowCustom,
|
|
58
61
|
_ref$showFullCycle = _ref.showFullCycle,
|
|
59
62
|
showFullCycle = _ref$showFullCycle === void 0 ? true : _ref$showFullCycle,
|
|
60
63
|
_ref$showMonth = _ref.showMonth,
|
|
@@ -110,6 +113,8 @@ function PeriodSelector(_ref) {
|
|
|
110
113
|
(0, _react.useEffect)(function () {
|
|
111
114
|
if (selected) {
|
|
112
115
|
setSelectedPeriod(selected);
|
|
116
|
+
} else if (lastSelected) {
|
|
117
|
+
setSelectedPeriod(lastSelected);
|
|
113
118
|
}
|
|
114
119
|
}, []);
|
|
115
120
|
(0, _react.useEffect)(function () {
|
|
@@ -124,7 +129,7 @@ function PeriodSelector(_ref) {
|
|
|
124
129
|
|
|
125
130
|
if (selected) {
|
|
126
131
|
setSelectedPeriod(selected);
|
|
127
|
-
} else {
|
|
132
|
+
} else if (lastSelected) {} else {
|
|
128
133
|
setSelectedPeriod((0, _common.getDefalutCycle)(res.Data));
|
|
129
134
|
onChange && onChange((0, _common.getDefalutCycle)(res.Data));
|
|
130
135
|
}
|
|
@@ -143,7 +148,7 @@ function PeriodSelector(_ref) {
|
|
|
143
148
|
var popup = /*#__PURE__*/_react["default"].createElement(_selector["default"], {
|
|
144
149
|
className: selectorClass,
|
|
145
150
|
selected: selectedPeriod,
|
|
146
|
-
showCustom: isFetch ? cycleSetting.isOpenCustom : showCustom,
|
|
151
|
+
showCustom: isShowCustom ? isFetch ? cycleSetting.isOpenCustom : showCustom : isShowCustom,
|
|
147
152
|
showFullCycle: showFullCycle,
|
|
148
153
|
showMonth: isFetch ? cycleSetting.isOpenMonth : showMonth,
|
|
149
154
|
showQuarter: isFetch ? cycleSetting.isOpenQuarter : showQuarter,
|
|
@@ -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>
|
|
@@ -35,13 +35,14 @@ var DATE_ROW_NUM = 6;
|
|
|
35
35
|
var DatePanelBody = function DatePanelBody(props) {
|
|
36
36
|
var viewDate = props.viewDate,
|
|
37
37
|
_props$weekStartDay = props.weekStartDay,
|
|
38
|
-
weekStartDay = _props$weekStartDay === void 0 ?
|
|
38
|
+
weekStartDay = _props$weekStartDay === void 0 ? 'SUNDAY' : _props$weekStartDay,
|
|
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
|
-
var weekStartDaySun = weekStartDay ===
|
|
45
|
+
var weekStartDaySun = weekStartDay === 'SUNDAY';
|
|
45
46
|
|
|
46
47
|
var getCells = function getCells(sunday, currentMonth) {
|
|
47
48
|
var dates = [];
|
|
@@ -49,16 +50,27 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
49
50
|
var _loop = function _loop(day) {
|
|
50
51
|
var _classNames;
|
|
51
52
|
|
|
52
|
-
var date = (0, _moment["default"])(sunday).add(day,
|
|
53
|
-
|
|
53
|
+
var date = (0, _moment["default"])(sunday).add(day, 'd');
|
|
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
|
-
key: date.format(
|
|
68
|
+
key: date.format('YYYY/MM/DD')
|
|
57
69
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
70
|
className: (0, _classnames["default"])("".concat(_utils.PickerCellClass, "__inner")),
|
|
59
|
-
title: date.format(
|
|
71
|
+
title: date.format('YYYY-MM-DD'),
|
|
60
72
|
onClick: function onClick() {
|
|
61
|
-
return onSelect && onSelect(date,
|
|
73
|
+
return onSelect && onSelect(date, 'date');
|
|
62
74
|
}
|
|
63
75
|
}, date.date())));
|
|
64
76
|
};
|
|
@@ -73,16 +85,16 @@ 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
|
-
var weekStartDay = monthFirstDay.subtract(monthFirstDay.day() - daysDiff,
|
|
90
|
+
var weekStartDay = monthFirstDay.subtract(monthFirstDay.day() - daysDiff, 'days');
|
|
79
91
|
var rows = [];
|
|
80
92
|
|
|
81
93
|
for (var row = 0; row < DATE_ROW_NUM; row += 1) {
|
|
82
94
|
rows.push( /*#__PURE__*/_react["default"].createElement("tr", {
|
|
83
95
|
key: row
|
|
84
96
|
}, getCells(weekStartDay, currentMonth)));
|
|
85
|
-
weekStartDay = weekStartDay.add(1,
|
|
97
|
+
weekStartDay = weekStartDay.add(1, 'w');
|
|
86
98
|
}
|
|
87
99
|
|
|
88
100
|
return rows;
|
|
@@ -94,25 +106,25 @@ var DatePanelBody = function DatePanelBody(props) {
|
|
|
94
106
|
className: (0, _classnames["default"])("".concat(_utils.PickerClass, "-content"))
|
|
95
107
|
}, /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", null, weekStartDaySun && /*#__PURE__*/_react["default"].createElement("th", {
|
|
96
108
|
className: _utils.PickerCellClass
|
|
97
|
-
}, (0, _getLocale.getLocale)(
|
|
109
|
+
}, (0, _getLocale.getLocale)('Mod_Sun')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
98
110
|
className: _utils.PickerCellClass
|
|
99
|
-
}, (0, _getLocale.getLocale)(
|
|
111
|
+
}, (0, _getLocale.getLocale)('Mod_Mon')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
100
112
|
className: _utils.PickerCellClass
|
|
101
|
-
}, (0, _getLocale.getLocale)(
|
|
113
|
+
}, (0, _getLocale.getLocale)('Mod_Tues')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
102
114
|
className: _utils.PickerCellClass
|
|
103
|
-
}, (0, _getLocale.getLocale)(
|
|
115
|
+
}, (0, _getLocale.getLocale)('Mod_Wed')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
104
116
|
className: _utils.PickerCellClass
|
|
105
|
-
}, (0, _getLocale.getLocale)(
|
|
117
|
+
}, (0, _getLocale.getLocale)('Mod_Thur')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
106
118
|
className: _utils.PickerCellClass
|
|
107
|
-
}, (0, _getLocale.getLocale)(
|
|
119
|
+
}, (0, _getLocale.getLocale)('Mod_Fri')), /*#__PURE__*/_react["default"].createElement("th", {
|
|
108
120
|
className: _utils.PickerCellClass
|
|
109
|
-
}, (0, _getLocale.getLocale)(
|
|
121
|
+
}, (0, _getLocale.getLocale)('Mod_Sat')), weekStartDay !== 'SUNDAY' && /*#__PURE__*/_react["default"].createElement("th", {
|
|
110
122
|
className: _utils.PickerCellClass
|
|
111
|
-
}, (0, _getLocale.getLocale)(
|
|
123
|
+
}, (0, _getLocale.getLocale)('Mod_Sun')))), /*#__PURE__*/_react["default"].createElement("tbody", null, getRows((0, _moment["default"])(viewDate)))));
|
|
112
124
|
};
|
|
113
125
|
|
|
114
126
|
DatePanelBody.defaultProps = {
|
|
115
|
-
weekStartDay:
|
|
127
|
+
weekStartDay: 'SUNDAY'
|
|
116
128
|
};
|
|
117
129
|
var _default = DatePanelBody;
|
|
118
130
|
exports["default"] = _default;
|
|
@@ -25,8 +25,8 @@ function DatePanelHead(props) {
|
|
|
25
25
|
onPrev = props.onPrev,
|
|
26
26
|
onNext = props.onNext,
|
|
27
27
|
onPanelChange = props.onPanelChange;
|
|
28
|
-
var yearText = (0, _moment["default"])(viewDate).format(
|
|
29
|
-
var monthText = (0, _moment["default"])(viewDate).format(
|
|
28
|
+
var yearText = (0, _moment["default"])(viewDate).format('YYYY');
|
|
29
|
+
var monthText = (0, _moment["default"])(viewDate).format('MM');
|
|
30
30
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
31
|
className: (0, _classnames["default"])(_utils.PickerHeadClass)
|
|
32
32
|
}, !_getLocale.isEn && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -34,7 +34,7 @@ function DatePanelHead(props) {
|
|
|
34
34
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
35
35
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
36
36
|
onClick: function onClick() {
|
|
37
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
37
|
+
return onPanelChange && onPanelChange(viewDate, 'year');
|
|
38
38
|
},
|
|
39
39
|
type: "button"
|
|
40
40
|
}, yearText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -42,7 +42,7 @@ function DatePanelHead(props) {
|
|
|
42
42
|
}, "\xA0\u5E74"), /*#__PURE__*/_react["default"].createElement("button", {
|
|
43
43
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
44
44
|
onClick: function onClick() {
|
|
45
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
45
|
+
return onPanelChange && onPanelChange(viewDate, 'month');
|
|
46
46
|
},
|
|
47
47
|
type: "button"
|
|
48
48
|
}, monthText), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -52,7 +52,7 @@ function DatePanelHead(props) {
|
|
|
52
52
|
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
53
53
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__month")),
|
|
54
54
|
onClick: function onClick() {
|
|
55
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
55
|
+
return onPanelChange && onPanelChange(viewDate, 'month');
|
|
56
56
|
},
|
|
57
57
|
style: {
|
|
58
58
|
marginRight: 4
|
|
@@ -61,7 +61,7 @@ function DatePanelHead(props) {
|
|
|
61
61
|
}, _utils.MONTHDATAMAPEN[Number(monthText) - 1]), /*#__PURE__*/_react["default"].createElement("button", {
|
|
62
62
|
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__year")),
|
|
63
63
|
onClick: function onClick() {
|
|
64
|
-
return onPanelChange && onPanelChange(viewDate,
|
|
64
|
+
return onPanelChange && onPanelChange(viewDate, 'year');
|
|
65
65
|
},
|
|
66
66
|
type: "button"
|
|
67
67
|
}, yearText)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -70,14 +70,14 @@ function DatePanelHead(props) {
|
|
|
70
70
|
/*#__PURE__*/
|
|
71
71
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
72
72
|
_react["default"].createElement("button", {
|
|
73
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__prev"),
|
|
73
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__prev"), 'tu-icon-arrow-up1'),
|
|
74
74
|
onClick: onPrev,
|
|
75
75
|
type: "button"
|
|
76
76
|
}),
|
|
77
77
|
/*#__PURE__*/
|
|
78
78
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
79
79
|
_react["default"].createElement("button", {
|
|
80
|
-
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__next"),
|
|
80
|
+
className: (0, _classnames["default"])("".concat(_utils.PickerHeadClass, "-btn__next"), 'tu-icon-arrow-down1'),
|
|
81
81
|
onClick: onNext,
|
|
82
82
|
type: "button"
|
|
83
83
|
})));
|
|
@@ -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
|
|