@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
|
@@ -9,18 +9,18 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _titaUi = require("tita-ui");
|
|
13
|
-
|
|
14
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
13
|
|
|
14
|
+
var _richEditor = require("@titaui/rich-editor");
|
|
15
|
+
|
|
16
|
+
var _titaUi = require("tita-ui");
|
|
17
|
+
|
|
16
18
|
var _userSelector = _interopRequireDefault(require("../../../user-selector"));
|
|
17
19
|
|
|
18
20
|
var _confidence = _interopRequireDefault(require("../../../confidence"));
|
|
19
21
|
|
|
20
22
|
var _bsGlobal = require("../../../../utils/bs-global");
|
|
21
23
|
|
|
22
|
-
var _dom = require("./dom");
|
|
23
|
-
|
|
24
24
|
var _requestApis = require("../../request-apis");
|
|
25
25
|
|
|
26
26
|
var _getLocale = require("../../../../utils/getLocale");
|
|
@@ -51,7 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
51
51
|
|
|
52
52
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
53
|
|
|
54
|
-
var preCls =
|
|
54
|
+
var preCls = 'okr-list-create-kr';
|
|
55
55
|
|
|
56
56
|
function CreateKr(_ref) {
|
|
57
57
|
var startDate = _ref.startDate,
|
|
@@ -62,17 +62,22 @@ function CreateKr(_ref) {
|
|
|
62
62
|
onHide = _ref.onHide;
|
|
63
63
|
var dataRef = (0, _react.useRef)();
|
|
64
64
|
|
|
65
|
-
var _useState = (0, _react.useState)(
|
|
65
|
+
var _useState = (0, _react.useState)({
|
|
66
|
+
pureText: '',
|
|
67
|
+
pureTextExcludeAt: '',
|
|
68
|
+
mentionUsers: [],
|
|
69
|
+
richText: undefined
|
|
70
|
+
}),
|
|
66
71
|
_useState2 = _slicedToArray(_useState, 2),
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
krNameData = _useState2[0],
|
|
73
|
+
setKrNameData = _useState2[1];
|
|
69
74
|
|
|
70
75
|
var _useState3 = (0, _react.useState)(false),
|
|
71
76
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
72
77
|
showTip = _useState4[0],
|
|
73
78
|
setShowTip = _useState4[1];
|
|
74
79
|
|
|
75
|
-
var tipsEnable = localStorage.getItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id)) !=
|
|
80
|
+
var tipsEnable = localStorage.getItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id)) != 'false';
|
|
76
81
|
|
|
77
82
|
var _useState5 = (0, _react.useState)(5),
|
|
78
83
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
@@ -97,11 +102,14 @@ function CreateKr(_ref) {
|
|
|
97
102
|
}),
|
|
98
103
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
99
104
|
user = _useState8[0],
|
|
100
|
-
setUser = _useState8[1];
|
|
105
|
+
setUser = _useState8[1]; // const inputRef =
|
|
106
|
+
// useRef<HTMLInputElement>() as React.RefObject<HTMLInputElement>
|
|
107
|
+
|
|
101
108
|
|
|
102
|
-
var
|
|
109
|
+
var mentionInputRef = (0, _react.useRef)();
|
|
110
|
+
var pendingRef = (0, _react.useRef)(false);
|
|
103
111
|
dataRef.current = _objectSpread(_objectSpread({}, dataRef.current), {}, {
|
|
104
|
-
|
|
112
|
+
krNameData: krNameData,
|
|
105
113
|
user: user,
|
|
106
114
|
startDate: startDate,
|
|
107
115
|
endDate: endDate,
|
|
@@ -110,23 +118,34 @@ function CreateKr(_ref) {
|
|
|
110
118
|
getWrapperRef: getWrapperRef,
|
|
111
119
|
onHide: onHide
|
|
112
120
|
});
|
|
113
|
-
var
|
|
121
|
+
var createKr = (0, _react.useCallback)(function () {
|
|
114
122
|
// 选中了选人组件中的item
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
// if (hasAncestorElement(e.target, 'titaui-popup')) return
|
|
124
|
+
// if (
|
|
125
|
+
// dataRef.current.getWrapperRef().current &&
|
|
126
|
+
// dataRef.current.getWrapperRef().current.contains(e.target as Node)
|
|
127
|
+
// ) {
|
|
128
|
+
// return
|
|
129
|
+
// }
|
|
130
|
+
var _dataRef$current$krNa = dataRef.current.krNameData,
|
|
131
|
+
mentionUsers = _dataRef$current$krNa.mentionUsers,
|
|
132
|
+
pureText = _dataRef$current$krNa.pureText,
|
|
133
|
+
richText = _dataRef$current$krNa.richText;
|
|
134
|
+
|
|
135
|
+
if (pureText.trim()) {
|
|
122
136
|
(0, _requestApis.createNewKr)({
|
|
123
137
|
PrincipalId: dataRef.current.user.id,
|
|
124
|
-
mileStoneName:
|
|
138
|
+
mileStoneName: pureText,
|
|
139
|
+
mileStoneNameRichText: richText,
|
|
140
|
+
aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
|
|
141
|
+
return user.mentionId;
|
|
142
|
+
}),
|
|
125
143
|
startDate: dataRef.current.startDate,
|
|
126
144
|
endDate: dataRef.current.endDate,
|
|
127
145
|
workId: dataRef.current.workId,
|
|
128
146
|
confidenceIndex: confidenceIndex
|
|
129
147
|
}).then(function (res) {
|
|
148
|
+
setShowTip(false);
|
|
130
149
|
dataRef.current.addKr(res);
|
|
131
150
|
dataRef.current.onHide();
|
|
132
151
|
});
|
|
@@ -137,26 +156,35 @@ function CreateKr(_ref) {
|
|
|
137
156
|
|
|
138
157
|
var focus = function focus() {
|
|
139
158
|
setTimeout(function () {
|
|
140
|
-
|
|
159
|
+
var _mentionInputRef$curr, _mentionInputRef$curr2;
|
|
160
|
+
|
|
161
|
+
(_mentionInputRef$curr = mentionInputRef.current) === null || _mentionInputRef$curr === void 0 ? void 0 : (_mentionInputRef$curr2 = _mentionInputRef$curr.methods()) === null || _mentionInputRef$curr2 === void 0 ? void 0 : _mentionInputRef$curr2.focus();
|
|
141
162
|
}, 0);
|
|
142
|
-
};
|
|
163
|
+
}; // useEffect(() => {
|
|
164
|
+
// document.addEventListener('click', create, false)
|
|
165
|
+
// return () => document.removeEventListener('click', create)
|
|
166
|
+
// }, [])
|
|
167
|
+
|
|
143
168
|
|
|
144
|
-
(0, _react.useEffect)(function () {
|
|
145
|
-
document.addEventListener("click", create, false);
|
|
146
|
-
return function () {
|
|
147
|
-
return document.removeEventListener("click", create);
|
|
148
|
-
};
|
|
149
|
-
}, []);
|
|
150
169
|
(0, _react.useEffect)(function () {
|
|
151
170
|
focus();
|
|
152
171
|
}, []);
|
|
153
172
|
|
|
154
173
|
var onInputKeyDown = function onInputKeyDown(e) {
|
|
155
|
-
if (e.key.toLocaleLowerCase() ==
|
|
156
|
-
|
|
174
|
+
if (e.key.toLocaleLowerCase() == 'enter' && !pendingRef.current) {
|
|
175
|
+
pendingRef.current = true;
|
|
176
|
+
var mentionUsers = krNameData.mentionUsers,
|
|
177
|
+
pureText = krNameData.pureText,
|
|
178
|
+
richText = krNameData.richText;
|
|
179
|
+
|
|
180
|
+
if (pureText.trim()) {
|
|
157
181
|
(0, _requestApis.createNewKr)({
|
|
158
182
|
PrincipalId: user.id,
|
|
159
|
-
mileStoneName:
|
|
183
|
+
mileStoneName: pureText,
|
|
184
|
+
mileStoneNameRichText: richText,
|
|
185
|
+
aiteUsers: mentionUsers === null || mentionUsers === void 0 ? void 0 : mentionUsers.map(function (user) {
|
|
186
|
+
return user.mentionId;
|
|
187
|
+
}),
|
|
160
188
|
startDate: startDate,
|
|
161
189
|
endDate: endDate,
|
|
162
190
|
workId: workId,
|
|
@@ -164,19 +192,15 @@ function CreateKr(_ref) {
|
|
|
164
192
|
}).then(function (res) {
|
|
165
193
|
addKr(res);
|
|
166
194
|
onHide();
|
|
195
|
+
pendingRef.current = false;
|
|
167
196
|
});
|
|
168
197
|
} else {
|
|
169
198
|
onHide();
|
|
199
|
+
pendingRef.current = false;
|
|
170
200
|
}
|
|
171
201
|
}
|
|
172
202
|
};
|
|
173
203
|
|
|
174
|
-
var onBlur = function onBlur() {
|
|
175
|
-
setTimeout(function () {
|
|
176
|
-
setShowTip(false);
|
|
177
|
-
}, 200);
|
|
178
|
-
};
|
|
179
|
-
|
|
180
204
|
var onFocus = function onFocus() {
|
|
181
205
|
tipsEnable && !dataRef.current.hideTips && setShowTip(true);
|
|
182
206
|
};
|
|
@@ -193,7 +217,7 @@ function CreateKr(_ref) {
|
|
|
193
217
|
|
|
194
218
|
var onNoMoreShow = function onNoMoreShow() {
|
|
195
219
|
setShowTip(false);
|
|
196
|
-
localStorage.setItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id),
|
|
220
|
+
localStorage.setItem("list_create_kr_tips_".concat((0, _bsGlobal.getUserInfo)().Id), 'false');
|
|
197
221
|
};
|
|
198
222
|
|
|
199
223
|
var onUserSubmit = function onUserSubmit(_ref2) {
|
|
@@ -216,33 +240,31 @@ function CreateKr(_ref) {
|
|
|
216
240
|
className: preCls
|
|
217
241
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
218
242
|
className: (0, _classnames["default"])("".concat(preCls, "__input"))
|
|
219
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
onChange: function onChange(e) {
|
|
224
|
-
return setKrName(e.target.value);
|
|
225
|
-
},
|
|
243
|
+
}, /*#__PURE__*/_react["default"].createElement(_richEditor.TitaInlineRichEditor, {
|
|
244
|
+
initialState: undefined,
|
|
245
|
+
onDocChange: setKrNameData,
|
|
246
|
+
onBlur: createKr,
|
|
226
247
|
onFocus: onFocus,
|
|
227
|
-
|
|
228
|
-
|
|
248
|
+
onKeyDown: onInputKeyDown,
|
|
249
|
+
placeholder: (0, _getLocale.getLocale)('OKR_MyO_Text_Createkeyr'),
|
|
250
|
+
ref: mentionInputRef
|
|
229
251
|
}), /*#__PURE__*/_react["default"].createElement("p", {
|
|
230
252
|
style: {
|
|
231
|
-
display: showTip ?
|
|
253
|
+
display: showTip ? 'block' : 'none',
|
|
232
254
|
zIndex: 1
|
|
233
255
|
},
|
|
234
256
|
onClick: stopPropagation
|
|
235
|
-
}, (0, _getLocale.getLocale)(
|
|
257
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Text_Recommendation'), /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement("p", null, (0, _getLocale.getLocale)('OKR_MyO_Text_ExampleC')), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("a", {
|
|
236
258
|
onClick: onNextTalk
|
|
237
|
-
}, (0, _getLocale.getLocale)(
|
|
259
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Nexttime')), /*#__PURE__*/_react["default"].createElement("a", {
|
|
238
260
|
onClick: onNoMoreShow
|
|
239
|
-
}, (0, _getLocale.getLocale)(
|
|
261
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Nomor')))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
240
262
|
className: (0, _classnames["default"])("".concat(preCls, "__heart"))
|
|
241
263
|
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
242
264
|
content: "\u4FEE\u65391"
|
|
243
265
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
244
266
|
style: {
|
|
245
|
-
display:
|
|
267
|
+
display: 'inline-flex'
|
|
246
268
|
}
|
|
247
269
|
}, /*#__PURE__*/_react["default"].createElement(_confidence["default"], {
|
|
248
270
|
editable: true,
|
|
@@ -120,3 +120,12 @@
|
|
|
120
120
|
color: #a4acb9;
|
|
121
121
|
line-height: 22px;
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
.okr-detail-okrs-list .tita-okrdt-tree {
|
|
125
|
+
overflow: visible;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.okr-detail-okrs-list .tita-okrdt-tree .titaui-tree,
|
|
129
|
+
.okr-detail-okrs-list .tita-okrdt-tree .rc-tree-list-holder {
|
|
130
|
+
overflow: visible;
|
|
131
|
+
}
|
|
@@ -96,16 +96,16 @@ var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
|
96
96
|
Id = _getUserInfo.Id,
|
|
97
97
|
UserAvatar = _getUserInfo.UserAvatar;
|
|
98
98
|
|
|
99
|
-
var preCls =
|
|
99
|
+
var preCls = 'okr-detail-okrs-list';
|
|
100
100
|
|
|
101
101
|
var treeDataFormate = function treeDataFormate(nodes) {
|
|
102
|
-
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
|
|
102
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'kr';
|
|
103
103
|
var canEditOkr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
104
104
|
var formateNodes = [];
|
|
105
105
|
nodes.forEach(function (it, index) {
|
|
106
|
-
var title = "";
|
|
107
|
-
|
|
108
|
-
if (type ==
|
|
106
|
+
var title = ''; // if (type == "kr" || type == "kr-parent") title = it.mileStoneName;
|
|
107
|
+
|
|
108
|
+
if (type == 'o-child' || type == 'o-parent') title = it.workName;
|
|
109
109
|
formateNodes.push({
|
|
110
110
|
key: it.mileStoneId,
|
|
111
111
|
index: index,
|
|
@@ -208,7 +208,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
208
208
|
});
|
|
209
209
|
|
|
210
210
|
if (authChildWorks.length > 0) {
|
|
211
|
-
setChildOkrs(treeDataFormate(authChildWorks,
|
|
211
|
+
setChildOkrs(treeDataFormate(authChildWorks, 'o-child'));
|
|
212
212
|
} else {
|
|
213
213
|
setChildOkrs(null);
|
|
214
214
|
}
|
|
@@ -279,7 +279,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
279
279
|
updateKrs();
|
|
280
280
|
}, []);
|
|
281
281
|
(0, _react.useEffect)(function () {
|
|
282
|
-
var strucKrs = treeDataFormate(pureKrs,
|
|
282
|
+
var strucKrs = treeDataFormate(pureKrs, 'kr', canEditOkr);
|
|
283
283
|
setKrs(strucKrs);
|
|
284
284
|
}, [pureKrs, canEditOkr]);
|
|
285
285
|
|
|
@@ -287,7 +287,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
287
287
|
refreshAll();
|
|
288
288
|
updateKrs();
|
|
289
289
|
|
|
290
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
290
|
+
_toast["default"].Success((0, _getLocale.getLocale)('OKR_Db_Success'), {
|
|
291
291
|
canClose: false
|
|
292
292
|
});
|
|
293
293
|
};
|
|
@@ -326,7 +326,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
326
326
|
|
|
327
327
|
(0, _requestApis.updateParentId)(params).then(function (data) {
|
|
328
328
|
if (data.Code == 1) {
|
|
329
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
329
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
330
330
|
|
|
331
331
|
setGeneralParent({
|
|
332
332
|
parentId: params.parentId,
|
|
@@ -378,7 +378,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
378
378
|
if (!canEditOkr) return;
|
|
379
379
|
var dropNode = info.node;
|
|
380
380
|
var dragNode = info.dragNode;
|
|
381
|
-
var dropPos = info.node.pos.split(
|
|
381
|
+
var dropPos = info.node.pos.split('-');
|
|
382
382
|
var dropPosition = info.dropPosition - Number(dropPos[dropPos.length - 1]); // 移动类型,after 1 before 2
|
|
383
383
|
|
|
384
384
|
var isDown = dropPosition != -1;
|
|
@@ -412,17 +412,17 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
412
412
|
parentOkr: parentOkr
|
|
413
413
|
});
|
|
414
414
|
|
|
415
|
-
okrParent = treeDataFormate([newParentKr],
|
|
415
|
+
okrParent = treeDataFormate([newParentKr], 'kr-parent');
|
|
416
416
|
} else if (parentOkr) {
|
|
417
|
-
okrParent = treeDataFormate([parentOkr],
|
|
417
|
+
okrParent = treeDataFormate([parentOkr], 'o-parent');
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
var isShowAlignOkr = (0, _react.useMemo)(function () {
|
|
421
|
-
return childOkrs && childOkrs.length > 0 // 有子目标
|
|
422
|
-
||
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
421
|
+
return childOkrs && childOkrs.length > 0 || // 有子目标
|
|
422
|
+
parentOkr || // 有父目标
|
|
423
|
+
!parentOkr && canEditOkr;
|
|
424
|
+
}, // 无父目标但有权限编辑
|
|
425
|
+
[parentOkr, childOkrs, canEditOkr]);
|
|
426
426
|
|
|
427
427
|
var renderKrs = function renderKrs() {
|
|
428
428
|
var _classNames;
|
|
@@ -434,9 +434,9 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
434
434
|
},
|
|
435
435
|
canEditOkr: canEditOkr || isInnerUser,
|
|
436
436
|
style: isShowAlignOkr ? {
|
|
437
|
-
padding:
|
|
437
|
+
padding: '40px 0 24px 0'
|
|
438
438
|
} : {
|
|
439
|
-
padding:
|
|
439
|
+
padding: '100px 0'
|
|
440
440
|
}
|
|
441
441
|
});
|
|
442
442
|
}
|
|
@@ -451,7 +451,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
451
451
|
okrInfo: okrInfo,
|
|
452
452
|
draggable: canEditOkr && (okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState) === _helper.EApproveStatus.UnderApproval,
|
|
453
453
|
onDrop: onOkrItemDropHandler
|
|
454
|
-
}))), (canEditOkr || isInnerUser) && (0, _helper.getApprovalOkr)(approvalSetting,
|
|
454
|
+
}))), (canEditOkr || isInnerUser) && (0, _helper.getApprovalOkr)(approvalSetting, 'createOkr', okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
455
455
|
ref: wrapperRef,
|
|
456
456
|
className: (0, _classnames["default"])("".concat(preCls, "__addkr"))
|
|
457
457
|
}, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, createKrShow ? /*#__PURE__*/_react["default"].createElement(_createKrItem["default"], {
|
|
@@ -470,10 +470,10 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
470
470
|
return setCreateKrShow(true);
|
|
471
471
|
}
|
|
472
472
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
473
|
-
className: (0, _classnames["default"])("".concat(preCls, "__addkr-prefix"),
|
|
473
|
+
className: (0, _classnames["default"])("".concat(preCls, "__addkr-prefix"), 'tu-icon-add1')
|
|
474
474
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
475
475
|
className: (0, _classnames["default"])("".concat(preCls, "__addkr-text"))
|
|
476
|
-
}, (0, _getLocale.getLocale)(
|
|
476
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Butt_AddKR'))))));
|
|
477
477
|
};
|
|
478
478
|
|
|
479
479
|
return /*#__PURE__*/_react["default"].createElement(_context2.OkrListContext.Provider, {
|
|
@@ -489,13 +489,13 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
489
489
|
className: (0, _classnames["default"])(preCls)
|
|
490
490
|
}, !loading ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, renderKrs(), isShowAlignOkr && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_blockLine["default"], {
|
|
491
491
|
style: {
|
|
492
|
-
padding:
|
|
492
|
+
padding: '0 32px'
|
|
493
493
|
}
|
|
494
494
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
495
495
|
className: (0, _classnames["default"])("".concat(preCls, "__align-to"))
|
|
496
496
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
497
497
|
className: (0, _classnames["default"])("".concat(preCls, "__align-to-title"))
|
|
498
|
-
}, (0, _getLocale.getLocale)(
|
|
498
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_SetAlignment')), !parentOkr && canEditOkr ? /*#__PURE__*/_react["default"].createElement(_addParentOkr["default"], {
|
|
499
499
|
onClick: onAddParentOkrHandler
|
|
500
500
|
}) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
501
501
|
className: (0, _classnames["default"])("".concat(preCls, "__align-to-tree"))
|
|
@@ -508,7 +508,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
508
508
|
onClick: function onClick() {
|
|
509
509
|
return setIsOpened(!isOpened);
|
|
510
510
|
}
|
|
511
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)(
|
|
511
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_KRP_OKRs_Alignedmeobje'), "\uFF08", childOkrs.length, "\uFF09")), /*#__PURE__*/_react["default"].createElement(_reactCollapse.Collapse, {
|
|
512
512
|
isOpened: isOpened
|
|
513
513
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
514
514
|
className: (0, _classnames["default"])("".concat(preCls, "__align-on-tree"))
|