@titaui/pc 1.12.7-beta.4 → 1.12.9-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/change-okr-modal/Item.js +19 -18
- package/lib/components/change-okr-modal/styledComponents.js +9 -9
- package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
- package/lib/components/create-okr-modal/fields/index.css +14 -3
- package/lib/components/create-okr-modal/fields/o-new-name.js +31 -20
- package/lib/components/create-okr-modal/fields/okr-case.js +7 -5
- package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
- package/lib/components/create-okr-modal/index.js +215 -142
- package/lib/components/create-okr-modal/kr-items/index.css +23 -13
- package/lib/components/create-okr-modal/kr-items/krDatas.js +96 -76
- package/lib/components/create-okr-modal/kr-items/krItem.js +54 -57
- package/lib/components/create-okr-modal/style.js +5 -5
- package/lib/components/dynamic/components/title/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +17 -17
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/index.js +4 -15
- package/lib/components/eReport/eReportLists/reportList.js +29 -30
- package/lib/components/eReport/eReportShare/style.js +1 -1
- package/lib/components/edit-kr-wight/EditKrWightModal.js +11 -9
- package/lib/components/menus/components/menu-tree/tree-node/index.css +0 -120
- package/lib/components/menus/components/menu-tree/tree-node/index.js +2 -22
- package/lib/components/menus/i18n.js +0 -8
- package/lib/components/menus/index.js +0 -6
- package/lib/components/nav-top/components/menu/index.js +4 -4
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +1 -1
- package/lib/components/nav-top/components/user-message/components/todos/todo-item.js +3 -3
- package/lib/components/okr-detail/components/ao-nice/index.css +0 -1
- package/lib/components/okr-detail/components/header/edit-name.js +76 -39
- package/lib/components/okr-detail/components/header/index.css +122 -41
- package/lib/components/okr-detail/components/header/index.js +45 -48
- package/lib/components/{dynamic/dynamic-item/components/progress/components/okr-progress/index.js → okr-detail/components/header/o-classify.js} +84 -152
- package/lib/components/okr-detail/components/header/o-name.js +7 -5
- package/lib/components/okr-detail/components/o-progress-update/index.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +66 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +174 -64
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +15 -13
- package/lib/components/okr-detail/components/tab-panel-content/index.css +1 -0
- package/lib/components/okr-detail/detail-header/index.js +11 -5
- package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
- package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
- package/lib/components/okr-detail/okr-list/index.css +9 -0
- package/lib/components/okr-detail/okr-list/index.js +25 -25
- package/lib/components/okr-detail/request-apis.js +73 -69
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
- package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-flow/child-node/kr-node.js +3 -1
- package/lib/components/okr-flow/child-node/work-node.js +3 -1
- 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 +57 -14
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
- package/lib/components/okr-progress/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress/components/o-progress-update/index.js +2 -2
- package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
- package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
- package/lib/components/okr-share/common-painter/utils.js +187 -36
- package/lib/components/okr-share/index.css +5 -4
- package/lib/components/okr-share/pink-card/card.js +3 -3
- package/lib/components/okr-share/pink-card/drawKrs.js +97 -18
- package/lib/components/okr-share/pink-card/index.js +20 -12
- package/lib/components/open-data-painter/index.js +6 -5
- package/lib/components/period-selector/components/button/style.js +1 -1
- package/lib/components/period-selector/index.css +1 -0
- package/lib/components/period-selector/index.js +7 -2
- package/lib/components/picker/components/picker-trigger/index.js +2 -47
- package/lib/components/picker/picker-panels.js +4 -45
- package/lib/components/picker/picker.js +3 -7
- package/lib/components/search-input/index.js +0 -5
- package/lib/components/search-key-handle/index.js +12 -10
- package/lib/components/select-layer/index.js +22 -8
- package/lib/components/task-relation-modal/helper.js +1 -56
- 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/okr-relation/tree/task-tree/index.css +2 -2
- package/lib/components/task-relation-modal/request-api.js +5 -2
- 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 +22 -3
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -4
- package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +11 -11
- package/lib/components/textarea/index.js +5 -7
- package/lib/components/tooltip/tooltip.js +9 -4
- package/lib/components/upload/components/uploadedPreview.js +17 -17
- package/lib/components/upload/index.js +23 -23
- 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 +2 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +31 -17
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
- package/lib/components/user-selector/searched-panel/index.js +4 -4
- package/lib/components/wechat-btn/index.css +5 -1
- package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
- package/lib/index.js +0 -48
- package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
- package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
- package/lib/pages/new-okr-list/header/index.js +15 -15
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +2 -8
- package/lib/utils/helpers.js +11 -56
- package/lib/utils/hooks.js +5 -5
- package/lib/utils/open-data.js +216 -66
- package/lib/utils/tita-okr-cycle.js +3 -3
- package/package.json +2 -2
- package/lib/components/attachments-preview/index.css +0 -11
- package/lib/components/attachments-preview/index.js +0 -112
- package/lib/components/auto-save/img/failed.svg +0 -17
- package/lib/components/auto-save/img/success.svg +0 -16
- package/lib/components/auto-save/index.css +0 -39
- package/lib/components/auto-save/index.js +0 -78
- package/lib/components/auto-save/interface.js +0 -5
- package/lib/components/color-date-picker/index.css +0 -65
- package/lib/components/color-date-picker/index.js +0 -123
- package/lib/components/color-date-picker/interface.js +0 -14
- package/lib/components/dialog-upload/img/doc.svg +0 -1
- package/lib/components/dialog-upload/img/other.svg +0 -1
- package/lib/components/dialog-upload/img/pdf.svg +0 -1
- package/lib/components/dialog-upload/img/ppt.svg +0 -1
- package/lib/components/dialog-upload/img/radio.svg +0 -1
- package/lib/components/dialog-upload/img/video.svg +0 -1
- package/lib/components/dialog-upload/img/xls.svg +0 -1
- package/lib/components/dialog-upload/index.css +0 -77
- package/lib/components/dialog-upload/index.js +0 -332
- package/lib/components/dialog-upload/type.js +0 -35
- package/lib/components/dialog-upload/uploaded-preview.css +0 -77
- package/lib/components/dialog-upload/uploaded-preview.js +0 -132
- package/lib/components/dialog-upload/util.js +0 -131
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/encourage.js +0 -119
- 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 +0 -14
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.css +0 -68
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +0 -118
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/rate.js +0 -143
- 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/okr-progress/index.css +0 -170
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +0 -120
- package/lib/components/dynamic/dynamic-item/components/okr-progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/okr-progress/request-api.js +0 -10
- package/lib/components/dynamic/dynamic-item/components/okr-progress/utils.js +0 -10
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.css +0 -8
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.js +0 -26
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.css +0 -8
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.js +0 -26
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.css +0 -197
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/request-api.js +0 -20
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/util.js +0 -134
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.css +0 -10
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.js +0 -60
- package/lib/components/dynamic/dynamic-item/components/progress/index.css +0 -25
- package/lib/components/dynamic/dynamic-item/components/progress/index.js +0 -71
- package/lib/components/dynamic/dynamic-item/components/progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +0 -31
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +0 -59
- package/lib/components/dynamic/dynamic-item/components/schedule/interface.js +0 -5
- 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 +0 -136
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +0 -364
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +0 -24
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +0 -52
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +0 -50
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +0 -65
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +0 -201
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +0 -95
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +0 -10
- 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 +0 -32
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +0 -43
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +0 -37
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +0 -79
- 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 +0 -155
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +0 -155
- package/lib/components/import-modal/helper.js +0 -179
- package/lib/components/import-modal/image/loading.gif +0 -0
- package/lib/components/import-modal/import-okr-modal/index.css +0 -18
- package/lib/components/import-modal/import-okr-modal/index.js +0 -132
- package/lib/components/import-modal/import-task-modal/index.css +0 -18
- package/lib/components/import-modal/import-task-modal/index.js +0 -240
- package/lib/components/import-modal/import-task-modal/search-form.js +0 -135
- package/lib/components/import-modal/index.css +0 -30
- package/lib/components/import-modal/index.js +0 -20
- package/lib/components/import-modal/radio.js +0 -62
- package/lib/components/import-modal/request-api.js +0 -204
- package/lib/components/import-modal/search/category-select.js +0 -74
- package/lib/components/import-modal/search/okr-classify-select.js +0 -74
- package/lib/components/import-modal/search/okr-status-select.js +0 -74
- package/lib/components/import-modal/search/okr-type-select.js +0 -87
- package/lib/components/import-modal/search/principal.js +0 -135
- package/lib/components/import-modal/search/relation.js +0 -77
- package/lib/components/import-modal/search/search-dropdown/index.css +0 -50
- package/lib/components/import-modal/search/search-dropdown/index.js +0 -32
- package/lib/components/import-modal/search/task-relation.js +0 -83
- package/lib/components/import-modal/search/task-status-select.js +0 -87
- package/lib/components/import-modal/search/work-relation.js +0 -83
- package/lib/components/import-modal/search/work-status-select.js +0 -74
- package/lib/components/import-modal/tree/okr-tree/index.css +0 -61
- package/lib/components/import-modal/tree/okr-tree/index.js +0 -267
- package/lib/components/import-modal/tree/okr-tree/search-form.js +0 -161
- package/lib/components/import-modal/tree/task-work-tree/index.css +0 -123
- package/lib/components/import-modal/tree/task-work-tree/index.js +0 -187
- package/lib/components/import-modal/tree-node/index.css +0 -0
- package/lib/components/import-modal/tree-node/index.js +0 -51
- package/lib/components/import-modal/tree-node/kr-node/index.css +0 -58
- package/lib/components/import-modal/tree-node/kr-node/index.js +0 -108
- package/lib/components/import-modal/tree-node/milestone-node/index.css +0 -61
- package/lib/components/import-modal/tree-node/milestone-node/index.js +0 -118
- package/lib/components/import-modal/tree-node/o-node/index.css +0 -46
- package/lib/components/import-modal/tree-node/o-node/index.js +0 -138
- package/lib/components/import-modal/tree-node/work-node/index.css +0 -51
- package/lib/components/import-modal/tree-node/work-node/index.js +0 -108
- package/lib/components/menus/components/menu-tree/images/summary-menu/caidan-enjoy.svg +0 -14
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-setup.svg +0 -18
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-zongjie.svg +0 -15
- package/lib/components/menus/components/menu-tree/images/summary-menu/zongjie-s.svg +0 -15
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +0 -74
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +0 -74
- package/lib/components/menus/export-modules/summary-menus/depart-menus/helper.js +0 -56
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.css +0 -32
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +0 -201
- package/lib/components/menus/export-modules/summary-menus/index.css +0 -9
- package/lib/components/menus/export-modules/summary-menus/index.js +0 -134
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +0 -76
- package/lib/components/menus/export-modules/summary-menus/menus.js +0 -199
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +0 -199
- package/lib/components/new-confidence/constant.js +0 -53
- package/lib/components/new-confidence/img/1.svg +0 -40
- package/lib/components/new-confidence/img/10.svg +0 -33
- package/lib/components/new-confidence/img/2.svg +0 -40
- package/lib/components/new-confidence/img/3.svg +0 -40
- package/lib/components/new-confidence/img/4.svg +0 -40
- package/lib/components/new-confidence/img/5.svg +0 -40
- package/lib/components/new-confidence/img/6.svg +0 -40
- package/lib/components/new-confidence/img/7.svg +0 -40
- package/lib/components/new-confidence/img/8.svg +0 -40
- package/lib/components/new-confidence/img/9.svg +0 -40
- package/lib/components/new-confidence/index.css +0 -62
- package/lib/components/new-confidence/index.js +0 -115
- package/lib/components/new-confidence/interface.js +0 -5
- package/lib/components/picker/components/panels/week-panel/index.css +0 -42
- package/lib/components/picker/components/panels/week-panel/index.js +0 -49
- package/lib/components/picker/components/panels/week-panel/utils.js +0 -45
- package/lib/components/picker/components/panels/week-panel/week-body.js +0 -79
- package/lib/components/picker/components/panels/week-panel/week-head.js +0 -80
- package/lib/components/rate/index.js +0 -50
- package/lib/components/regulation-setting-item/index.css +0 -33
- package/lib/components/regulation-setting-item/index.js +0 -37
- package/lib/components/rich-editor-at/components/index.css +0 -66
- package/lib/components/rich-editor-at/components/index.js +0 -188
- package/lib/components/rich-editor-at/index.css +0 -40
- package/lib/components/rich-editor-at/index.js +0 -108
- package/lib/components/rich-editor-upload/index.css +0 -11
- package/lib/components/rich-editor-upload/index.js +0 -84
- package/lib/utils/planDataJson.js +0 -11115
|
@@ -198,14 +198,15 @@ var Item = /*#__PURE__*/function (_PureComponent) {
|
|
|
198
198
|
isShowKr: isShowKr
|
|
199
199
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
200
200
|
placement: "top",
|
|
201
|
-
overlay: htmlToText(item.mileStoneName)
|
|
201
|
+
overlay: (0, _openData.parseString)(htmlToText(item.mileStoneName))
|
|
202
202
|
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.OkrName, {
|
|
203
|
+
className: "okr-relate-modal__milestonename",
|
|
203
204
|
isKr: true,
|
|
204
|
-
isShowKr: isShowKr
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}))));
|
|
205
|
+
isShowKr: isShowKr // dangerouslySetInnerHTML={{
|
|
206
|
+
// __html: `KR${index + 1}:${parseString(item.mileStoneName)}`,
|
|
207
|
+
// }}
|
|
208
|
+
|
|
209
|
+
}, "KR".concat(index + 1, "\uFF1A"), (0, _openData.parseString)(item.mileStoneName)))));
|
|
209
210
|
}
|
|
210
211
|
|
|
211
212
|
if (active && item.mileStoneId === (active.workId || active.mileStoneId)) {
|
|
@@ -220,14 +221,15 @@ var Item = /*#__PURE__*/function (_PureComponent) {
|
|
|
220
221
|
isShowKr: isShowKr
|
|
221
222
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
222
223
|
placement: "top",
|
|
223
|
-
overlay: htmlToText(item.mileStoneName)
|
|
224
|
+
overlay: (0, _openData.parseString)(htmlToText(item.mileStoneName))
|
|
224
225
|
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.OkrName, {
|
|
226
|
+
className: "okr-relate-modal__milestonename",
|
|
225
227
|
isKr: true,
|
|
226
|
-
isShowKr: isShowKr
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}))));
|
|
228
|
+
isShowKr: isShowKr // dangerouslySetInnerHTML={{
|
|
229
|
+
// __html: KR${index + 1}:${parseString(item.mileStoneName)}`,
|
|
230
|
+
// }}
|
|
231
|
+
|
|
232
|
+
}, "KR".concat(index + 1, "\uFF1A"), (0, _openData.parseString)(item.mileStoneName)))));
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
return '';
|
|
@@ -282,14 +284,13 @@ var Item = /*#__PURE__*/function (_PureComponent) {
|
|
|
282
284
|
isShowKr: isShowKr
|
|
283
285
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
284
286
|
placement: "top",
|
|
285
|
-
overlay: htmlToText(okrData.workName)
|
|
287
|
+
overlay: (0, _openData.parseString)(htmlToText(okrData.workName))
|
|
286
288
|
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.OkrName, {
|
|
289
|
+
className: "okr-relate-modal__workname",
|
|
287
290
|
isKr: false,
|
|
288
|
-
isShowKr: isShowKr
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
292
|
-
}))), this.isObjectiveRelevanceKr && isShowKr && data.Krs.length > 0 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
291
|
+
isShowKr: isShowKr // dangerouslySetInnerHTML={{ __html: parseString(okrData.workName) }}
|
|
292
|
+
|
|
293
|
+
}, (0, _openData.parseString)(okrData.workName)))), this.isObjectiveRelevanceKr && isShowKr && data.Krs.length > 0 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
293
294
|
className: "".concat(isExpand ? 'tu-icon-arrow-up' : 'tu-icon-arrow-down')
|
|
294
295
|
})), /*#__PURE__*/_react["default"].createElement(_styledComponents.ItemBottom, null, !isShowKr && [/*#__PURE__*/_react["default"].createElement("span", null, (0, _constant.getTypeMap)()[data.okrType]), /*#__PURE__*/_react["default"].createElement(_styledComponents.Separator, null)], /*#__PURE__*/_react["default"].createElement(_styledComponents.PricipleName, null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
295
296
|
name: data.principalUser.name,
|
|
@@ -14,7 +14,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
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
16
|
var Wrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 589px;\n height: 488px;\n margin-top: ", ";\n background: #ffffff;\n box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n"])), function (p) {
|
|
17
|
-
return p.okrPopType === 1 ? 0 :
|
|
17
|
+
return p.okrPopType === 1 ? 0 : '32px';
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
exports.Wrapper = Wrapper;
|
|
@@ -59,7 +59,7 @@ var OptionItem = _styledComponents["default"].span(_templateObject11 || (_templa
|
|
|
59
59
|
|
|
60
60
|
exports.OptionItem = OptionItem;
|
|
61
61
|
|
|
62
|
-
var List = _styledComponents["default"].ul(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n /* overflow: auto; */\n flex: 1;\n max-height:
|
|
62
|
+
var List = _styledComponents["default"].ul(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n /* overflow: auto; */\n flex: 1;\n max-height: 358px;\n overflow-y: scroll;\n &:empty::after {\n content: '\\6682\\65e0\\6570\\636e';\n display: block;\n color: #c5c5c5;\n border: dashed 1px #c5c5c5;\n padding: 30px 25px;\n border-radius: 3px;\n text-align: center;\n font-size: 22px;\n line-height: 30px;\n margin-top: 100px;\n }\n"], ["\n /* overflow: auto; */\n flex: 1;\n max-height: 358px;\n overflow-y: scroll;\n &:empty::after {\n content: '\\\\6682\\\\65e0\\\\6570\\\\636e';\n display: block;\n color: #c5c5c5;\n border: dashed 1px #c5c5c5;\n padding: 30px 25px;\n border-radius: 3px;\n text-align: center;\n font-size: 22px;\n line-height: 30px;\n margin-top: 100px;\n }\n"])));
|
|
63
63
|
|
|
64
64
|
exports.List = List;
|
|
65
65
|
|
|
@@ -80,15 +80,15 @@ var ItemTop = _styledComponents["default"].div(_templateObject16 || (_templateOb
|
|
|
80
80
|
exports.ItemTop = ItemTop;
|
|
81
81
|
|
|
82
82
|
var WorkNameWrapper = _styledComponents["default"].div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n flex: 1px;\n white-space: nowrap;\n overflow: hidden;\n cursor: ", ";\n"])), function (p) {
|
|
83
|
-
return p.isKr ?
|
|
83
|
+
return p.isKr ? 'default' : 'pointer';
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
exports.WorkNameWrapper = WorkNameWrapper;
|
|
87
87
|
|
|
88
88
|
var Radio = _styledComponents["default"].a(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 15px;\n width: 15px;\n border: 1px solid ", ";\n border-radius: 50%;\n &::after {\n content: '';\n display: ", ";\n width: 9px;\n height: 9px;\n border-radius: 50%;\n background-color: #2879ff;\n }\n"])), function (p) {
|
|
89
|
-
return p.active ?
|
|
89
|
+
return p.active ? '#2879ff' : '#BFC3C7';
|
|
90
90
|
}, function (p) {
|
|
91
|
-
return p.active ?
|
|
91
|
+
return p.active ? 'block' : 'none';
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
exports.Radio = Radio;
|
|
@@ -102,7 +102,7 @@ var Tag = _styledComponents["default"].div(_templateObject19 || (_templateObject
|
|
|
102
102
|
exports.Tag = Tag;
|
|
103
103
|
|
|
104
104
|
var OkrName = _styledComponents["default"].span(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n display: inline-block\n flex: 1;\n max-width: 400px;\n font-size: 13px;\n font-weight: ", ";\n color: #33383d;\n white-space: nowrap;\n overflow: hidden;\n word-break: keep-all;\n text-overflow: ellipsis;\n line-height: 1;\n"])), function (p) {
|
|
105
|
-
return p.isShowKr ?
|
|
105
|
+
return p.isShowKr ? 'normal' : '600';
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
exports.OkrName = OkrName;
|
|
@@ -128,11 +128,11 @@ var ButtonGroup = _styledComponents["default"].div(_templateObject25 || (_templa
|
|
|
128
128
|
exports.ButtonGroup = ButtonGroup;
|
|
129
129
|
|
|
130
130
|
var Button = _styledComponents["default"].a(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n display: block;\n min-width: 28px;\n height: 27px;\n padding: 0 15px;\n box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.21);\n border-radius: 2px;\n background-color: ", ";\n color: ", ";\n cursor: pointer;\n text-align: center;\n white-space: nowrap;\n line-height: 27px;\n &:hover {\n color: ", ";\n }\n"])), function (p) {
|
|
131
|
-
return p.type !==
|
|
131
|
+
return p.type !== 'confirm' ? '#FAFBFC' : p.disabled ? '#E7EEF3' : '#2879FF';
|
|
132
132
|
}, function (p) {
|
|
133
|
-
return p.type !==
|
|
133
|
+
return p.type !== 'confirm' ? '#565E66' : '#FFF';
|
|
134
134
|
}, function (p) {
|
|
135
|
-
return p.type !==
|
|
135
|
+
return p.type !== 'confirm' ? '#565E66' : '#FFF';
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
exports.Button = Button;
|
|
@@ -35,6 +35,8 @@ var _createSuccessShadow = _interopRequireDefault(require("./img/create-success-
|
|
|
35
35
|
|
|
36
36
|
var _getLocale = require("../../utils/getLocale");
|
|
37
37
|
|
|
38
|
+
var _openData = require("../../utils/open-data");
|
|
39
|
+
|
|
38
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
39
41
|
|
|
40
42
|
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); }
|
|
@@ -66,6 +68,16 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
66
68
|
dontShowValue = _useState2[0],
|
|
67
69
|
setDontShowValue = _useState2[1];
|
|
68
70
|
|
|
71
|
+
var _useState3 = (0, _react.useState)(null),
|
|
72
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
73
|
+
okrName = _useState4[0],
|
|
74
|
+
setOkrName = _useState4[1];
|
|
75
|
+
|
|
76
|
+
var _useState5 = (0, _react.useState)([]),
|
|
77
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
|
+
krNames = _useState6[0],
|
|
79
|
+
setKrNames = _useState6[1];
|
|
80
|
+
|
|
69
81
|
var handleCloseModel = (0, _react.useCallback)(function () {
|
|
70
82
|
onCloseModel && onCloseModel(dontShowValue);
|
|
71
83
|
}, [dontShowValue, onCloseModel]);
|
|
@@ -87,7 +99,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
87
99
|
|
|
88
100
|
var height = shareContent.clientHeight; // 获取dom 高度
|
|
89
101
|
|
|
90
|
-
var canvas = document.createElement(
|
|
102
|
+
var canvas = document.createElement('canvas'); // 创建一个canvas节点
|
|
91
103
|
|
|
92
104
|
var scale = 2; // 定义任意放大倍数 支持小数
|
|
93
105
|
|
|
@@ -116,17 +128,17 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
116
128
|
|
|
117
129
|
};
|
|
118
130
|
(0, _html2canvas["default"])(downLoadRef.current, opts).then(function (canvas) {
|
|
119
|
-
var imgUrl = canvas.toDataURL(
|
|
131
|
+
var imgUrl = canvas.toDataURL('image/png'); // 得到图片的base64编码数据
|
|
120
132
|
|
|
121
133
|
var image = new Image();
|
|
122
|
-
image.setAttribute(
|
|
134
|
+
image.setAttribute('crossOrigin', 'anonymous');
|
|
123
135
|
|
|
124
136
|
image.onload = function () {
|
|
125
|
-
var a = document.createElement(
|
|
137
|
+
var a = document.createElement('a'); // 生成一个a元素
|
|
126
138
|
|
|
127
|
-
var event = new MouseEvent(
|
|
139
|
+
var event = new MouseEvent('click'); // 创建一个单击事件
|
|
128
140
|
|
|
129
|
-
a.download = (0, _getLocale.getLocale)(
|
|
141
|
+
a.download = (0, _getLocale.getLocale)('OKR_MyO_Share'); // 设置图片名称
|
|
130
142
|
|
|
131
143
|
a.href = imgUrl; // 将生成的URL设置为a.href属性
|
|
132
144
|
|
|
@@ -135,6 +147,22 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
135
147
|
|
|
136
148
|
image.src = imgUrl;
|
|
137
149
|
});
|
|
150
|
+
}, []);
|
|
151
|
+
(0, _react.useEffect)(function () {
|
|
152
|
+
(0, _openData.parseOpenDataStringToImg)(createdSuccessInfo.workName, {
|
|
153
|
+
fontSize: 14,
|
|
154
|
+
fontWeight: '600',
|
|
155
|
+
color: '141c28',
|
|
156
|
+
lineHeight: 22
|
|
157
|
+
}).then(setOkrName);
|
|
158
|
+
Promise.all(createdSuccessInfo.Krs.map(function (kr) {
|
|
159
|
+
return (0, _openData.parseOpenDataStringToImg)(kr.mileStoneName, {
|
|
160
|
+
fontSize: 12,
|
|
161
|
+
fontWeight: 'normal',
|
|
162
|
+
color: '3f4755',
|
|
163
|
+
lineHeight: 18
|
|
164
|
+
});
|
|
165
|
+
})).then(setKrNames);
|
|
138
166
|
}, []); // console.log(createdSuccessInfo)
|
|
139
167
|
|
|
140
168
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -149,10 +177,10 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
149
177
|
className: "create-success-model__top-block"
|
|
150
178
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
151
179
|
src: _light["default"],
|
|
152
|
-
className: "create-success-model__light ".concat(isDownload ?
|
|
180
|
+
className: "create-success-model__light ".concat(isDownload ? 'create-success-model--animation-unset' : '')
|
|
153
181
|
}), isDownload ? null : /*#__PURE__*/_react["default"].createElement("img", {
|
|
154
182
|
src: _shower["default"],
|
|
155
|
-
className: "create-success-model__shower ".concat(isDownload ?
|
|
183
|
+
className: "create-success-model__shower ".concat(isDownload ? 'create-success-model--animation-unset' : '')
|
|
156
184
|
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
157
185
|
src: _createSuccessHead["default"],
|
|
158
186
|
className: "create-success-model__create-head"
|
|
@@ -163,7 +191,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
163
191
|
className: "create-success-model__avatar"
|
|
164
192
|
}, createdSuccessInfo.principalUser.avatar.hasAvatar ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
165
193
|
className: "create-success-model__img",
|
|
166
|
-
src: "".concat(createdSuccessInfo.userAvatarBase64Url ? "data:image/png;base64,".concat(createdSuccessInfo.userAvatarBase64Url) :
|
|
194
|
+
src: "".concat(createdSuccessInfo.userAvatarBase64Url ? "data:image/png;base64,".concat(createdSuccessInfo.userAvatarBase64Url) : '')
|
|
167
195
|
}) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
168
196
|
className: "create-success-model__text-avatar",
|
|
169
197
|
style: {
|
|
@@ -182,10 +210,10 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
182
210
|
src: _createSuccessRightQuotation["default"]
|
|
183
211
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
184
212
|
className: "create-success-model__congratulation"
|
|
185
|
-
}, (0, _getLocale.getLocale)(
|
|
213
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_OKRscreated'), "\xA0\xA0", /*#__PURE__*/_react["default"].createElement("span", {
|
|
186
214
|
className: "create-success-model__percent"
|
|
187
|
-
}, createdSuccessInfo.countSurpassPercentage, "%"), "\xA0\xA0", (0, _getLocale.getLocale)(
|
|
188
|
-
className: "create-success-model__okr-info ".concat(isDownload ?
|
|
215
|
+
}, createdSuccessInfo.countSurpassPercentage, "%"), "\xA0\xA0", (0, _getLocale.getLocale)('OKR_MyO_Pop_ofpeople')), /*#__PURE__*/_react["default"].createElement("div", {
|
|
216
|
+
className: "create-success-model__okr-info ".concat(isDownload ? '' : 'create-success-model--fix-height')
|
|
189
217
|
}, isDownload ? null : /*#__PURE__*/_react["default"].createElement("img", {
|
|
190
218
|
className: "create-success-model__shadow-img",
|
|
191
219
|
src: _createSuccessShadow["default"]
|
|
@@ -196,7 +224,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
196
224
|
className: "create-success-model__o-name-icon"
|
|
197
225
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
198
226
|
className: "create-success-model__o-name-text"
|
|
199
|
-
},
|
|
227
|
+
}, okrName)), krNames.map(function (kr, index) {
|
|
200
228
|
return (
|
|
201
229
|
/*#__PURE__*/
|
|
202
230
|
// if(!isDownload && index > 2) {
|
|
@@ -207,11 +235,11 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
207
235
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
208
236
|
className: "create-success-model__dot"
|
|
209
237
|
}), /*#__PURE__*/_react["default"].createElement("li", {
|
|
210
|
-
className: "create-success-model__kr ".concat(isDownload ?
|
|
211
|
-
}, kr
|
|
238
|
+
className: "create-success-model__kr ".concat(isDownload ? 'create-success-model__kr--no-wrap' : '')
|
|
239
|
+
}, kr))
|
|
212
240
|
);
|
|
213
241
|
})), isDownload ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
214
|
-
className: "create-success-model__qrcode ".concat(isDownload ?
|
|
242
|
+
className: "create-success-model__qrcode ".concat(isDownload ? 'create-success-model--hidden-box-shadow' : '')
|
|
215
243
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
216
244
|
src: _qrCode["default"],
|
|
217
245
|
width: "275"
|
|
@@ -222,10 +250,10 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
222
250
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
223
251
|
className: "create-success-model__common-btn-style create-success-model__return-list",
|
|
224
252
|
onClick: handleShowDetail
|
|
225
|
-
}, (0, _getLocale.getLocale)(
|
|
253
|
+
}, (0, _getLocale.getLocale)('Mod_Checkdetails')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
226
254
|
className: "create-success-model__common-btn-style create-success-model__download-img",
|
|
227
255
|
onClick: handleDownloadPic
|
|
228
|
-
}, (0, _getLocale.getLocale)(
|
|
256
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Popup_Download'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
229
257
|
className: "create-success-model__checkbox-wrapper"
|
|
230
258
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
231
259
|
id: "dontShowCreateSucess",
|
|
@@ -236,7 +264,7 @@ var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
|
236
264
|
}), /*#__PURE__*/_react["default"].createElement("label", {
|
|
237
265
|
htmlFor: "dontShowCreateSucess",
|
|
238
266
|
className: "create-success-model__label"
|
|
239
|
-
}, (0, _getLocale.getLocale)(
|
|
267
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Nomore'))))));
|
|
240
268
|
};
|
|
241
269
|
|
|
242
270
|
var _default = CreateSuccessCmp;
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
.okr-o-new-name .okr-o-new-name__left-block {
|
|
98
98
|
flex: 1;
|
|
99
99
|
display: flex;
|
|
100
|
+
align-items: center;
|
|
100
101
|
position: relative;
|
|
101
102
|
}
|
|
102
103
|
|
|
@@ -133,6 +134,16 @@
|
|
|
133
134
|
right: 8px;
|
|
134
135
|
}
|
|
135
136
|
|
|
137
|
+
.okr-o-new-name .okr-o-new-name__left-block .tita-rich-editor__inline-editor {
|
|
138
|
+
flex: 1;
|
|
139
|
+
width: 0;
|
|
140
|
+
margin-right: 8px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.okr-o-new-name .okr-o-new-name__left-block .tita-rich-editor .ProseMirror > p {
|
|
144
|
+
font-weight: 600;
|
|
145
|
+
}
|
|
146
|
+
|
|
136
147
|
.user-info {
|
|
137
148
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
138
149
|
display: flex;
|
|
@@ -177,7 +188,7 @@
|
|
|
177
188
|
}
|
|
178
189
|
|
|
179
190
|
.error-popup-text-wrapper::after {
|
|
180
|
-
content:
|
|
191
|
+
content: '';
|
|
181
192
|
display: block;
|
|
182
193
|
border: 6px solid transparent;
|
|
183
194
|
position: absolute;
|
|
@@ -223,7 +234,7 @@
|
|
|
223
234
|
}
|
|
224
235
|
|
|
225
236
|
.okr-create-suggest .okr-create-suggest__triangle::after {
|
|
226
|
-
content:
|
|
237
|
+
content: '';
|
|
227
238
|
display: block;
|
|
228
239
|
border: 8px solid #fffffd;
|
|
229
240
|
border-top: 8px solid transparent;
|
|
@@ -235,7 +246,7 @@
|
|
|
235
246
|
}
|
|
236
247
|
|
|
237
248
|
.okr-create-suggest .okr-create-suggest__triangle::before {
|
|
238
|
-
content:
|
|
249
|
+
content: '';
|
|
239
250
|
display: block;
|
|
240
251
|
border: 8px solid #f6bd16;
|
|
241
252
|
border-top: 8px solid transparent;
|
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _richEditor = require("@titaui/rich-editor");
|
|
13
|
+
|
|
12
14
|
var _toast = _interopRequireDefault(require("../../toast"));
|
|
13
15
|
|
|
14
16
|
var _constant = require("../constant");
|
|
@@ -53,8 +55,9 @@ var initOCheckResult = function initOCheckResult() {
|
|
|
53
55
|
};
|
|
54
56
|
|
|
55
57
|
function ONewName(_ref) {
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
+
var richEditorStatus = _ref.richEditorStatus,
|
|
59
|
+
okrNameData = _ref.okrNameData,
|
|
60
|
+
setOkrNameData = _ref.setOkrNameData,
|
|
58
61
|
container = _ref.container,
|
|
59
62
|
user = _ref.user,
|
|
60
63
|
setUser = _ref.setUser,
|
|
@@ -63,9 +66,10 @@ function ONewName(_ref) {
|
|
|
63
66
|
_ref$setIsInputConten = _ref.setIsInputContent,
|
|
64
67
|
setIsInputContent = _ref$setIsInputConten === void 0 ? function () {} : _ref$setIsInputConten;
|
|
65
68
|
var oCheckId = 0;
|
|
69
|
+
var mentionInputRef = (0, _react.useRef)();
|
|
66
70
|
var timerRef = (0, _react.useRef)();
|
|
67
|
-
var okrNameIsEmpty = (0, _react.useRef)(!
|
|
68
|
-
var oldONameRef = (0, _react.useRef)(
|
|
71
|
+
var okrNameIsEmpty = (0, _react.useRef)(!okrNameData.pureText);
|
|
72
|
+
var oldONameRef = (0, _react.useRef)('');
|
|
69
73
|
var formatUser = (0, _react.useMemo)(function () {
|
|
70
74
|
var medium = user.avatar && (user.avatar.Medium || user.avatar.medium);
|
|
71
75
|
var color = user.avatar && (user.avatar.Color || user.avatar.color);
|
|
@@ -99,7 +103,7 @@ function ONewName(_ref) {
|
|
|
99
103
|
var tempCheckId = oCheckId; // @ts-ignore
|
|
100
104
|
|
|
101
105
|
return (0, _requestApi.getOAnalysisInfos)({
|
|
102
|
-
text:
|
|
106
|
+
text: okrNameData.pureTextExcludeAt
|
|
103
107
|
}) // @ts-ignore
|
|
104
108
|
.then(function (data) {
|
|
105
109
|
if (tempCheckId !== oCheckId) {
|
|
@@ -132,12 +136,18 @@ function ONewName(_ref) {
|
|
|
132
136
|
})["finally"](function () {
|
|
133
137
|
setIsInputContent(false);
|
|
134
138
|
});
|
|
135
|
-
}, [
|
|
139
|
+
}, [okrNameData, setIsInputContent]);
|
|
140
|
+
|
|
141
|
+
var onChangeHandler = function onChangeHandler(data) {
|
|
142
|
+
setOkrNameData(data);
|
|
143
|
+
setIsInputContent(true);
|
|
144
|
+
};
|
|
145
|
+
|
|
136
146
|
(0, _react.useEffect)(function () {
|
|
137
147
|
// 防抖
|
|
138
|
-
okrNameIsEmpty.current = !
|
|
148
|
+
okrNameIsEmpty.current = !okrNameData.pureText;
|
|
139
149
|
|
|
140
|
-
if (!
|
|
150
|
+
if (!okrNameData.pureText) {
|
|
141
151
|
setONameCheckResult(initOCheckResult());
|
|
142
152
|
setIsInputContent(false);
|
|
143
153
|
} else if (timerRef.current) {
|
|
@@ -150,7 +160,7 @@ function ONewName(_ref) {
|
|
|
150
160
|
return function () {
|
|
151
161
|
clearTimeout(timerRef.current);
|
|
152
162
|
};
|
|
153
|
-
}, [
|
|
163
|
+
}, [okrNameData]);
|
|
154
164
|
var handleInputFocus = (0, _react.useCallback)(function () {
|
|
155
165
|
if (onOInputFocusStateChange) {
|
|
156
166
|
onOInputFocusStateChange(true);
|
|
@@ -161,7 +171,7 @@ function ONewName(_ref) {
|
|
|
161
171
|
onOInputFocusStateChange(false);
|
|
162
172
|
}
|
|
163
173
|
}, []);
|
|
164
|
-
var handleOnKeyDown = (0, _react.useCallback)(function () {
|
|
174
|
+
var handleOnKeyDown = (0, _react.useCallback)(function (e) {
|
|
165
175
|
setIsInputContent(true);
|
|
166
176
|
}, [setIsInputContent]);
|
|
167
177
|
var handleOnKeyUp = (0, _react.useCallback)(function (e) {
|
|
@@ -173,6 +183,9 @@ function ONewName(_ref) {
|
|
|
173
183
|
oldONameRef.current = e.target.value;
|
|
174
184
|
}
|
|
175
185
|
}, []);
|
|
186
|
+
var pureTextExcludeAt = okrNameData.pureTextExcludeAt,
|
|
187
|
+
richText = okrNameData.richText;
|
|
188
|
+
var okrNameLen = (pureTextExcludeAt === null || pureTextExcludeAt === void 0 ? void 0 : pureTextExcludeAt.length) || 0;
|
|
176
189
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
190
|
className: "okr-o-new-name"
|
|
178
191
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -180,21 +193,19 @@ function ONewName(_ref) {
|
|
|
180
193
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
181
194
|
className: "left-block__title"
|
|
182
195
|
}, "O"), /*#__PURE__*/_react["default"].createElement(_inputWithErrPopup["default"], {
|
|
183
|
-
strLength:
|
|
196
|
+
strLength: okrNameLen,
|
|
184
197
|
maxLength: 500,
|
|
185
198
|
position: "top"
|
|
186
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
199
|
+
}, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
|
|
200
|
+
initialState: richText,
|
|
201
|
+
key: richEditorStatus,
|
|
202
|
+
onDocChange: onChangeHandler,
|
|
187
203
|
onFocus: handleInputFocus,
|
|
188
204
|
onBlur: handleInputBlur,
|
|
189
|
-
className: "left-block__input",
|
|
190
|
-
placeholder: (0, _getLocale.getLocale)("OKR_MyO_Pop_PleInspObjective"),
|
|
191
|
-
type: "text",
|
|
192
|
-
value: okrName,
|
|
193
|
-
onChange: function onChange(e) {
|
|
194
|
-
return setOkrName(e.target.value);
|
|
195
|
-
},
|
|
196
205
|
onKeyDown: handleOnKeyDown,
|
|
197
|
-
onKeyUp: handleOnKeyUp
|
|
206
|
+
onKeyUp: handleOnKeyUp,
|
|
207
|
+
placeholder: (0, _getLocale.getLocale)('OKR_MyO_Pop_PleInspObjective'),
|
|
208
|
+
ref: mentionInputRef
|
|
198
209
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
199
210
|
className: "left-block__right-text-mask"
|
|
200
211
|
})), /*#__PURE__*/_react["default"].createElement(_okrNewUserSelector["default"], {
|
|
@@ -43,7 +43,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
43
43
|
|
|
44
44
|
function OkrCase(_ref) {
|
|
45
45
|
var onOkrApply = _ref.onOkrApply,
|
|
46
|
-
okrTemplateEnabled = _ref.okrTemplateEnabled
|
|
46
|
+
okrTemplateEnabled = _ref.okrTemplateEnabled,
|
|
47
|
+
onVisibleChange = _ref.onVisibleChange;
|
|
47
48
|
|
|
48
49
|
var _useState = (0, _react.useState)(false),
|
|
49
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -52,6 +53,7 @@ function OkrCase(_ref) {
|
|
|
52
53
|
|
|
53
54
|
var okrCaseClickHandler = function okrCaseClickHandler() {
|
|
54
55
|
setVisible(true);
|
|
56
|
+
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(true);
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
var onCasesCloseHandler = function onCasesCloseHandler() {
|
|
@@ -62,13 +64,13 @@ function OkrCase(_ref) {
|
|
|
62
64
|
onOkrApply === null || onOkrApply === void 0 ? void 0 : onOkrApply(data);
|
|
63
65
|
setVisible(false);
|
|
64
66
|
|
|
65
|
-
_toast["default"].Success(
|
|
67
|
+
_toast["default"].Success('成功套用');
|
|
66
68
|
};
|
|
67
69
|
|
|
68
70
|
return /*#__PURE__*/_react["default"].createElement(_style.Line, null, okrTemplateEnabled && !(0, _helpers.isLocal)() && !(0, _helpers.isTencentHr)() ? /*#__PURE__*/_react["default"].createElement(_style.CaseLink, {
|
|
69
71
|
onClick: okrCaseClickHandler,
|
|
70
72
|
className: "tu-icon-shoushi"
|
|
71
|
-
}, (0, _getLocale.getLocale)(
|
|
73
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Butt_AddfromOKR')) : null, okrTemplateEnabled && /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
72
74
|
zIndex: 1200,
|
|
73
75
|
noHeadLine: true,
|
|
74
76
|
visible: visible,
|
|
@@ -78,8 +80,8 @@ function OkrCase(_ref) {
|
|
|
78
80
|
noCloseIcon: true,
|
|
79
81
|
destroyOnClose: true,
|
|
80
82
|
style: {
|
|
81
|
-
width:
|
|
82
|
-
height:
|
|
83
|
+
width: '100%',
|
|
84
|
+
height: '100%'
|
|
83
85
|
},
|
|
84
86
|
maskClosable: true
|
|
85
87
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -19,6 +19,8 @@ var _changeOkrModal = _interopRequireDefault(require("../../change-okr-modal"));
|
|
|
19
19
|
|
|
20
20
|
var _getLocale = require("../../../utils/getLocale");
|
|
21
21
|
|
|
22
|
+
var _openData = require("../../../utils/open-data");
|
|
23
|
+
|
|
22
24
|
require("./index.css");
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -68,7 +70,7 @@ function _default(_ref) {
|
|
|
68
70
|
e.stopPropagation();
|
|
69
71
|
setParent({
|
|
70
72
|
parentWorkId: 0,
|
|
71
|
-
parentWorkName:
|
|
73
|
+
parentWorkName: '',
|
|
72
74
|
parentType: 0,
|
|
73
75
|
parentKrId: 0
|
|
74
76
|
});
|
|
@@ -107,7 +109,7 @@ function _default(_ref) {
|
|
|
107
109
|
|
|
108
110
|
(0, _react.useEffect)(function () {
|
|
109
111
|
// @ts-ignore
|
|
110
|
-
(0, _helper.taker)((0, _helper.getApiUrl)(
|
|
112
|
+
(0, _helper.taker)((0, _helper.getApiUrl)('org/Get'), 'get').then(function (res) {
|
|
111
113
|
if (res.Code == 1) {
|
|
112
114
|
var SuperiorUser = res.Data.SuperiorUser;
|
|
113
115
|
|
|
@@ -127,13 +129,13 @@ function _default(_ref) {
|
|
|
127
129
|
className: "create-modal__sub-block"
|
|
128
130
|
}, isCreateModal ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
129
131
|
className: "create-modal__sub-title"
|
|
130
|
-
}, (0, _getLocale.getLocale)(
|
|
132
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_SetAlignment')) : /*#__PURE__*/_react["default"].createElement(_style.TitleLine, null, (0, _getLocale.getLocale)('OKR_MyO_Pop_SetAlignment')), /*#__PURE__*/_react["default"].createElement(_style.SelectBtn, {
|
|
131
133
|
onClick: onSelectClickHandler
|
|
132
134
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
133
135
|
style: {
|
|
134
|
-
color: !parent.parentWorkName ?
|
|
136
|
+
color: !parent.parentWorkName ? '#BFC7D5' : ''
|
|
135
137
|
}
|
|
136
|
-
}, !parent.parentWorkName ? (0, _getLocale.getLocale)(
|
|
138
|
+
}, !parent.parentWorkName ? (0, _getLocale.getLocale)('OKR_MyO_Pop_Aligneobjective') : (0, _openData.parseString)(parent.parentWorkName)), !!parent.parentWorkName && /*#__PURE__*/_react["default"].createElement("a", {
|
|
137
139
|
className: "tu-icon-cross",
|
|
138
140
|
onClick: iconCrossClickHandler
|
|
139
141
|
}), /*#__PURE__*/_react["default"].createElement("i", {
|