@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
|
@@ -25,18 +25,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
25
|
|
|
26
26
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
27
|
|
|
28
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
-
|
|
30
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
-
|
|
32
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
|
-
|
|
34
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
|
-
|
|
36
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
37
|
-
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
28
|
var PickerTrigger = function PickerTrigger(props) {
|
|
41
29
|
var children = props.children,
|
|
42
30
|
viewDate = props.viewDate,
|
|
@@ -45,29 +33,13 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
45
33
|
_props$allowClear = props.allowClear,
|
|
46
34
|
allowClear = _props$allowClear === void 0 ? false : _props$allowClear,
|
|
47
35
|
placeholder = props.placeholder,
|
|
48
|
-
_onClick = props.onClick
|
|
49
|
-
viewDateRange = props.viewDateRange;
|
|
36
|
+
_onClick = props.onClick;
|
|
50
37
|
|
|
51
38
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
52
39
|
mode = _useContext.mode,
|
|
53
40
|
format = _useContext.format,
|
|
54
41
|
value = _useContext.value;
|
|
55
42
|
|
|
56
|
-
var _useState = (0, _react.useState)(false),
|
|
57
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
-
isCkeckTime = _useState2[0],
|
|
59
|
-
setIsCheckTime = _useState2[1];
|
|
60
|
-
|
|
61
|
-
var _useState3 = (0, _react.useState)(value),
|
|
62
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
-
firstValue = _useState4[0],
|
|
64
|
-
setFirstValue = _useState4[1];
|
|
65
|
-
|
|
66
|
-
var _useState5 = (0, _react.useState)(mode),
|
|
67
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
|
-
modeType = _useState6[0],
|
|
69
|
-
setModeType = _useState6[1];
|
|
70
|
-
|
|
71
43
|
var currFormat = format;
|
|
72
44
|
|
|
73
45
|
switch (mode) {
|
|
@@ -88,23 +60,6 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
88
60
|
break;
|
|
89
61
|
}
|
|
90
62
|
|
|
91
|
-
(0, _react.useEffect)(function () {
|
|
92
|
-
if (modeType === mode) {
|
|
93
|
-
if (firstValue !== value) {
|
|
94
|
-
setIsCheckTime(true);
|
|
95
|
-
}
|
|
96
|
-
} else {
|
|
97
|
-
setModeType(mode);
|
|
98
|
-
|
|
99
|
-
if (viewDateRange) {
|
|
100
|
-
setFirstValue(viewDateRange);
|
|
101
|
-
} else {
|
|
102
|
-
setFirstValue(value);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
setIsCheckTime(false);
|
|
106
|
-
}
|
|
107
|
-
}, [value, mode, viewDateRange]);
|
|
108
63
|
return (
|
|
109
64
|
/*#__PURE__*/
|
|
110
65
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
@@ -119,7 +74,7 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
119
74
|
}
|
|
120
75
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
121
76
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__input"), _defineProperty({}, "".concat(_utils.PickerTriggerClass, "__input--placeholder"), !value && placeholder))
|
|
122
|
-
},
|
|
77
|
+
}, value ? viewDate.format(currFormat) : placeholder), /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
78
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__operation"))
|
|
124
79
|
}, !disabled && /*#__PURE__*/_react["default"].createElement("span", {
|
|
125
80
|
className: "tu-icon-caret-down"
|
|
@@ -13,8 +13,6 @@ var _moment = _interopRequireDefault(require("moment"));
|
|
|
13
13
|
|
|
14
14
|
var _datePanel = _interopRequireDefault(require("./components/panels/date-panel"));
|
|
15
15
|
|
|
16
|
-
var _weekPanel = _interopRequireDefault(require("./components/panels/week-panel"));
|
|
17
|
-
|
|
18
16
|
var _monthPanel = _interopRequireDefault(require("./components/panels/month-panel"));
|
|
19
17
|
|
|
20
18
|
var _yearPanel = _interopRequireDefault(require("./components/panels/year-panel"));
|
|
@@ -47,8 +45,7 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
47
45
|
onChange = props.onChange,
|
|
48
46
|
onClose = props.onClose,
|
|
49
47
|
_props$value = props.value,
|
|
50
|
-
value = _props$value === void 0 ? (0, _moment["default"])() : _props$value
|
|
51
|
-
valueRange = props.valueRange;
|
|
48
|
+
value = _props$value === void 0 ? (0, _moment["default"])() : _props$value;
|
|
52
49
|
|
|
53
50
|
var _useState = (0, _react.useState)(mode),
|
|
54
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -60,24 +57,10 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
60
57
|
viewDate = _useState4[0],
|
|
61
58
|
setViewDate = _useState4[1];
|
|
62
59
|
|
|
63
|
-
var
|
|
64
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
65
|
-
viewDateRange = _useState6[0],
|
|
66
|
-
setViewDateRange = _useState6[1];
|
|
67
|
-
|
|
68
|
-
var _useState7 = (0, _react.useState)(valueRange === null || valueRange === void 0 ? void 0 : valueRange.split('~')[0]),
|
|
69
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
70
|
-
viewDateStart = _useState8[0],
|
|
71
|
-
setViewDateStart = _useState8[1];
|
|
72
|
-
|
|
73
|
-
var onViewDateChange = function onViewDateChange(date, type) {
|
|
60
|
+
var onViewDateChange = function onViewDateChange(date) {
|
|
74
61
|
setViewDate(function () {
|
|
75
62
|
return date;
|
|
76
63
|
});
|
|
77
|
-
|
|
78
|
-
if (type === 'week') {
|
|
79
|
-
setViewDateStart(date);
|
|
80
|
-
}
|
|
81
64
|
};
|
|
82
65
|
|
|
83
66
|
var onPanelChange = function onPanelChange(viewDate, type) {
|
|
@@ -102,24 +85,13 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
102
85
|
onCloseHandler();
|
|
103
86
|
};
|
|
104
87
|
|
|
105
|
-
var onWeekSelect = function onWeekSelect(date, year) {
|
|
106
|
-
if (onChange) {
|
|
107
|
-
onChange(date, 'week', year);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
onCloseHandler();
|
|
111
|
-
};
|
|
112
|
-
|
|
113
88
|
var onMonthSelect = function onMonthSelect(date) {
|
|
114
89
|
setViewDate(function () {
|
|
115
90
|
return date;
|
|
116
91
|
});
|
|
117
92
|
|
|
118
|
-
if (mode !== "month"
|
|
93
|
+
if (mode !== "month") {
|
|
119
94
|
onPanelChange(date, "date");
|
|
120
|
-
} else if (mode === 'week') {
|
|
121
|
-
setViewDateStart("".concat((0, _moment["default"])(date).year(), "/").concat((0, _moment["default"])(date).month() + 1, "/1"));
|
|
122
|
-
onPanelChange(date, "week");
|
|
123
95
|
}
|
|
124
96
|
|
|
125
97
|
if (onChange) {
|
|
@@ -145,7 +117,7 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
145
117
|
onCloseHandler();
|
|
146
118
|
};
|
|
147
119
|
|
|
148
|
-
var onSelectChange = function onSelectChange(date, type
|
|
120
|
+
var onSelectChange = function onSelectChange(date, type) {
|
|
149
121
|
switch (type) {
|
|
150
122
|
case "date":
|
|
151
123
|
onDateSelect(date);
|
|
@@ -159,10 +131,6 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
159
131
|
onYearSelect(date);
|
|
160
132
|
break;
|
|
161
133
|
|
|
162
|
-
case "week":
|
|
163
|
-
onWeekSelect(date, year);
|
|
164
|
-
break;
|
|
165
|
-
|
|
166
134
|
default:
|
|
167
135
|
break;
|
|
168
136
|
}
|
|
@@ -180,15 +148,6 @@ var PickerPanels = function PickerPanels(props) {
|
|
|
180
148
|
});
|
|
181
149
|
break;
|
|
182
150
|
|
|
183
|
-
case "week":
|
|
184
|
-
panel = /*#__PURE__*/_react["default"].createElement(_weekPanel["default"], {
|
|
185
|
-
viewDateStart: viewDateStart,
|
|
186
|
-
onSelect: onSelectChange,
|
|
187
|
-
onViewDateChange: onViewDateChange,
|
|
188
|
-
onPanelChange: onPanelChange
|
|
189
|
-
});
|
|
190
|
-
break;
|
|
191
|
-
|
|
192
151
|
case "month":
|
|
193
152
|
panel = /*#__PURE__*/_react["default"].createElement(_monthPanel["default"], {
|
|
194
153
|
viewDate: viewDate,
|
|
@@ -25,7 +25,7 @@ var _utils = require("./utils");
|
|
|
25
25
|
|
|
26
26
|
require("./index.css");
|
|
27
27
|
|
|
28
|
-
var _excluded = ["onChange", "format", "value", "mode", "children", "popupPlacement", "direction", "onPopupVisibleChange", "visible"
|
|
28
|
+
var _excluded = ["onChange", "format", "value", "mode", "children", "popupPlacement", "direction", "onPopupVisibleChange", "visible"];
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
31
|
|
|
@@ -62,7 +62,6 @@ var Picker = function Picker(props) {
|
|
|
62
62
|
onPopupVisibleChange = props.onPopupVisibleChange,
|
|
63
63
|
_props$visible = props.visible,
|
|
64
64
|
visible = _props$visible === void 0 ? false : _props$visible,
|
|
65
|
-
valueRange = props.valueRange,
|
|
66
65
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
67
66
|
|
|
68
67
|
var _useState = (0, _react.useState)(visible),
|
|
@@ -78,11 +77,9 @@ var Picker = function Picker(props) {
|
|
|
78
77
|
return direction === "rtl" ? "bottomRight" : "bottomLeft";
|
|
79
78
|
};
|
|
80
79
|
|
|
81
|
-
var onChangeHandler = function onChangeHandler(date
|
|
82
|
-
if (onChange
|
|
80
|
+
var onChangeHandler = function onChangeHandler(date) {
|
|
81
|
+
if (onChange) {
|
|
83
82
|
onChange(date);
|
|
84
|
-
} else if (onChange && mode === 'week') {
|
|
85
|
-
onChange(date, 'week', year);
|
|
86
83
|
}
|
|
87
84
|
};
|
|
88
85
|
|
|
@@ -115,7 +112,6 @@ var Picker = function Picker(props) {
|
|
|
115
112
|
onPopupVisibleChange: handlePopupVisibleChange
|
|
116
113
|
}, restProps), /*#__PURE__*/_react["default"].createElement(_pickerTrigger["default"], _extends({
|
|
117
114
|
viewDate: (0, _moment["default"])(value),
|
|
118
|
-
viewDateRange: valueRange,
|
|
119
115
|
onClick: function onClick() {
|
|
120
116
|
return setPopupVisible(true);
|
|
121
117
|
}
|
|
@@ -5,36 +5,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
|
|
8
|
+
var _openData = require("../../utils/open-data");
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
9
11
|
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
13
|
|
|
12
14
|
var SearchKeyHandle = function SearchKeyHandle(_ref) {
|
|
13
15
|
var _ref$str = _ref.str,
|
|
14
|
-
str = _ref$str === void 0 ?
|
|
16
|
+
str = _ref$str === void 0 ? '' : _ref$str,
|
|
15
17
|
_ref$keyWord = _ref.keyWord,
|
|
16
|
-
keyWord = _ref$keyWord === void 0 ?
|
|
18
|
+
keyWord = _ref$keyWord === void 0 ? '' : _ref$keyWord,
|
|
17
19
|
_ref$color = _ref.color,
|
|
18
|
-
color = _ref$color === void 0 ?
|
|
19
|
-
if (!str || !keyWord) return /*#__PURE__*/_react["default"].createElement("span", null, str);
|
|
20
|
+
color = _ref$color === void 0 ? '#F05E5E' : _ref$color;
|
|
21
|
+
if (!str || !keyWord) return /*#__PURE__*/_react["default"].createElement("span", null, (0, _openData.parseString)(str));
|
|
20
22
|
var result = str.split(keyWord);
|
|
21
23
|
return /*#__PURE__*/_react["default"].createElement("span", null, result.map(function (item, index) {
|
|
22
24
|
if (index !== result.length - 1) {
|
|
23
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, item, /*#__PURE__*/_react["default"].createElement("span", {
|
|
25
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _openData.parseString)(item), /*#__PURE__*/_react["default"].createElement("span", {
|
|
24
26
|
style: {
|
|
25
27
|
color: color
|
|
26
28
|
}
|
|
27
|
-
}, keyWord));
|
|
29
|
+
}, (0, _openData.parseString)(keyWord)));
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
return item;
|
|
32
|
+
return (0, _openData.parseString)(item);
|
|
31
33
|
}));
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
SearchKeyHandle.defaultProps = {
|
|
35
|
-
str:
|
|
36
|
-
keyWord:
|
|
37
|
-
color:
|
|
37
|
+
str: '',
|
|
38
|
+
keyWord: '',
|
|
39
|
+
color: ''
|
|
38
40
|
};
|
|
39
41
|
var _default = SearchKeyHandle;
|
|
40
42
|
exports["default"] = _default;
|
|
@@ -13,6 +13,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
15
15
|
|
|
16
|
+
var _tooltip = _interopRequireDefault(require("../tooltip"));
|
|
17
|
+
|
|
16
18
|
var _getLocale = require("../../utils/getLocale");
|
|
17
19
|
|
|
18
20
|
require("./index.css");
|
|
@@ -42,7 +44,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
42
44
|
onChangeSelect = props.onChangeSelect,
|
|
43
45
|
items = props.items,
|
|
44
46
|
_props$initText = props.initText,
|
|
45
|
-
initText = _props$initText === void 0 ? (0, _getLocale.getLocale)(
|
|
47
|
+
initText = _props$initText === void 0 ? (0, _getLocale.getLocale)('OKR_MyO_E_Temporarilynone') : _props$initText,
|
|
46
48
|
popupProps = props.popupProps,
|
|
47
49
|
renderPrefixIcon = props.renderPrefixIcon,
|
|
48
50
|
renderSuffixIcon = props.renderSuffixIcon,
|
|
@@ -82,13 +84,25 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
82
84
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
85
|
className: "select-layout__layer-select-wrapper"
|
|
84
86
|
}, items.map(function (item, index) {
|
|
87
|
+
if (item.toolText) return /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
88
|
+
placement: "top",
|
|
89
|
+
overlay: item.toolText
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
+
key: index,
|
|
92
|
+
onClick: function onClick(e) {
|
|
93
|
+
return handleSelectItem(item);
|
|
94
|
+
},
|
|
95
|
+
className: (0, _classnames["default"])('select-layout__layer-select-text', {
|
|
96
|
+
'select-layout__layer-select-text--active': selectItem && item.value === selectItem.value
|
|
97
|
+
})
|
|
98
|
+
}, item.label)));
|
|
85
99
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
100
|
key: index,
|
|
87
101
|
onClick: function onClick(e) {
|
|
88
102
|
return handleSelectItem(item);
|
|
89
103
|
},
|
|
90
|
-
className: (0, _classnames["default"])(
|
|
91
|
-
|
|
104
|
+
className: (0, _classnames["default"])('select-layout__layer-select-text', {
|
|
105
|
+
'select-layout__layer-select-text--active': selectItem && item.value === selectItem.value
|
|
92
106
|
})
|
|
93
107
|
}, item.label);
|
|
94
108
|
}));
|
|
@@ -113,9 +127,9 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
113
127
|
}
|
|
114
128
|
|
|
115
129
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
116
|
-
className: (0, _classnames["default"])(
|
|
117
|
-
|
|
118
|
-
|
|
130
|
+
className: (0, _classnames["default"])('select-layout__layer-text', {
|
|
131
|
+
'select-layout__layer-text--focus': visible && canEdit,
|
|
132
|
+
'select-layout__layer-text--hidden-border': !canEdit
|
|
119
133
|
}),
|
|
120
134
|
onClick: handleClickText
|
|
121
135
|
}, renderPrefixIcon && /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -136,7 +150,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
136
150
|
// @ts-ignore
|
|
137
151
|
_react["default"].createElement(_popup["default"], _extends({
|
|
138
152
|
popupVisible: visible,
|
|
139
|
-
action: [
|
|
153
|
+
action: ['click'],
|
|
140
154
|
destroyPopupOnHide: true,
|
|
141
155
|
popup: renderSelection,
|
|
142
156
|
mask: false,
|
|
@@ -144,7 +158,7 @@ var SelectLayer = function SelectLayer(props) {
|
|
|
144
158
|
return popupRef.current;
|
|
145
159
|
},
|
|
146
160
|
popupStyle: {
|
|
147
|
-
width:
|
|
161
|
+
width: '100%'
|
|
148
162
|
}
|
|
149
163
|
}, popupProps, {
|
|
150
164
|
onPopupVisibleChange: function onPopupVisibleChange(visible) {
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.formatDateStr = void 0;
|
|
7
|
-
exports.formatPeriodPlanData = formatPeriodPlanData;
|
|
8
|
-
exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = void 0;
|
|
6
|
+
exports.lableTypeMap = exports.isOpenWorkManage = exports.isOpenOkrManage = exports.isOpenLabel = exports.formatDateStr = void 0;
|
|
9
7
|
exports.momentDate = momentDate;
|
|
10
8
|
exports.workStatus = exports.timeFormat = exports.preCls = exports.okrStatus = void 0;
|
|
11
9
|
|
|
@@ -13,8 +11,6 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
13
11
|
|
|
14
12
|
var _getLocale = require("../../utils/getLocale");
|
|
15
13
|
|
|
16
|
-
var _planDataJson = require("../../utils/planDataJson");
|
|
17
|
-
|
|
18
14
|
var preCls = "titaui-task-relation";
|
|
19
15
|
exports.preCls = preCls;
|
|
20
16
|
var isOpenOkrManage = (0, _bsGlobal.getAppHead)("113"); // 开通OKR
|
|
@@ -125,55 +121,4 @@ exports.workStatus = workStatus;
|
|
|
125
121
|
function momentDate(date) {
|
|
126
122
|
var reg = new RegExp('年|月|日', 'g');
|
|
127
123
|
return date.replace(reg, '/').slice(0, -1);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function formatPeriodPlanData(period) {
|
|
131
|
-
var planData; // 获取选取年份的 dataJSON
|
|
132
|
-
|
|
133
|
-
var yearGroup = (0, _planDataJson.PlanDataJson)().find(function (p) {
|
|
134
|
-
return p.GroupName == period.annualNum + '';
|
|
135
|
-
}); // 年份下的 ‘年/季’ data
|
|
136
|
-
|
|
137
|
-
var seasonData = yearGroup ? yearGroup.PlanTableListModels.find(function (item) {
|
|
138
|
-
return item.TagName == (0, _getLocale.getLocale)('Tasks_Menu_Yearseason');
|
|
139
|
-
}) : null;
|
|
140
|
-
|
|
141
|
-
switch (period.cycleType) {
|
|
142
|
-
// case '-1': // 全部周期
|
|
143
|
-
// break;
|
|
144
|
-
case '0':
|
|
145
|
-
planData = {
|
|
146
|
-
StartDate: period.startDate,
|
|
147
|
-
EndDate: period.endDate
|
|
148
|
-
};
|
|
149
|
-
break;
|
|
150
|
-
|
|
151
|
-
case '1':
|
|
152
|
-
// 年度
|
|
153
|
-
planData = seasonData ? seasonData.PlanTableModels[0] : null;
|
|
154
|
-
break;
|
|
155
|
-
|
|
156
|
-
case '2':
|
|
157
|
-
planData = seasonData ? seasonData.PlanTableModels[period.yqmNum] : null; // 季度
|
|
158
|
-
|
|
159
|
-
break;
|
|
160
|
-
|
|
161
|
-
case '3':
|
|
162
|
-
// @ts-ignore
|
|
163
|
-
var monthData = yearGroup ? yearGroup.PlanTableListModels.find(function (p) {
|
|
164
|
-
return p.TagName == period.yqmNum + '月';
|
|
165
|
-
}) : null;
|
|
166
|
-
planData = monthData ? monthData.PlanTableModels[0] : null;
|
|
167
|
-
break;
|
|
168
|
-
|
|
169
|
-
default:
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
return {
|
|
174
|
-
endDate: planData ? period.cycleType == '0' ? planData.EndDate : momentDate(planData.EndDate || '') : '',
|
|
175
|
-
planTableId: planData && planData.PlanTableId,
|
|
176
|
-
planTableType: planData && planData.PlanTableType,
|
|
177
|
-
startDate: planData ? period.cycleType == '0' ? planData.StartDate : momentDate(planData.StartDate || '') : ''
|
|
178
|
-
};
|
|
179
124
|
}
|
|
@@ -21,8 +21,6 @@ var _taskStatusSelect = _interopRequireDefault(require("../../search/task-status
|
|
|
21
21
|
|
|
22
22
|
var _taskRelation = _interopRequireDefault(require("../../search/task-relation"));
|
|
23
23
|
|
|
24
|
-
var _helper = require("../../helper");
|
|
25
|
-
|
|
26
24
|
var _formatTime = require("../../../../utils/format-time");
|
|
27
25
|
|
|
28
26
|
var _getLocale = require("../../../../utils/getLocale");
|
|
@@ -85,12 +83,11 @@ function SearchForm(props) {
|
|
|
85
83
|
|
|
86
84
|
var dilagRef = (0, _react.useRef)(document.createElement('div'));
|
|
87
85
|
(0, _react.useEffect)(function () {
|
|
88
|
-
var planCycle = (0, _helper.formatPeriodPlanData)(cycle);
|
|
89
86
|
onChange(_objectSpread({
|
|
90
87
|
status: status,
|
|
91
88
|
keyWords: keyWords,
|
|
92
89
|
relation: relation
|
|
93
|
-
},
|
|
90
|
+
}, cycle));
|
|
94
91
|
}, [status, keyWords, cycle, relation]);
|
|
95
92
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
93
|
ref: dilagRef
|
|
@@ -32,10 +32,6 @@ var planTableTask = function planTableTask(params, pageNum, pageSize) {
|
|
|
32
32
|
keyWords = _params$keyWords === void 0 ? '' : _params$keyWords,
|
|
33
33
|
_params$status = params.status,
|
|
34
34
|
status = _params$status === void 0 ? 10 : _params$status,
|
|
35
|
-
_params$planTableId = params.planTableId,
|
|
36
|
-
planTableId = _params$planTableId === void 0 ? '' : _params$planTableId,
|
|
37
|
-
_params$planTableType = params.planTableType,
|
|
38
|
-
planTableType = _params$planTableType === void 0 ? '' : _params$planTableType,
|
|
39
35
|
_params$relation = params.relation,
|
|
40
36
|
relation = _params$relation === void 0 ? 0 : _params$relation;
|
|
41
37
|
|
|
@@ -54,8 +50,8 @@ var planTableTask = function planTableTask(params, pageNum, pageSize) {
|
|
|
54
50
|
EndDate: endDate,
|
|
55
51
|
startNum: pageNum,
|
|
56
52
|
count: pageSize,
|
|
57
|
-
planTableId: planTableId,
|
|
58
|
-
planTableType: planTableType,
|
|
53
|
+
// planTableId: planTableId,
|
|
54
|
+
// planTableType: planTableType,
|
|
59
55
|
fromLevel: 1,
|
|
60
56
|
toLevel: 1,
|
|
61
57
|
RelationType: relation,
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
6
|
-
color: #
|
|
6
|
+
color: #a4acb9;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.okr-relation-tree__header {
|
|
10
10
|
font-size: 12px;
|
|
11
11
|
font-weight: 400;
|
|
12
|
-
color: #
|
|
12
|
+
color: #a4acb9;
|
|
13
13
|
position: relative;
|
|
14
14
|
display: flex;
|
|
15
15
|
align-items: center;
|
|
@@ -90,7 +90,9 @@ var workData = function workData(params, pageNum, pageSize) {
|
|
|
90
90
|
status = _params$status === void 0 ? 0 : _params$status,
|
|
91
91
|
_params$relation = params.relation,
|
|
92
92
|
relation = _params$relation === void 0 ? 0 : _params$relation,
|
|
93
|
-
userIds = params.userIds
|
|
93
|
+
userIds = params.userIds,
|
|
94
|
+
_params$isGetMileston = params.isGetMilestone,
|
|
95
|
+
isGetMilestone = _params$isGetMileston === void 0 ? false : _params$isGetMileston;
|
|
94
96
|
var url = "work/list?toUserId=".concat(userIds || (0, _helpers.getLoginUserInfo)().Id);
|
|
95
97
|
return (0, _request.rpost)("v1")(url, {
|
|
96
98
|
keyWords: keyWords,
|
|
@@ -99,7 +101,8 @@ var workData = function workData(params, pageNum, pageSize) {
|
|
|
99
101
|
pageSize: pageSize,
|
|
100
102
|
relation: relation,
|
|
101
103
|
status: status,
|
|
102
|
-
userIds: userIds
|
|
104
|
+
userIds: userIds,
|
|
105
|
+
isGetMilestone: isGetMilestone
|
|
103
106
|
}).then(function (res) {
|
|
104
107
|
return res;
|
|
105
108
|
});
|
|
@@ -57,7 +57,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
57
57
|
|
|
58
58
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
59
|
|
|
60
|
-
var precls =
|
|
60
|
+
var precls = 'rel-work-tree';
|
|
61
61
|
|
|
62
62
|
function WorkTree() {
|
|
63
63
|
var _useContext = (0, _react.useContext)(_context2.Context),
|
|
@@ -105,7 +105,7 @@ function WorkTree() {
|
|
|
105
105
|
isScorll = _useState16[0],
|
|
106
106
|
setIsScorll = _useState16[1];
|
|
107
107
|
|
|
108
|
-
var contentRef = (0, _react.useRef)(document.createElement(
|
|
108
|
+
var contentRef = (0, _react.useRef)(document.createElement('div'));
|
|
109
109
|
var timer = null;
|
|
110
110
|
|
|
111
111
|
var setScorll = function setScorll(e) {
|
|
@@ -119,11 +119,11 @@ function WorkTree() {
|
|
|
119
119
|
|
|
120
120
|
(0, _react.useEffect)(function () {
|
|
121
121
|
if (contentRef.current) {
|
|
122
|
-
contentRef.current.addEventListener(
|
|
122
|
+
contentRef.current.addEventListener('scroll', setScorll, true);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
return function () {
|
|
126
|
-
contentRef.current && contentRef.current.removeEventListener(
|
|
126
|
+
contentRef.current && contentRef.current.removeEventListener('scroll', setScorll, true);
|
|
127
127
|
};
|
|
128
128
|
}, [treeNodes]);
|
|
129
129
|
|
|
@@ -132,12 +132,12 @@ function WorkTree() {
|
|
|
132
132
|
var checked = !!selected.find(function (i) {
|
|
133
133
|
return i.id == "mileStoneId-".concat(item.mileStoneId);
|
|
134
134
|
});
|
|
135
|
-
item.workName = work.
|
|
135
|
+
item.workName = work.workName;
|
|
136
136
|
return {
|
|
137
137
|
key: "mileStoneId-".concat(item.mileStoneId),
|
|
138
|
-
nodeType:
|
|
138
|
+
nodeType: 'milestone',
|
|
139
139
|
data: item,
|
|
140
|
-
title:
|
|
140
|
+
title: '',
|
|
141
141
|
checked: checked,
|
|
142
142
|
index: key + 1,
|
|
143
143
|
disabled: !checked && selectedRoots.includes(item.workId)
|
|
@@ -147,47 +147,43 @@ function WorkTree() {
|
|
|
147
147
|
|
|
148
148
|
var transToTreeNode = function transToTreeNode(arr) {
|
|
149
149
|
return arr.map(function (item, _key) {
|
|
150
|
-
var _item$
|
|
151
|
-
|
|
150
|
+
var _item$workMileStones = item.workMileStones,
|
|
151
|
+
workMileStones = _item$workMileStones === void 0 ? [] : _item$workMileStones;
|
|
152
152
|
var checked = !!selected.find(function (i) {
|
|
153
|
-
return i.id == item.
|
|
153
|
+
return i.id == item.workId;
|
|
154
154
|
});
|
|
155
155
|
return {
|
|
156
|
-
key: item.
|
|
157
|
-
nodeType:
|
|
158
|
-
title:
|
|
159
|
-
children: formatKrNodes(
|
|
156
|
+
key: item.workId,
|
|
157
|
+
nodeType: 'work-node',
|
|
158
|
+
title: '',
|
|
159
|
+
children: formatKrNodes(workMileStones || [], item),
|
|
160
160
|
data: item,
|
|
161
161
|
checked: checked,
|
|
162
|
-
disabled: !checked && selectedRoots.includes(item.
|
|
162
|
+
disabled: !checked && selectedRoots.includes(item.workId)
|
|
163
163
|
};
|
|
164
164
|
});
|
|
165
165
|
};
|
|
166
166
|
|
|
167
167
|
var getTreeNodes = /*#__PURE__*/function () {
|
|
168
168
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
169
|
-
var
|
|
169
|
+
var res, _res$Data, _res$Data$works, works, _res$Data$total, total;
|
|
170
170
|
|
|
171
171
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
172
172
|
while (1) {
|
|
173
173
|
switch (_context.prev = _context.next) {
|
|
174
174
|
case 0:
|
|
175
175
|
_context.next = 2;
|
|
176
|
-
return (0, _requestApi.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}, query));
|
|
176
|
+
return (0, _requestApi.workData)(_objectSpread({
|
|
177
|
+
isGetMilestone: true
|
|
178
|
+
}, query), pageNum, pageSize);
|
|
180
179
|
|
|
181
180
|
case 2:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
works = _yield$getWorks$works === void 0 ? [] : _yield$getWorks$works;
|
|
185
|
-
_yield$getWorks$total = _yield$getWorks.total;
|
|
186
|
-
total = _yield$getWorks$total === void 0 ? 0 : _yield$getWorks$total;
|
|
181
|
+
res = _context.sent;
|
|
182
|
+
_res$Data = res.Data, _res$Data$works = _res$Data.works, works = _res$Data$works === void 0 ? [] : _res$Data$works, _res$Data$total = _res$Data.total, total = _res$Data$total === void 0 ? 0 : _res$Data$total;
|
|
187
183
|
setWorks(works || []);
|
|
188
184
|
setTotal(total);
|
|
189
185
|
|
|
190
|
-
case
|
|
186
|
+
case 6:
|
|
191
187
|
case "end":
|
|
192
188
|
return _context.stop();
|
|
193
189
|
}
|
|
@@ -224,17 +220,17 @@ function WorkTree() {
|
|
|
224
220
|
onChange: onQueryChangeHandler
|
|
225
221
|
}), treeNodes.length == 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
226
222
|
className: "".concat(precls, "__empty")
|
|
227
|
-
}, (0, _getLocale.getLocale)(
|
|
223
|
+
}, (0, _getLocale.getLocale)('Tasks_Tab_MyS_Noprojectilable')), treeNodes.length > 0 && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
228
224
|
className: "".concat(precls, "__header")
|
|
229
225
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
230
226
|
className: "".concat(precls, "__header-obj")
|
|
231
|
-
}, (0, _getLocale.getLocale)(
|
|
227
|
+
}, (0, _getLocale.getLocale)('Pro_detail_AssociatedObject')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
232
228
|
className: "".concat(precls, "__header-status")
|
|
233
|
-
}, (0, _getLocale.getLocale)(
|
|
229
|
+
}, (0, _getLocale.getLocale)('Mod_States')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
234
230
|
className: "".concat(precls, "__header-principle")
|
|
235
|
-
}, (0, _getLocale.getLocale)(
|
|
231
|
+
}, (0, _getLocale.getLocale)('Mod_Owner')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
236
232
|
className: "".concat(precls, "__header-time")
|
|
237
|
-
}, (0, _getLocale.getLocale)(
|
|
233
|
+
}, (0, _getLocale.getLocale)('Mod_Startendtime'))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
238
234
|
className: "".concat(precls, "__content"),
|
|
239
235
|
ref: contentRef
|
|
240
236
|
}, /*#__PURE__*/_react["default"].createElement(_tree["default"], {
|