@titaui/pc 1.12.65 → 1.12.66
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 +9 -0
- package/lib/components/attachments-preview/index.js +116 -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/avatar/default.js +5 -2
- package/lib/components/avatar/index.css +2 -0
- package/lib/components/color-date-picker/index.css +69 -0
- package/lib/components/color-date-picker/index.js +129 -0
- package/lib/components/color-date-picker/interface.js +14 -0
- package/lib/components/dialog-confirm/index.css +1 -0
- package/lib/components/dialog-confirm/index.js +8 -4
- 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 +80 -0
- package/lib/components/dialog-upload/uploaded-preview.js +134 -0
- package/lib/components/dialog-upload/util.js +131 -0
- package/lib/components/drawer/index.css +5 -5
- package/lib/components/drawer/index.js +7 -7
- package/lib/components/drop-selector/index.js +7 -4
- package/lib/components/dynamic/components/comments-dialog/api.js +27 -0
- package/lib/components/dynamic/components/comments-dialog/encourage.js +127 -0
- package/lib/components/dynamic/components/comments-dialog/img/APP-shoucang-m.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/ascore.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curEfforts.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curGood.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/curGreat.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/efforts.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/good.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/great.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/halfscore.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/loading.gif +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/score.png +0 -0
- package/lib/components/dynamic/components/comments-dialog/img/top.svg +14 -0
- package/lib/components/dynamic/components/comments-dialog/index.css +116 -0
- package/lib/components/dynamic/components/comments-dialog/index.js +208 -0
- package/lib/components/dynamic/components/comments-dialog/rate.js +143 -0
- package/lib/components/dynamic/constant.js +5 -1
- 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 +49 -47
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +31 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +217 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +176 -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 +27 -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 +36 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +31 -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/guide-img.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 +187 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +426 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +49 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +23 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +30 -0
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +57 -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 +67 -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 +29 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +310 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +193 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +22 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +80 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/request-api.js +16 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +158 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/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/come-on-write.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/nice-write.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/img/very-good-write.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +115 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +212 -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 +49 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +61 -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 +152 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +254 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +67 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +4 -21
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +3 -5
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/index.css +3 -2
- package/lib/components/dynamic/dynamic-item/index.js +52 -33
- package/lib/components/dynamic/dynamic-list/index.js +8 -8
- package/lib/components/form/form-fields/date/index.js +9 -8
- package/lib/components/guide-tip/index.css +68 -0
- package/lib/components/guide-tip/index.js +115 -0
- package/lib/components/import-modal/helper.js +170 -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 +146 -0
- package/lib/components/import-modal/import-task-modal/index.css +18 -0
- package/lib/components/import-modal/import-task-modal/index.js +251 -0
- package/lib/components/import-modal/import-task-modal/search-form.js +142 -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 +206 -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 +89 -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 +84 -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/menu-item.js +5 -1
- 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/components/search-colleague/index.js +3 -1
- package/lib/components/menus/export-modules/appraisal-menus/index.js +6 -6
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +69 -69
- package/lib/components/menus/export-modules/demo-menus/menus.js +5 -4
- 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 +60 -60
- 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 +243 -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 +251 -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 +250 -0
- package/lib/components/menus/i18n.js +8 -0
- package/lib/components/menus/index.js +6 -0
- package/lib/components/menus/request-apis.js +22 -2
- package/lib/components/nav-top/components/app-center/images/demo.png +0 -0
- package/lib/components/nav-top/components/app-center/images/new.svg +30 -0
- package/lib/components/nav-top/components/app-center/index.css +24 -1
- package/lib/components/nav-top/components/app-center/index.js +18 -10
- package/lib/components/nav-top/components/menu/index.css +11 -0
- package/lib/components/nav-top/components/menu/index.js +49 -53
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +28 -17
- package/lib/components/nav-top/components/user-message/index.js +19 -19
- package/lib/components/nav-top/index.css +5 -0
- package/lib/components/nav-top/index.js +39 -2
- 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 +120 -0
- package/lib/components/new-confidence/interface.js +5 -0
- package/lib/components/okr-detail/components/header/index.js +1 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +6 -6
- package/lib/components/okr-flow/export-modal/index.css +3 -3
- package/lib/components/okr-flow/export-modal/index.js +1 -1
- package/lib/components/okr-flow/okr-map/index.js +3 -1
- package/lib/components/order-have-award/index.js +6 -6
- package/lib/components/period-selector/components/button/style.js +5 -5
- 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 +35 -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 +51 -0
- package/lib/components/picker/components/panels/week-panel/index.js +63 -0
- package/lib/components/picker/components/panels/week-panel/utils.js +153 -0
- package/lib/components/picker/components/panels/week-panel/week-body.js +79 -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 +1 -1
- 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 +106 -60
- 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 +79 -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 +79 -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/ui/editor/index.css +32 -32
- package/lib/components/rich-editor/ui/editor/index.js +1 -1
- package/lib/components/rich-editor-at/components/index.css +67 -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 +12 -2
- package/lib/components/task-relation-modal/helper.js +6 -6
- package/lib/components/task-relation-modal/request-api.js +9 -9
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +4 -4
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +5 -5
- package/lib/components/textarea/index.css +61 -66
- package/lib/components/textarea/index.js +23 -18
- package/lib/components/toast/index.js +1 -1
- package/lib/components/tooltip/tooltip.js +2 -2
- package/lib/components/upvote/index.js +10 -4
- package/lib/components/upvote/selector.js +2 -3
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +1 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +1 -1
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +3 -3
- package/lib/components/user-selector/request-apis.js +13 -13
- package/lib/components/write-summary-modal/constants.js +21 -0
- package/lib/components/write-summary-modal/index.css +80 -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 +32 -0
- package/lib/components-v1/radio/style/index.css +1 -1
- package/lib/index.js +64 -0
- package/lib/pages/aha2021/new-menu-switcher/index.js +4 -4
- package/lib/pages/aha2021/request-api.js +1 -1
- package/lib/utils/auth.js +10 -0
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +14 -2
- package/lib/utils/helpers.js +112 -12
- package/lib/utils/open-data.js +41 -42
- package/lib/utils/planDataJson.js +1 -0
- package/package.json +3 -2
- package/lib/components/dynamic/img/dynamic-submit-delay.svg +0 -16
- package/lib/components/dynamic/img/dynamic-submit-normal.svg +0 -18
|
@@ -0,0 +1,254 @@
|
|
|
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 _richEditor = _interopRequireWildcard(require("@titaui/rich-editor"));
|
|
15
|
+
|
|
16
|
+
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
17
|
+
|
|
18
|
+
var _context = require("../../context");
|
|
19
|
+
|
|
20
|
+
var _summaryHeader = _interopRequireDefault(require("../components/summary-header"));
|
|
21
|
+
|
|
22
|
+
var _okrProgress = _interopRequireDefault(require("../components/okr-progress"));
|
|
23
|
+
|
|
24
|
+
var _taskProgress = _interopRequireDefault(require("../components/task-progress"));
|
|
25
|
+
|
|
26
|
+
var _tools = require("../../../../utils/tools");
|
|
27
|
+
|
|
28
|
+
var _title = _interopRequireDefault(require("../../components/title"));
|
|
29
|
+
|
|
30
|
+
var _remindUserView = _interopRequireDefault(require("./components/remind-user-view"));
|
|
31
|
+
|
|
32
|
+
var _evalute = _interopRequireDefault(require("./components/evalute"));
|
|
33
|
+
|
|
34
|
+
var _richEditorUpload = _interopRequireDefault(require("../../../rich-editor-upload"));
|
|
35
|
+
|
|
36
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
37
|
+
|
|
38
|
+
var _constant = require("./constant");
|
|
39
|
+
|
|
40
|
+
var _util = require("./util");
|
|
41
|
+
|
|
42
|
+
var _bsGlobal = require("../../../../utils/bs-global");
|
|
43
|
+
|
|
44
|
+
require("./index.css");
|
|
45
|
+
|
|
46
|
+
var _excluded = ["data"];
|
|
47
|
+
|
|
48
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
49
|
+
|
|
50
|
+
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); }
|
|
51
|
+
|
|
52
|
+
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; }
|
|
53
|
+
|
|
54
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
55
|
+
|
|
56
|
+
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; }
|
|
57
|
+
|
|
58
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
59
|
+
|
|
60
|
+
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."); }
|
|
61
|
+
|
|
62
|
+
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); }
|
|
63
|
+
|
|
64
|
+
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; }
|
|
65
|
+
|
|
66
|
+
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; }
|
|
67
|
+
|
|
68
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
69
|
+
|
|
70
|
+
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; }
|
|
71
|
+
|
|
72
|
+
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; }
|
|
73
|
+
|
|
74
|
+
var getEReportType = function getEReportType(type) {
|
|
75
|
+
var reportTextMap = {
|
|
76
|
+
8: (0, _getLocale.getLocale)("Rep_Tab_Dailynewspaper"),
|
|
77
|
+
26: (0, _getLocale.getLocale)("Rep_Tab_Weeklynewspaper"),
|
|
78
|
+
27: (0, _getLocale.getLocale)("Rep_Tab_MonthlyReport")
|
|
79
|
+
};
|
|
80
|
+
return reportTextMap[type];
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
var prefix = "titaui-dynamic-new-report-item";
|
|
84
|
+
var loginUserId = (0, _bsGlobal.getUserInfo)().Id;
|
|
85
|
+
|
|
86
|
+
var DynamicReply = function DynamicReply(_ref) {
|
|
87
|
+
var data = _ref.data,
|
|
88
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
89
|
+
|
|
90
|
+
var feedId = data.feedId,
|
|
91
|
+
submitState = data.submitState,
|
|
92
|
+
publishUser = data.publishUser,
|
|
93
|
+
reportType = data.reportType,
|
|
94
|
+
dailyContent = data.dailyContent,
|
|
95
|
+
atUsers = data.atUsers,
|
|
96
|
+
attachments = data.attachments,
|
|
97
|
+
evaluates = data.evaluates,
|
|
98
|
+
canEvaluate = data.canEvaluate;
|
|
99
|
+
var files = (0, _util.formatAttachments)(attachments);
|
|
100
|
+
|
|
101
|
+
var _useState = (0, _react.useState)(),
|
|
102
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
103
|
+
motionValue = _useState2[0],
|
|
104
|
+
setMotionValue = _useState2[1];
|
|
105
|
+
|
|
106
|
+
var _useState3 = (0, _react.useState)(false),
|
|
107
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
108
|
+
showDelete = _useState4[0],
|
|
109
|
+
setShowDelete = _useState4[1];
|
|
110
|
+
|
|
111
|
+
var _useState5 = (0, _react.useState)(false),
|
|
112
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
113
|
+
showEdit = _useState6[0],
|
|
114
|
+
setShowEdit = _useState6[1];
|
|
115
|
+
|
|
116
|
+
var contentRichTextRef = (0, _react.useRef)();
|
|
117
|
+
var workPlanRichTextRef = (0, _react.useRef)();
|
|
118
|
+
|
|
119
|
+
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
120
|
+
searchKeyWord = _useContext.searchKeyWord;
|
|
121
|
+
|
|
122
|
+
var _useState7 = (0, _react.useState)(evaluates || []),
|
|
123
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
124
|
+
currentEvalutes = _useState8[0],
|
|
125
|
+
setCurrentEvalutes = _useState8[1];
|
|
126
|
+
|
|
127
|
+
var renderSuffix = (0, _react.useMemo)(function () {
|
|
128
|
+
var _classNames;
|
|
129
|
+
|
|
130
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
131
|
+
className: (0, _classnames["default"])("".concat(prefix, "__complete-type"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "__complete-type--normal"), submitState === 1), _defineProperty(_classNames, "".concat(prefix, "__complete-type--delay"), submitState === 2), _classNames))
|
|
132
|
+
}, submitState === 1 && (0, _getLocale.getLocale)("Rep_Tab_Mys_Submitontime"), submitState === 2 && (0, _getLocale.getLocale)("Tasks_Tab_DelaSubmission"));
|
|
133
|
+
}, []);
|
|
134
|
+
var renderDesc = (0, _react.useMemo)(function () {
|
|
135
|
+
var reportTextMap = {
|
|
136
|
+
8: (0, _getLocale.getLocale)("Rep_Tab_Mys_Dailynewsp"),
|
|
137
|
+
26: (0, _getLocale.getLocale)("Rep_Tab_Mys_sweeklyReport"),
|
|
138
|
+
27: (0, _getLocale.getLocale)("Rep_Tab_Sub_monthlyeport")
|
|
139
|
+
};
|
|
140
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
141
|
+
className: "".concat(prefix, "__operate-desc")
|
|
142
|
+
}, reportTextMap[reportType]);
|
|
143
|
+
}, [reportType]);
|
|
144
|
+
(0, _react.useEffect)(function () {
|
|
145
|
+
setCurrentEvalutes(evaluates);
|
|
146
|
+
}, [evaluates]);
|
|
147
|
+
(0, _react.useEffect)(function () {
|
|
148
|
+
(0, _tools.highLightWord)({
|
|
149
|
+
parentDom: contentRichTextRef.current,
|
|
150
|
+
keyWord: searchKeyWord
|
|
151
|
+
});
|
|
152
|
+
(0, _tools.highLightWord)({
|
|
153
|
+
parentDom: workPlanRichTextRef.current,
|
|
154
|
+
keyWord: searchKeyWord
|
|
155
|
+
});
|
|
156
|
+
}, [data, searchKeyWord]);
|
|
157
|
+
(0, _react.useEffect)(function () {
|
|
158
|
+
if (dailyContent) {
|
|
159
|
+
var mindData = dailyContent.find(function (item) {
|
|
160
|
+
return item.contentType === 1;
|
|
161
|
+
});
|
|
162
|
+
if (!(mindData !== null && mindData !== void 0 && mindData.content)) return;
|
|
163
|
+
|
|
164
|
+
var motion = _constant.Motion.find(function (item) {
|
|
165
|
+
var _JSON$parse$SelectedV;
|
|
166
|
+
|
|
167
|
+
return item.id === (((_JSON$parse$SelectedV = JSON.parse(mindData.content || "{}").SelectedValues) === null || _JSON$parse$SelectedV === void 0 ? void 0 : _JSON$parse$SelectedV[0]) || 0);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
setMotionValue(motion);
|
|
171
|
+
}
|
|
172
|
+
}, [dailyContent]);
|
|
173
|
+
(0, _react.useEffect)(function () {
|
|
174
|
+
if (loginUserId === publishUser.userId) {
|
|
175
|
+
setShowDelete(true);
|
|
176
|
+
setShowEdit(true);
|
|
177
|
+
}
|
|
178
|
+
}, []);
|
|
179
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
180
|
+
className: prefix
|
|
181
|
+
}, /*#__PURE__*/_react["default"].createElement(_summaryHeader["default"], _extends({
|
|
182
|
+
data: data
|
|
183
|
+
}, restProps, {
|
|
184
|
+
desc: renderDesc,
|
|
185
|
+
user: publishUser,
|
|
186
|
+
suffixContent: renderSuffix,
|
|
187
|
+
showDelete: showDelete,
|
|
188
|
+
showEdit: showEdit,
|
|
189
|
+
canEvaluate: canEvaluate && !currentEvalutes,
|
|
190
|
+
setEvaluates: setCurrentEvalutes
|
|
191
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
192
|
+
className: "".concat(prefix, "__content")
|
|
193
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
194
|
+
className: "".concat(prefix, "__content-title")
|
|
195
|
+
}, /*#__PURE__*/_react["default"].createElement(_title["default"], {
|
|
196
|
+
content: (0, _tools.htmlDecodeByRegExp)(data.name),
|
|
197
|
+
type: getEReportType(reportType),
|
|
198
|
+
typeBgColor: "rgba(92, 142, 255, 0.5)",
|
|
199
|
+
titleBgColor: "rgba(92, 142, 255, 0.1)",
|
|
200
|
+
contentColor: "#5C8EFF"
|
|
201
|
+
}), (motionValue === null || motionValue === void 0 ? void 0 : motionValue.img) && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
202
|
+
overlay: motionValue.tips,
|
|
203
|
+
placement: "top",
|
|
204
|
+
align: {
|
|
205
|
+
offset: [0, 5]
|
|
206
|
+
}
|
|
207
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
208
|
+
src: motionValue.img,
|
|
209
|
+
className: "".concat(prefix, "__content-mind"),
|
|
210
|
+
alt: ""
|
|
211
|
+
}))), dailyContent.map(function (item) {
|
|
212
|
+
if (item.contentType === _constant.dailyContentType.richText) {
|
|
213
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, ((item === null || item === void 0 ? void 0 : item.content) || !(0, _util.isEmptyImage)(item === null || item === void 0 ? void 0 : item.richContent)) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
214
|
+
className: "".concat(prefix, "__work"),
|
|
215
|
+
key: item.richContent || Math.random()
|
|
216
|
+
}, item.title === "工作总结" ? (0, _getLocale.getLocale)('Tasks_Tab_MyS_JobSummary') : (0, _getLocale.getLocale)('Rep_Tab_Mys_NextWorkPlans'), /*#__PURE__*/_react["default"].createElement(_richEditor["default"], null, /*#__PURE__*/_react["default"].createElement(_richEditor.EditorComponent, {
|
|
217
|
+
editable: false,
|
|
218
|
+
initialState: !!item.richContent ? JSON.parse(item.richContent || '{}') : undefined,
|
|
219
|
+
placeholder: (0, _getLocale.getLocale)('Rep_NewS_Notfilled')
|
|
220
|
+
}))));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (item.contentType === _constant.dailyContentType.okr) {
|
|
224
|
+
return item.content && /*#__PURE__*/_react["default"].createElement(_okrProgress["default"], {
|
|
225
|
+
data: item.content,
|
|
226
|
+
reportType: data.reportType
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (item.contentType === _constant.dailyContentType.task) {
|
|
231
|
+
return item.content && /*#__PURE__*/_react["default"].createElement(_taskProgress["default"], {
|
|
232
|
+
data: item.content,
|
|
233
|
+
reportType: data.reportType
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}), files.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
237
|
+
className: "".concat(prefix, "__upload")
|
|
238
|
+
}, /*#__PURE__*/_react["default"].createElement(_richEditorUpload["default"], {
|
|
239
|
+
text: (0, _getLocale.getLocale)("Per_Ass_New_Err_Attachment"),
|
|
240
|
+
files: files,
|
|
241
|
+
editable: false,
|
|
242
|
+
enableDelete: false
|
|
243
|
+
})), /*#__PURE__*/_react["default"].createElement(_remindUserView["default"], {
|
|
244
|
+
data: atUsers
|
|
245
|
+
}), currentEvalutes && currentEvalutes.length !== 0 && /*#__PURE__*/_react["default"].createElement(_evalute["default"], {
|
|
246
|
+
evaluation: currentEvalutes[0],
|
|
247
|
+
feedId: feedId,
|
|
248
|
+
publishUser: publishUser,
|
|
249
|
+
canEvaluate: canEvaluate
|
|
250
|
+
})));
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
var _default = DynamicReply;
|
|
254
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isEmptyImage = exports.formatAttachments = void 0;
|
|
7
|
+
|
|
8
|
+
var firstLaterUpperCase = function firstLaterUpperCase(str) {
|
|
9
|
+
var temp = str.split("");
|
|
10
|
+
|
|
11
|
+
if (temp.length > 0) {
|
|
12
|
+
temp[0] = temp[0].toUpperCase();
|
|
13
|
+
return temp.join('');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return '';
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var formatAttachments = function formatAttachments(data) {
|
|
20
|
+
if (!data) return [];
|
|
21
|
+
return data.map(function (item) {
|
|
22
|
+
var tempObj = {};
|
|
23
|
+
Object.keys(item).forEach(function (key) {
|
|
24
|
+
tempObj[firstLaterUpperCase(key)] = item[key];
|
|
25
|
+
});
|
|
26
|
+
return tempObj;
|
|
27
|
+
});
|
|
28
|
+
}; // 获取富文本某个类型的内容
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
exports.formatAttachments = formatAttachments;
|
|
32
|
+
|
|
33
|
+
var getTypeContent = function getTypeContent(data, initType) {
|
|
34
|
+
var type = data.type,
|
|
35
|
+
content = data.content;
|
|
36
|
+
|
|
37
|
+
if (type === initType) {
|
|
38
|
+
return data;
|
|
39
|
+
} else {
|
|
40
|
+
if (content !== null && content !== void 0 && content.length) {
|
|
41
|
+
for (var i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
|
|
42
|
+
return getTypeContent(content[i], initType);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var isEmptyImage = function isEmptyImage(richText) {
|
|
51
|
+
if (!richText) return true;
|
|
52
|
+
richText = JSON.parse(richText || '{}');
|
|
53
|
+
var _richText = richText,
|
|
54
|
+
doc = _richText.doc;
|
|
55
|
+
var bol = true;
|
|
56
|
+
|
|
57
|
+
if (doc) {
|
|
58
|
+
var _imageData$attrs;
|
|
59
|
+
|
|
60
|
+
var imageData = getTypeContent(doc, 'image');
|
|
61
|
+
bol = !(imageData !== null && imageData !== void 0 && (_imageData$attrs = imageData.attrs) !== null && _imageData$attrs !== void 0 && _imageData$attrs.src);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return bol;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
exports.isEmptyImage = isEmptyImage;
|
|
@@ -53,7 +53,8 @@ var DynamicProject = function DynamicProject(_ref) {
|
|
|
53
53
|
workName = data.workName,
|
|
54
54
|
startDate = data.startDate,
|
|
55
55
|
deadline = data.deadline,
|
|
56
|
-
principalUser = data.principalUser
|
|
56
|
+
principalUser = data.principalUser,
|
|
57
|
+
publishUser = data.publishUser;
|
|
57
58
|
|
|
58
59
|
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
59
60
|
searchKeyWord = _useContext.searchKeyWord;
|
|
@@ -82,7 +83,7 @@ var DynamicProject = function DynamicProject(_ref) {
|
|
|
82
83
|
data: data
|
|
83
84
|
}, restProps, {
|
|
84
85
|
desc: renderDesc,
|
|
85
|
-
user: principalUser
|
|
86
|
+
user: principalUser || publishUser
|
|
86
87
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
88
|
className: "".concat(prefix, "__content")
|
|
88
89
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -105,25 +105,8 @@
|
|
|
105
105
|
font-size: 12px;
|
|
106
106
|
line-height: 18px;
|
|
107
107
|
margin-left: 8px;
|
|
108
|
-
border-radius:
|
|
109
|
-
padding:
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.titaui-dynamic-report-item__complete-type-icon {
|
|
113
|
-
margin-right: 4px;
|
|
114
|
-
display: inline-block;
|
|
115
|
-
width: 14px;
|
|
116
|
-
height: 14px;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.titaui-dynamic-report-item__complete-type-icon--normal {
|
|
120
|
-
background: url("../../img/dynamic-submit-normal.svg") no-repeat;
|
|
121
|
-
background-size: 14px;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.titaui-dynamic-report-item__complete-type-icon--delay {
|
|
125
|
-
background: url("../../img/dynamic-submit-delay.svg") no-repeat;
|
|
126
|
-
background-size: 14px;
|
|
108
|
+
border-radius: 10px 10px 10px 0px;
|
|
109
|
+
padding: 1px 6px;
|
|
127
110
|
}
|
|
128
111
|
|
|
129
112
|
.titaui-dynamic-report-item__complete-type--normal {
|
|
@@ -132,8 +115,8 @@
|
|
|
132
115
|
}
|
|
133
116
|
|
|
134
117
|
.titaui-dynamic-report-item__complete-type--delay {
|
|
135
|
-
|
|
136
|
-
|
|
118
|
+
background: rgba(240, 163, 38, 0.16);
|
|
119
|
+
color: #f0a326;
|
|
137
120
|
}
|
|
138
121
|
|
|
139
122
|
.titaui-dynamic-report-item .highlight {
|
|
@@ -81,13 +81,11 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
var renderSuffix = (0, _react.useMemo)(function () {
|
|
84
|
-
var _classNames
|
|
84
|
+
var _classNames;
|
|
85
85
|
|
|
86
86
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
87
87
|
className: (0, _classnames["default"])("".concat(prefix, "__complete-type"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "__complete-type--normal"), submitState === 1), _defineProperty(_classNames, "".concat(prefix, "__complete-type--delay"), submitState === 2), _classNames))
|
|
88
|
-
},
|
|
89
|
-
className: (0, _classnames["default"])("".concat(prefix, "__complete-type-icon"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefix, "__complete-type-icon--normal"), submitState === 1), _defineProperty(_classNames2, "".concat(prefix, "__complete-type-icon--delay"), submitState === 2), _classNames2))
|
|
90
|
-
}), submitState === 1 ? (0, _getLocale.getLocale)("Rep_Tab_Mys_Submitontime") : (0, _getLocale.getLocale)("Tasks_Tab_DelaSubmission"));
|
|
88
|
+
}, submitState === 1 ? (0, _getLocale.getLocale)("Rep_Tab_Mys_Submitontime") : (0, _getLocale.getLocale)("Tasks_Tab_DelaSubmission"));
|
|
91
89
|
}, []);
|
|
92
90
|
var renderDesc = (0, _react.useMemo)(function () {
|
|
93
91
|
var reportTextMap = {
|
|
@@ -98,7 +96,7 @@ var DynamicReply = function DynamicReply(_ref) {
|
|
|
98
96
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
99
97
|
className: "".concat(prefix, "__operate-desc")
|
|
100
98
|
}, reportTextMap[reportType]);
|
|
101
|
-
}, []);
|
|
99
|
+
}, [reportType]);
|
|
102
100
|
(0, _react.useEffect)(function () {
|
|
103
101
|
(0, _tools.highLightWord)({
|
|
104
102
|
parentDom: contentRichTextRef.current,
|
|
@@ -59,7 +59,8 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
59
59
|
deadline = data.deadline,
|
|
60
60
|
obj = data.obj,
|
|
61
61
|
principalUser = data.principalUser,
|
|
62
|
-
workId = data.workId
|
|
62
|
+
workId = data.workId,
|
|
63
|
+
publishUser = data.publishUser;
|
|
63
64
|
|
|
64
65
|
var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
|
|
65
66
|
searchKeyWord = _useContext.searchKeyWord;
|
|
@@ -135,7 +136,7 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
135
136
|
data: data
|
|
136
137
|
}, restProps, {
|
|
137
138
|
desc: renderDesc,
|
|
138
|
-
user: principalUser
|
|
139
|
+
user: principalUser || publishUser
|
|
139
140
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
140
141
|
className: "".concat(prefix, "__content")
|
|
141
142
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
.titaui-dynamic-item__content {
|
|
11
11
|
position: relative;
|
|
12
12
|
overflow: hidden;
|
|
13
|
-
margin-right:
|
|
13
|
+
margin-right: 20px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.titaui-dynamic-item__content-show-more {
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: flex-end;
|
|
25
25
|
justify-content: center;
|
|
26
|
+
z-index: 2;
|
|
26
27
|
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
|
|
27
28
|
border-radius: 1px;
|
|
28
29
|
font-size: 14px;
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
.titaui-dynamic-item__footer {
|
|
39
|
-
margin:
|
|
40
|
+
margin: 0 24px 0 88px;
|
|
40
41
|
height: 54px;
|
|
41
42
|
border-radius: 0px 0px 6px 6px;
|
|
42
43
|
display: flex;
|
|
@@ -75,8 +75,12 @@ var _dynamicInterview = _interopRequireDefault(require("./dynamic-interview"));
|
|
|
75
75
|
|
|
76
76
|
var _dynamicInterviewShare = _interopRequireDefault(require("./dynamic-interview-share"));
|
|
77
77
|
|
|
78
|
+
var _dynamicNewReport = _interopRequireDefault(require("./dynamic-new-report"));
|
|
79
|
+
|
|
78
80
|
var _dynamicDiscovery = _interopRequireDefault(require("./dynamic-discovery"));
|
|
79
81
|
|
|
82
|
+
var _excluded = ["data", "onDeleteFeed", "dynamicShareIsShowToping"];
|
|
83
|
+
|
|
80
84
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
81
85
|
|
|
82
86
|
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); }
|
|
@@ -89,6 +93,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
89
93
|
|
|
90
94
|
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; }
|
|
91
95
|
|
|
96
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
97
|
+
|
|
92
98
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
93
99
|
|
|
94
100
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -109,14 +115,20 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
109
115
|
|
|
110
116
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
111
117
|
|
|
112
|
-
var
|
|
118
|
+
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; }
|
|
119
|
+
|
|
120
|
+
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; }
|
|
121
|
+
|
|
122
|
+
var prefix = "titaui-dynamic-item";
|
|
113
123
|
|
|
114
124
|
var DynamicItem = function DynamicItem(_ref) {
|
|
115
125
|
var _getBSGlobal, _JSON$parse;
|
|
116
126
|
|
|
117
127
|
var data = _ref.data,
|
|
118
128
|
onDeleteFeed = _ref.onDeleteFeed,
|
|
119
|
-
dynamicShareIsShowToping = _ref.dynamicShareIsShowToping
|
|
129
|
+
dynamicShareIsShowToping = _ref.dynamicShareIsShowToping,
|
|
130
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
131
|
+
|
|
120
132
|
var feedId = data.feedId,
|
|
121
133
|
feedComments = data.feedComments,
|
|
122
134
|
praiseType = data.praiseType,
|
|
@@ -185,10 +197,10 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
185
197
|
|
|
186
198
|
var handleShowMore = function handleShowMore() {
|
|
187
199
|
if (data.feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
188
|
-
window.titaTracker(
|
|
189
|
-
actionName:
|
|
190
|
-
actionGroup:
|
|
191
|
-
productName:
|
|
200
|
+
window.titaTracker("planAction").record({
|
|
201
|
+
actionName: "查看日报",
|
|
202
|
+
actionGroup: "动态-查看更多",
|
|
203
|
+
productName: "动态",
|
|
192
204
|
feedId: feedId
|
|
193
205
|
});
|
|
194
206
|
}
|
|
@@ -197,18 +209,18 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
197
209
|
};
|
|
198
210
|
|
|
199
211
|
var onChangeParse = function onChangeParse(type) {
|
|
200
|
-
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)(
|
|
212
|
+
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)("loginUserInfo"),
|
|
201
213
|
Id = _getBSGlobal2.Id;
|
|
202
214
|
|
|
203
215
|
var data = _toConsumableArray(praiseData).filter(function (item) {
|
|
204
216
|
return Number("".concat(item.userId)) !== Number("".concat(Id));
|
|
205
217
|
});
|
|
206
218
|
|
|
207
|
-
var actionName =
|
|
219
|
+
var actionName = "";
|
|
208
220
|
|
|
209
221
|
if (type) {
|
|
210
|
-
var avatar = (0, _bsGlobal.getBSGlobal)(
|
|
211
|
-
var name = (0, _bsGlobal.getBSGlobal)(
|
|
222
|
+
var avatar = (0, _bsGlobal.getBSGlobal)("loginUserInfo").UserAvatar;
|
|
223
|
+
var name = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Name;
|
|
212
224
|
avatar.color = avatar.Color;
|
|
213
225
|
avatar.medium = avatar.Medium;
|
|
214
226
|
var parseUser = {
|
|
@@ -218,17 +230,17 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
218
230
|
praiseType: type
|
|
219
231
|
};
|
|
220
232
|
setPraiseData([parseUser].concat(_toConsumableArray(data)));
|
|
221
|
-
actionName =
|
|
233
|
+
actionName = "点赞日报";
|
|
222
234
|
} else {
|
|
223
235
|
setPraiseData(data);
|
|
224
|
-
actionName =
|
|
236
|
+
actionName = "取消日报点赞";
|
|
225
237
|
}
|
|
226
238
|
|
|
227
239
|
if (feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
228
|
-
window.titaTracker(
|
|
240
|
+
window.titaTracker("planAction").record({
|
|
229
241
|
actionName: actionName,
|
|
230
|
-
actionGroup:
|
|
231
|
-
productName:
|
|
242
|
+
actionGroup: "动态-日报",
|
|
243
|
+
productName: "动态",
|
|
232
244
|
feedId: feedId
|
|
233
245
|
});
|
|
234
246
|
}
|
|
@@ -279,10 +291,17 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
279
291
|
});
|
|
280
292
|
|
|
281
293
|
case _constant.EFeedType.Report:
|
|
282
|
-
|
|
294
|
+
if (data.newSummary) {
|
|
295
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicNewReport["default"], _extends({
|
|
296
|
+
data: data,
|
|
297
|
+
onDeleteFeed: onDeleteFeed
|
|
298
|
+
}, restProps));
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicReport["default"], _extends({
|
|
283
302
|
data: data,
|
|
284
303
|
onDeleteFeed: onDeleteFeed
|
|
285
|
-
});
|
|
304
|
+
}, restProps));
|
|
286
305
|
|
|
287
306
|
case _constant.EFeedType.Reply:
|
|
288
307
|
return /*#__PURE__*/_react["default"].createElement(_dynamicReply["default"], {
|
|
@@ -365,7 +384,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
365
384
|
|
|
366
385
|
var renderUpvoteCount = function renderUpvoteCount(type, count) {
|
|
367
386
|
if (count === 0) {
|
|
368
|
-
return
|
|
387
|
+
return "";
|
|
369
388
|
}
|
|
370
389
|
|
|
371
390
|
return count || type;
|
|
@@ -383,10 +402,10 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
383
402
|
|
|
384
403
|
if (window.util) {
|
|
385
404
|
if (feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
386
|
-
window.titaTracker(
|
|
387
|
-
actionName:
|
|
388
|
-
actionGroup:
|
|
389
|
-
productName:
|
|
405
|
+
window.titaTracker("planAction").record({
|
|
406
|
+
actionName: "打开打赏弹层",
|
|
407
|
+
actionGroup: "动态-日报",
|
|
408
|
+
productName: "动态",
|
|
390
409
|
feedId: feedId
|
|
391
410
|
});
|
|
392
411
|
}
|
|
@@ -400,13 +419,13 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
400
419
|
var handleReply = function handleReply(_ref2) {
|
|
401
420
|
var submitType = _ref2.submitType;
|
|
402
421
|
if (feedType !== _constant.EFeedType.Report) return;
|
|
403
|
-
var actionName = submitType ===
|
|
422
|
+
var actionName = submitType === "delete" ? "删除日报评论" : "评论日报";
|
|
404
423
|
|
|
405
424
|
if (window.titaTracker) {
|
|
406
|
-
window.titaTracker(
|
|
425
|
+
window.titaTracker("planAction").record({
|
|
407
426
|
actionName: actionName,
|
|
408
|
-
actionGroup:
|
|
409
|
-
productName:
|
|
427
|
+
actionGroup: "动态-日报",
|
|
428
|
+
productName: "动态",
|
|
410
429
|
feedId: feedId
|
|
411
430
|
});
|
|
412
431
|
}
|
|
@@ -438,15 +457,15 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
438
457
|
className: "".concat(prefix, "__content"),
|
|
439
458
|
ref: dynamicContentRef,
|
|
440
459
|
style: {
|
|
441
|
-
height: contentIsOverflow && isFold ?
|
|
460
|
+
height: contentIsOverflow && isFold ? "288px" : "auto"
|
|
442
461
|
}
|
|
443
462
|
}, renderContent, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
444
463
|
condition: contentIsOverflow && isFold
|
|
445
464
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
446
465
|
className: "".concat(prefix, "__content-show-more"),
|
|
447
466
|
onClick: handleShowMore
|
|
448
|
-
}, (0, _getLocale.getLocale)(
|
|
449
|
-
className: (0, _classnames["default"])(
|
|
467
|
+
}, (0, _getLocale.getLocale)("Tasks_Tab_MyS_Butt_Seemoral"), /*#__PURE__*/_react["default"].createElement("i", {
|
|
468
|
+
className: (0, _classnames["default"])("tu-icon-arrow-down", "".concat(prefix, "__icon"))
|
|
450
469
|
})))), feedOperations.total > 0 && /*#__PURE__*/_react["default"].createElement(_feedOperate["default"], {
|
|
451
470
|
feedOperations: feedOperations,
|
|
452
471
|
data: data
|
|
@@ -484,12 +503,12 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
484
503
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
485
504
|
className: "".concat(prefix, "__footer-fold"),
|
|
486
505
|
onClick: handleFold
|
|
487
|
-
}, (0, _getLocale.getLocale)(
|
|
488
|
-
className: (0, _classnames["default"])(
|
|
506
|
+
}, (0, _getLocale.getLocale)("Mod_Fold"), /*#__PURE__*/_react["default"].createElement("i", {
|
|
507
|
+
className: (0, _classnames["default"])("tu-icon-arrow-down", "".concat(prefix, "__icon"), "".concat(prefix, "__icon-up"))
|
|
489
508
|
}))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
490
509
|
condition: hasRewardBtn
|
|
491
510
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
492
|
-
overlay: (0, _getLocale.getLocale)(
|
|
511
|
+
overlay: (0, _getLocale.getLocale)("Feed_Approval"),
|
|
493
512
|
align: {
|
|
494
513
|
offset: [0, 0]
|
|
495
514
|
},
|
|
@@ -499,7 +518,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
499
518
|
className: (0, _classnames["default"])("".concat(prefix, "__footer-icon"), "".concat(prefix, "__footer-icon-redenvelopes"))
|
|
500
519
|
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
501
520
|
onClick: handleCommentClick,
|
|
502
|
-
className: (0, _classnames["default"])(
|
|
521
|
+
className: (0, _classnames["default"])("tu-icon-pinglun-m", "".concat(prefix, "__footer-icon"))
|
|
503
522
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
504
523
|
condition: feedComments.total > 0
|
|
505
524
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|