@titaui/pc 1.12.13-beta.1 → 1.12.15
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/communication/index.js +6 -0
- package/lib/components/dialog-confirm/index.css +0 -1
- package/lib/components/dialog-confirm/index.js +3 -5
- package/lib/components/drawer/index.css +9 -0
- package/lib/components/drawer/index.js +11 -8
- package/lib/components/dynamic/dynamic-item/components/header/index.js +5 -1
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/index.css +0 -1
- package/lib/components/dynamic/dynamic-item/index.js +14 -19
- package/lib/components/dynamic/dynamic-list/index.js +19 -2
- package/lib/components/form/form-fields/date/index.js +13 -13
- 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/export-modules/appraisal-menus/index.js +30 -12
- package/lib/components/menus/export-modules/appraisal-menus/menu-highlight.js +22 -6
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +104 -9
- package/lib/components/menus/export-modules/okr-menus/menus.js +6 -3
- package/lib/components/menus/i18n.js +0 -8
- package/lib/components/menus/index.js +0 -6
- package/lib/components/menus/request-apis.js +2 -8
- package/lib/components/nav-top/components/app-center/images/chart.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/file.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/interview.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/learning.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/okr.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/performance.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/plan.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/project.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/summary.svg +23 -0
- package/lib/components/nav-top/components/app-center/index.css +154 -0
- package/lib/components/{import-modal/import-okr-modal → nav-top/components/app-center}/index.js +104 -84
- package/lib/components/nav-top/components/menu/index.js +3 -7
- package/lib/components/nav-top/index.css +48 -7
- package/lib/components/nav-top/index.js +54 -33
- package/lib/components/nav-top/utils.js +464 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +6 -0
- 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 +81 -44
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- 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/panels/date-panel/date-body.js +19 -31
- package/lib/components/picker/components/panels/date-panel/date-head.js +8 -8
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.css +0 -5
- package/lib/components/picker/components/panels/month-panel/index.js +4 -34
- package/lib/components/picker/components/panels/month-panel/month-body.js +5 -4
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/year-panel/index.css +0 -5
- package/lib/components/picker/components/panels/year-panel/index.js +3 -34
- package/lib/components/picker/components/panels/year-panel/year-body.js +3 -10
- package/lib/components/picker/components/picker-trigger/index.css +1 -6
- package/lib/components/picker/components/picker-trigger/index.js +11 -16
- package/lib/components/picker/context.js +2 -17
- package/lib/components/picker/index.css +1 -29
- package/lib/components/picker/index.js +0 -3
- package/lib/components/picker/picker-panels.js +61 -98
- package/lib/components/picker/picker.js +30 -44
- package/lib/components/picker/utils.js +11 -168
- package/lib/components/rich-editor/schemas/list.js +1 -0
- package/lib/components/search-input/index.js +0 -5
- package/lib/components/select-layer/index.js +22 -8
- package/lib/components/select-tags/index.js +1 -7
- 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/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/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/user-selector/category-selector-panel/depart-tree.js +3 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +11 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +21 -3
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
- package/lib/components/user-selector/request-apis.js +39 -9
- package/lib/components/user-selector/searched-panel/index.js +7 -1
- package/lib/index.js +0 -56
- package/lib/pages/aha2021/index.js +5 -5
- package/lib/pages/aha2021/new-menu-switcher/index.css +40 -0
- package/lib/{components/import-modal/radio.js → pages/aha2021/new-menu-switcher/index.js} +42 -23
- package/lib/pages/aha2021/new-menu-switcher/new-menu-bg.png +0 -0
- package/lib/pages/aha2021/request-api.js +15 -0
- package/lib/pages/okr-map/level2-search/user.js +1 -0
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +2 -14
- package/lib/utils/helpers.js +11 -56
- package/package.json +1 -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 -72
- package/lib/components/color-date-picker/index.js +0 -129
- 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 -330
- 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/api.js +0 -27
- 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 -75
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +0 -195
- 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/constant.js +0 -31
- 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 -151
- 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/index.js +0 -220
- 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/constant.js +0 -45
- 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 -166
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +0 -360
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +0 -49
- 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/constant.js +0 -16
- 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 -169
- 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 -27
- 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 -68
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +0 -50
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +0 -43
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +0 -87
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +0 -45
- 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 -171
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +0 -231
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +0 -30
- 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-task-modal/index.css +0 -18
- package/lib/components/import-modal/import-task-modal/index.js +0 -241
- 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/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 -80
- 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 -169
- 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 -78
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +0 -78
- 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 -231
- 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 -190
- package/lib/components/menus/export-modules/summary-menus/request-api.js +0 -17
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +0 -242
- 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/cross.svg +0 -17
- 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 -124
- package/lib/components/picker/components/panels/week-panel/week-body.js +0 -71
- package/lib/components/picker/components/panels/week-panel/week-head.js +0 -80
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +0 -97
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +0 -109
- package/lib/components/picker/range-picker/components/placeholder/index.js +0 -91
- package/lib/components/picker/range-picker/components/select-input/index.js +0 -72
- package/lib/components/picker/range-picker/components/shortcuts/index.js +0 -45
- package/lib/components/picker/range-picker/index.css +0 -158
- package/lib/components/picker/range-picker/index.js +0 -263
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +0 -117
- package/lib/components/promise-confirm/interface.js +0 -5
- package/lib/components/rate/index.css +0 -111
- package/lib/components/rate/index.js +0 -52
- 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 -113
- package/lib/components/rich-editor-upload/index.css +0 -11
- package/lib/components/rich-editor-upload/index.js +0 -87
- package/lib/components/write-summary-modal/index.css +0 -79
- package/lib/components/write-summary-modal/index.js +0 -167
- package/lib/components/write-summary-modal/interface.js +0 -19
- package/lib/components/write-summary-modal/request-api.js +0 -18
- package/lib/components/write-summary-modal/utils.js +0 -31
- package/lib/utils/planDataJson.js +0 -11115
|
@@ -25,7 +25,7 @@ var _utils = require("./utils");
|
|
|
25
25
|
|
|
26
26
|
require("./index.css");
|
|
27
27
|
|
|
28
|
-
var _excluded = ["
|
|
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
|
|
|
@@ -52,17 +52,16 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
52
52
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
53
53
|
|
|
54
54
|
var Picker = function Picker(props) {
|
|
55
|
-
var
|
|
56
|
-
direction = props.direction,
|
|
57
|
-
displayMode = props.displayMode,
|
|
55
|
+
var onChange = props.onChange,
|
|
58
56
|
format = props.format,
|
|
59
|
-
picker = props.picker,
|
|
60
|
-
popupPlacement = props.popupPlacement,
|
|
61
|
-
settingType = props.settingType,
|
|
62
57
|
value = props.value,
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
mode = props.mode,
|
|
59
|
+
children = props.children,
|
|
60
|
+
popupPlacement = props.popupPlacement,
|
|
61
|
+
direction = props.direction,
|
|
65
62
|
onPopupVisibleChange = props.onPopupVisibleChange,
|
|
63
|
+
_props$visible = props.visible,
|
|
64
|
+
visible = _props$visible === void 0 ? false : _props$visible,
|
|
66
65
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
67
66
|
|
|
68
67
|
var _useState = (0, _react.useState)(visible),
|
|
@@ -75,23 +74,17 @@ var Picker = function Picker(props) {
|
|
|
75
74
|
return popupPlacement;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
return direction ===
|
|
77
|
+
return direction === "rtl" ? "bottomRight" : "bottomLeft";
|
|
79
78
|
};
|
|
80
79
|
|
|
81
80
|
var onChangeHandler = function onChangeHandler(date) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (result && result instanceof Promise) {
|
|
85
|
-
result.then(function (res) {
|
|
86
|
-
res && onCloseHandler();
|
|
87
|
-
});
|
|
88
|
-
} else if (result !== false) {
|
|
89
|
-
onCloseHandler();
|
|
81
|
+
if (onChange) {
|
|
82
|
+
onChange(date);
|
|
90
83
|
}
|
|
91
84
|
};
|
|
92
85
|
|
|
93
86
|
var onCloseHandler = function onCloseHandler() {
|
|
94
|
-
|
|
87
|
+
setPopupVisible(false);
|
|
95
88
|
};
|
|
96
89
|
|
|
97
90
|
var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
|
|
@@ -99,47 +92,40 @@ var Picker = function Picker(props) {
|
|
|
99
92
|
onPopupVisibleChange === null || onPopupVisibleChange === void 0 ? void 0 : onPopupVisibleChange(visible);
|
|
100
93
|
};
|
|
101
94
|
|
|
102
|
-
var popContent = (0, _react.useMemo)(function () {
|
|
103
|
-
return /*#__PURE__*/_react["default"].createElement(_pickerPanels["default"], _extends({
|
|
104
|
-
value: value,
|
|
105
|
-
picker: picker,
|
|
106
|
-
onChange: onChangeHandler,
|
|
107
|
-
onClose: onCloseHandler,
|
|
108
|
-
settingType: settingType
|
|
109
|
-
}, restProps));
|
|
110
|
-
}, [settingType, value]);
|
|
111
95
|
return /*#__PURE__*/_react["default"].createElement(_context["default"].Provider, {
|
|
112
96
|
value: {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
value: value
|
|
97
|
+
value: value,
|
|
98
|
+
mode: mode || "date",
|
|
99
|
+
format: format
|
|
117
100
|
}
|
|
118
|
-
},
|
|
101
|
+
}, /*#__PURE__*/_react["default"].createElement(_popup["default"], _extends({
|
|
119
102
|
extraClass: (0, _classnames["default"])(_utils.PickerDropdownClass),
|
|
120
|
-
popup:
|
|
103
|
+
popup: /*#__PURE__*/_react["default"].createElement(_pickerPanels["default"], _extends({
|
|
104
|
+
value: value,
|
|
105
|
+
mode: mode
|
|
106
|
+
}, restProps, {
|
|
107
|
+
onChange: onChangeHandler,
|
|
108
|
+
onClose: onCloseHandler
|
|
109
|
+
})),
|
|
121
110
|
popupVisible: popupVisible,
|
|
122
111
|
popupPlacement: getPopupPlacement(),
|
|
123
112
|
onPopupVisibleChange: handlePopupVisibleChange
|
|
124
113
|
}, restProps), /*#__PURE__*/_react["default"].createElement(_pickerTrigger["default"], _extends({
|
|
125
|
-
|
|
126
|
-
viewDate: (0, _moment["default"])(value[0]),
|
|
114
|
+
viewDate: (0, _moment["default"])(value),
|
|
127
115
|
onClick: function onClick() {
|
|
128
116
|
return setPopupVisible(true);
|
|
129
117
|
}
|
|
130
|
-
}, restProps), children))
|
|
118
|
+
}, restProps), children)));
|
|
131
119
|
};
|
|
132
120
|
|
|
133
121
|
Picker.defaultProps = {
|
|
134
122
|
children: null,
|
|
135
|
-
value:
|
|
136
|
-
|
|
137
|
-
format:
|
|
123
|
+
value: (0, _moment["default"])(),
|
|
124
|
+
mode: "date",
|
|
125
|
+
format: "YYYY/MM/DD",
|
|
138
126
|
popupStyle: {},
|
|
139
|
-
popupPlacement:
|
|
140
|
-
direction:
|
|
141
|
-
displayMode: 'layer',
|
|
142
|
-
settingType: 'startDate',
|
|
127
|
+
popupPlacement: "bottomLeft",
|
|
128
|
+
direction: "ltr",
|
|
143
129
|
visible: false
|
|
144
130
|
};
|
|
145
131
|
var _default = Picker;
|
|
@@ -3,183 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
9
|
-
|
|
10
|
-
var _getLocale = require("../../utils/getLocale");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
var PickerClass = 'tita-ui__picker';
|
|
6
|
+
exports.YEAR_DECADE_COUNT = exports.WEEK_DAYS_COUNT = exports.PickerTriggerClass = exports.PickerPanelClass = exports.PickerHeadClass = exports.PickerDropdownClass = exports.PickerClass = exports.PickerCellClass = exports.PickerBodyClass = exports.MONTHDATAMAPEN = exports.MONTHDATAMAP = void 0;
|
|
7
|
+
var PickerClass = "tita-ui__picker";
|
|
15
8
|
exports.PickerClass = PickerClass;
|
|
16
|
-
var PickerHeadClass =
|
|
9
|
+
var PickerHeadClass = "tita-ui__picker-head";
|
|
17
10
|
exports.PickerHeadClass = PickerHeadClass;
|
|
18
|
-
var PickerBodyClass =
|
|
11
|
+
var PickerBodyClass = "tita-ui__picker-body";
|
|
19
12
|
exports.PickerBodyClass = PickerBodyClass;
|
|
20
|
-
var PickerPanelClass =
|
|
13
|
+
var PickerPanelClass = "tita-ui__picker-panel";
|
|
21
14
|
exports.PickerPanelClass = PickerPanelClass;
|
|
22
|
-
var PickerCellClass =
|
|
15
|
+
var PickerCellClass = "tita-ui__picker-cell";
|
|
23
16
|
exports.PickerCellClass = PickerCellClass;
|
|
24
|
-
var PickerTriggerClass =
|
|
17
|
+
var PickerTriggerClass = "tita-ui__picker-trigger";
|
|
25
18
|
exports.PickerTriggerClass = PickerTriggerClass;
|
|
26
|
-
var PickerDropdownClass =
|
|
19
|
+
var PickerDropdownClass = "tita-ui__picker-dropdown";
|
|
27
20
|
exports.PickerDropdownClass = PickerDropdownClass;
|
|
28
|
-
var
|
|
29
|
-
exports.PickerRangesClass = PickerRangesClass;
|
|
30
|
-
var PickerRangeTriggerClass = 'tita-ui__picker-ranges-trigger';
|
|
31
|
-
exports.PickerRangeTriggerClass = PickerRangeTriggerClass;
|
|
32
|
-
var MONTHDATAMAP = ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'];
|
|
21
|
+
var MONTHDATAMAP = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
|
|
33
22
|
exports.MONTHDATAMAP = MONTHDATAMAP;
|
|
34
|
-
var MONTHDATAMAPEN = [
|
|
23
|
+
var MONTHDATAMAPEN = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
35
24
|
exports.MONTHDATAMAPEN = MONTHDATAMAPEN;
|
|
36
25
|
var WEEK_DAYS_COUNT = 7;
|
|
37
26
|
exports.WEEK_DAYS_COUNT = WEEK_DAYS_COUNT;
|
|
38
27
|
var YEAR_DECADE_COUNT = 10;
|
|
39
|
-
exports.YEAR_DECADE_COUNT = YEAR_DECADE_COUNT;
|
|
40
|
-
var SHORTCUTS;
|
|
41
|
-
exports.SHORTCUTS = SHORTCUTS;
|
|
42
|
-
|
|
43
|
-
(function (SHORTCUTS) {
|
|
44
|
-
SHORTCUTS["CURRENT_YEAR"] = "currentYear";
|
|
45
|
-
SHORTCUTS["CURRENT_MONTH"] = "currentMonth";
|
|
46
|
-
SHORTCUTS["CURRENT_WEEK"] = "currentWeek";
|
|
47
|
-
SHORTCUTS["PREVIOUS_WEEK"] = "prevWeek";
|
|
48
|
-
SHORTCUTS["NEXT_WEEK"] = "nextWeek";
|
|
49
|
-
})(SHORTCUTS || (exports.SHORTCUTS = SHORTCUTS = {}));
|
|
50
|
-
|
|
51
|
-
var getCurrentValues = function getCurrentValues(symbol) {
|
|
52
|
-
return [(0, _moment["default"])().startOf(symbol), (0, _moment["default"])().endOf(symbol)];
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports.getCurrentValues = getCurrentValues;
|
|
56
|
-
|
|
57
|
-
var getPreviousValues = function getPreviousValues(symbol) {
|
|
58
|
-
return [(0, _moment["default"])().subtract(1, symbol).startOf(symbol), (0, _moment["default"])().subtract(1, symbol).endOf(symbol)];
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
exports.getPreviousValues = getPreviousValues;
|
|
62
|
-
|
|
63
|
-
var getNextValues = function getNextValues(symbol) {
|
|
64
|
-
return [(0, _moment["default"])().add(1, symbol).startOf(symbol), (0, _moment["default"])().add(1, symbol).endOf(symbol)];
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
exports.getNextValues = getNextValues;
|
|
68
|
-
var RangeSettingTypes;
|
|
69
|
-
exports.RangeSettingTypes = RangeSettingTypes;
|
|
70
|
-
|
|
71
|
-
(function (RangeSettingTypes) {
|
|
72
|
-
RangeSettingTypes["START"] = "startDate";
|
|
73
|
-
RangeSettingTypes["END"] = "endDate";
|
|
74
|
-
})(RangeSettingTypes || (exports.RangeSettingTypes = RangeSettingTypes = {}));
|
|
75
|
-
|
|
76
|
-
var RangePickerShortcutsKeysMapping = function RangePickerShortcutsKeysMapping() {
|
|
77
|
-
return [{
|
|
78
|
-
key: SHORTCUTS.CURRENT_YEAR,
|
|
79
|
-
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thisyear')
|
|
80
|
-
}, {
|
|
81
|
-
key: SHORTCUTS.CURRENT_MONTH,
|
|
82
|
-
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thismonth')
|
|
83
|
-
}, {
|
|
84
|
-
key: SHORTCUTS.CURRENT_WEEK,
|
|
85
|
-
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thisweek')
|
|
86
|
-
}];
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
exports.RangePickerShortcutsKeysMapping = RangePickerShortcutsKeysMapping;
|
|
90
|
-
|
|
91
|
-
var RangeWeekPickerShortcutsKeysMapping = function RangeWeekPickerShortcutsKeysMapping() {
|
|
92
|
-
return [{
|
|
93
|
-
key: SHORTCUTS.PREVIOUS_WEEK,
|
|
94
|
-
title: (0, _getLocale.getLocale)('Rep_NewS_LastWeek')
|
|
95
|
-
}, {
|
|
96
|
-
key: SHORTCUTS.CURRENT_WEEK,
|
|
97
|
-
title: (0, _getLocale.getLocale)('Feed_Tab_Title_Thisweek')
|
|
98
|
-
}, {
|
|
99
|
-
key: SHORTCUTS.NEXT_WEEK,
|
|
100
|
-
title: (0, _getLocale.getLocale)('Mod_NextWeek')
|
|
101
|
-
}];
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
exports.RangeWeekPickerShortcutsKeysMapping = RangeWeekPickerShortcutsKeysMapping;
|
|
105
|
-
|
|
106
|
-
var getPickerDateBySettingType = function getPickerDateBySettingType(params) {
|
|
107
|
-
var _params$defaultValue = params.defaultValue,
|
|
108
|
-
defaultValue = _params$defaultValue === void 0 ? (0, _moment["default"])() : _params$defaultValue,
|
|
109
|
-
_params$format = params.format,
|
|
110
|
-
format = _params$format === void 0 ? 'YYYY/MM/DD' : _params$format,
|
|
111
|
-
settingType = params.settingType,
|
|
112
|
-
values = params.values;
|
|
113
|
-
|
|
114
|
-
if (values instanceof Array && settingType) {
|
|
115
|
-
var valuesLen = values.length;
|
|
116
|
-
var startDate = values[0] || (0, _moment["default"])().format(format);
|
|
117
|
-
var endDate = values[valuesLen - 1] || (0, _moment["default"])().format(format);
|
|
118
|
-
return settingType === RangeSettingTypes.START ? startDate : endDate;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return defaultValue;
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
exports.getPickerDateBySettingType = getPickerDateBySettingType;
|
|
125
|
-
|
|
126
|
-
var setPickerDateBySettingType = function setPickerDateBySettingType(params) {
|
|
127
|
-
var newDate = params.newDate,
|
|
128
|
-
settingType = params.settingType,
|
|
129
|
-
values = params.values;
|
|
130
|
-
|
|
131
|
-
if (values instanceof Array && settingType) {
|
|
132
|
-
var valuesClone = JSON.parse(JSON.stringify(values));
|
|
133
|
-
var isSettingStart = settingType === RangeSettingTypes.START;
|
|
134
|
-
var updateIndex = isSettingStart ? 0 : 1;
|
|
135
|
-
valuesClone.splice(updateIndex, 1, (0, _moment["default"])(newDate));
|
|
136
|
-
|
|
137
|
-
if (isSettingStart && (0, _moment["default"])(newDate, 'YYYY/MM/DD').isAfter((0, _moment["default"])(valuesClone[1]).format('YYYY/MM/DD'), 'date')) {
|
|
138
|
-
valuesClone[1] = (0, _moment["default"])(newDate);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (!isSettingStart && (0, _moment["default"])(newDate, 'YYYY/MM/DD').isBefore((0, _moment["default"])(valuesClone[0]).format('YYYY/MM/DD'), 'date')) {
|
|
142
|
-
valuesClone[0] = (0, _moment["default"])(newDate);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return valuesClone.slice(0, 2);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return [(0, _moment["default"])(newDate)];
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
exports.setPickerDateBySettingType = setPickerDateBySettingType;
|
|
152
|
-
|
|
153
|
-
var isCurrentDateInRanges = function isCurrentDateInRanges(params) {
|
|
154
|
-
var _params$format2 = params.format,
|
|
155
|
-
format = _params$format2 === void 0 ? 'YYYY/MM/DD' : _params$format2,
|
|
156
|
-
nowDate = params.nowDate,
|
|
157
|
-
values = params.values;
|
|
158
|
-
var date = typeof nowDate === 'string' ? nowDate : nowDate.format(format);
|
|
159
|
-
var data = {
|
|
160
|
-
inRanges: false,
|
|
161
|
-
rangeStart: false,
|
|
162
|
-
rangeEnd: false
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
if (values instanceof Array) {
|
|
166
|
-
var valuesLen = values.length;
|
|
167
|
-
var startDate = values[0] || '';
|
|
168
|
-
var endDate = values[valuesLen - 1] || '';
|
|
169
|
-
if (!startDate || !endDate || valuesLen < 2) return data;
|
|
170
|
-
|
|
171
|
-
if ((0, _moment["default"])(date).isBetween((0, _moment["default"])(startDate).format(format), (0, _moment["default"])(endDate).format(format), null, '[]')) {
|
|
172
|
-
return {
|
|
173
|
-
inRanges: true,
|
|
174
|
-
rangeStart: (0, _moment["default"])(date).isSame((0, _moment["default"])(startDate).format(format)),
|
|
175
|
-
rangeEnd: (0, _moment["default"])(date).isSame((0, _moment["default"])(endDate).format(format))
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return data;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return data;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
exports.isCurrentDateInRanges = isCurrentDateInRanges;
|
|
28
|
+
exports.YEAR_DECADE_COUNT = YEAR_DECADE_COUNT;
|
|
@@ -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) {
|
|
@@ -19,7 +19,7 @@ var _getLocale = require("../../utils/getLocale");
|
|
|
19
19
|
|
|
20
20
|
require("./index.css");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["selected", "
|
|
22
|
+
var _excluded = ["selected", "data", "onChange", "style", "mode", "className", "placeholder", "name", "noBorder"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
@@ -52,7 +52,6 @@ var preCls = "titaui-select-tags";
|
|
|
52
52
|
var SelectTags = function SelectTags(_ref) {
|
|
53
53
|
var _ref$selected = _ref.selected,
|
|
54
54
|
selected = _ref$selected === void 0 ? [] : _ref$selected,
|
|
55
|
-
controlValue = _ref.controlValue,
|
|
56
55
|
_ref$data = _ref.data,
|
|
57
56
|
data = _ref$data === void 0 ? [] : _ref$data,
|
|
58
57
|
onChange = _ref.onChange,
|
|
@@ -79,11 +78,6 @@ var SelectTags = function SelectTags(_ref) {
|
|
|
79
78
|
setValue(value);
|
|
80
79
|
};
|
|
81
80
|
|
|
82
|
-
(0, _react.useEffect)(function () {
|
|
83
|
-
if (controlValue) {
|
|
84
|
-
setValue(selected);
|
|
85
|
-
}
|
|
86
|
-
}, [selected]);
|
|
87
81
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
88
82
|
className: preCls
|
|
89
83
|
}, /*#__PURE__*/_react["default"].createElement(_rcSelect["default"], _extends({
|
|
@@ -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,
|
|
@@ -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
|
});
|