@titaui/pc 1.5.78 → 1.5.82
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/avatar/index.js +1 -9
- package/lib/components/change-okr/Filter.js +65 -133
- package/lib/components/change-okr/Item.js +0 -6
- package/lib/components/change-okr/filterTab.js +0 -2
- package/lib/components/change-okr/index.js +2 -2
- package/lib/components/checkbox/index.js +3 -4
- package/lib/components/communication/CommunicationRecord.js +161 -116
- package/lib/components/communication/ConvertUserName.js +1 -1
- package/lib/components/communication/index.js +28 -53
- package/lib/components/communication/style.js +25 -21
- package/lib/components/dropdown-layer/icon-item.js +3 -5
- package/lib/components/dropdown-layer/index.css +0 -16
- package/lib/components/dropdown-layer/index.js +14 -21
- package/lib/components/emotionsSelector/style.js +1 -1
- package/lib/components/form/form-fields/input/index.css +0 -11
- package/lib/components/form/form-fields/input/index.js +1 -3
- package/lib/components/grid-page/personal-info/index.js +4 -4
- package/lib/components/mblog/components/MblogAction.js +6 -10
- package/lib/components/mblog/index.js +11 -24
- package/lib/components/mblog/style.js +8 -8
- package/lib/components/okr-detail/components/header/index.css +0 -4
- package/lib/components/okr-detail/components/header/o-cycle.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +8 -15
- package/lib/components/okr-flow/child-node/work-node.js +1 -7
- package/lib/components/okr-period-selector/select-cycle.js +151 -139
- package/lib/components/okr-progress-detail/index.css +0 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +5 -5
- package/lib/components/okr-review/ReviewPop/index.js +4 -4
- package/lib/components/period-selector/common.js +4 -149
- package/lib/components/period-selector/components/selector/index.js +38 -103
- package/lib/components/period-selector/components/selector/style.js +9 -23
- package/lib/components/period-selector/index.js +28 -29
- package/lib/components/popup/index.js +1 -3
- package/lib/components/radio/index.css +0 -5
- package/lib/components/radio/radio.js +4 -12
- package/lib/components/table/index.css +1 -0
- package/lib/components/upload/components/uploadedPreview.js +54 -62
- package/lib/components/upload/index.js +57 -89
- package/lib/components/upload/style.js +7 -7
- package/lib/components/upload/type.js +15 -15
- package/lib/components/upvote/index.js +14 -37
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +0 -4
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +24 -50
- package/lib/components/user-selector/export-modules/field-tree-selector/single-selector/index.js +2 -11
- package/lib/components/user-selector/layout/index.css +1 -1
- package/lib/index.js +5 -49
- package/lib/pages/home-page/components/data-list/nav-selector/index.js +0 -18
- package/lib/pages/home-page/components/data-list/table/utils-function.js +3 -6
- package/lib/utils/auth.js +5 -46
- package/lib/utils/bs-global.js +2 -26
- package/lib/utils/tools.js +20 -140
- package/package.json +2 -2
- package/lib/components/avatar/icon-avatar/index.css +0 -15
- package/lib/components/avatar/icon-avatar/index.js +0 -50
- package/lib/components/avatar/num-avatar/index.css +0 -12
- package/lib/components/avatar/num-avatar/index.js +0 -34
- package/lib/components/button/admin-button/default.js +0 -35
- package/lib/components/button/admin-button/drop-down-arrow.js +0 -93
- package/lib/components/button/admin-button/index.css +0 -86
- package/lib/components/button/admin-button/index.js +0 -40
- package/lib/components/button/admin-button/primary.js +0 -33
- package/lib/components/button/admin-button/secondary.js +0 -35
- package/lib/components/button/default-button/index.css +0 -49
- package/lib/components/button/default-button/index.js +0 -51
- package/lib/components/button/export-button/index.css +0 -51
- package/lib/components/button/export-button/index.js +0 -81
- package/lib/components/button/images/daoru.svg +0 -18
- package/lib/components/button/index.js +0 -23
- package/lib/components/button/interface.js +0 -5
- package/lib/components/communication/index.css +0 -63
- package/lib/components/create-okr/animation/check-animation.js +0 -2746
- package/lib/components/create-okr/constant.js +0 -27
- package/lib/components/create-okr/createCycle.js +0 -171
- package/lib/components/create-okr/createSuccessCmp.js +0 -233
- package/lib/components/create-okr/createSuccessCmpWrapper.js +0 -20
- package/lib/components/create-okr/fields/date-cycle.js +0 -98
- package/lib/components/create-okr/fields/index.css +0 -346
- package/lib/components/create-okr/fields/index.js +0 -17
- package/lib/components/create-okr/fields/input-with-err-popup.js +0 -57
- package/lib/components/create-okr/fields/o-new-name.js +0 -197
- package/lib/components/create-okr/fields/okr-case.js +0 -98
- package/lib/components/create-okr/fields/okr-classify.js +0 -51
- package/lib/components/create-okr/fields/okr-create-suggest.js +0 -147
- package/lib/components/create-okr/fields/okr-new-user-selector.js +0 -106
- package/lib/components/create-okr/fields/okr-parent.js +0 -157
- package/lib/components/create-okr/fields/okr-type-detail.js +0 -196
- package/lib/components/create-okr/fields/okr-type.js +0 -131
- package/lib/components/create-okr/fields/okr-visibility-detail.js +0 -224
- package/lib/components/create-okr/fields/okr-visibility.js +0 -169
- package/lib/components/create-okr/img/check-normal.svg +0 -29
- package/lib/components/create-okr/img/check-right.svg +0 -16
- package/lib/components/create-okr/img/check-wrong.svg +0 -29
- package/lib/components/create-okr/img/create-success-head.png +0 -0
- package/lib/components/create-okr/img/create-success-left-quotation.svg +0 -14
- package/lib/components/create-okr/img/create-success-message.svg +0 -1
- package/lib/components/create-okr/img/create-success-right-quotation.svg +0 -14
- package/lib/components/create-okr/img/create-success-shadow.svg +0 -23
- package/lib/components/create-okr/img/example.svg +0 -11
- package/lib/components/create-okr/img/hand.svg +0 -12
- package/lib/components/create-okr/img/kr-add.svg +0 -12
- package/lib/components/create-okr/img/left-quotation.svg +0 -12
- package/lib/components/create-okr/img/light.svg +0 -1
- package/lib/components/create-okr/img/pack-up.js +0 -28
- package/lib/components/create-okr/img/qr-code.png +0 -0
- package/lib/components/create-okr/img/right-quotation.svg +0 -12
- package/lib/components/create-okr/img/shower.png +0 -0
- package/lib/components/create-okr/img/target.svg +0 -19
- package/lib/components/create-okr/img/teach-okr.svg +0 -17
- package/lib/components/create-okr/img/wave.png +0 -0
- package/lib/components/create-okr/img/weight.svg +0 -12
- package/lib/components/create-okr/index.css +0 -446
- package/lib/components/create-okr/index.js +0 -911
- package/lib/components/create-okr/interface.js +0 -5
- package/lib/components/create-okr/kr-items/index.css +0 -180
- package/lib/components/create-okr/kr-items/kr-item-weight.js +0 -194
- package/lib/components/create-okr/kr-items/krDatas.js +0 -299
- package/lib/components/create-okr/kr-items/krItem.js +0 -167
- package/lib/components/create-okr/objectType.js +0 -273
- package/lib/components/create-okr/request-api.js +0 -220
- package/lib/components/create-okr/style.js +0 -100
- package/lib/components/create-okr/utils/getCreateOkrSurpassPercent.js +0 -124
- package/lib/components/create-okr/utils/helper.js +0 -99
- package/lib/components/create-okr/utils/index.js +0 -23
- package/lib/components/dynamic/components/condition-render/index.js +0 -20
- package/lib/components/dynamic/components/dangerous-html/index.js +0 -22
- package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -78
- package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -192
- package/lib/components/dynamic/components/obj-status/index.css +0 -22
- package/lib/components/dynamic/components/obj-status/index.js +0 -38
- package/lib/components/dynamic/components/percent/index.css +0 -21
- package/lib/components/dynamic/components/percent/index.js +0 -38
- package/lib/components/dynamic/components/title/index.css +0 -35
- package/lib/components/dynamic/components/title/index.js +0 -59
- package/lib/components/dynamic/constant.js +0 -96
- package/lib/components/dynamic/context/index.js +0 -13
- package/lib/components/dynamic/dynamic-item/components/header/index.css +0 -101
- package/lib/components/dynamic/dynamic-item/components/header/index.js +0 -294
- package/lib/components/dynamic/dynamic-item/components/icon/index.css +0 -10
- package/lib/components/dynamic/dynamic-item/components/icon/index.js +0 -35
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +0 -95
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +0 -173
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +0 -54
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +0 -107
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +0 -48
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +0 -89
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +0 -96
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +0 -171
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +0 -67
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +0 -110
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +0 -16
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +0 -111
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +0 -158
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +0 -95
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +0 -215
- package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +0 -16
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +0 -91
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +0 -125
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +0 -22
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +0 -95
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +0 -192
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +0 -138
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +0 -183
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +0 -153
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +0 -138
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +0 -97
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +0 -207
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +0 -54
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +0 -107
- package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +0 -50
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +0 -111
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +0 -164
- package/lib/components/dynamic/dynamic-item/index.css +0 -128
- package/lib/components/dynamic/dynamic-item/index.js +0 -352
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -126
- package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -157
- package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -107
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
- package/lib/components/dynamic/dynamic-liking/index.css +0 -81
- package/lib/components/dynamic/dynamic-liking/index.js +0 -76
- package/lib/components/dynamic/dynamic-liking/item.js +0 -90
- package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
- package/lib/components/dynamic/dynamic-list/index.css +0 -36
- package/lib/components/dynamic/dynamic-list/index.js +0 -61
- package/lib/components/dynamic/dynamic-topping/image/quotationMark.svg +0 -16
- package/lib/components/dynamic/dynamic-topping/image/topIcon.svg +0 -30
- package/lib/components/dynamic/dynamic-topping/index.css +0 -130
- package/lib/components/dynamic/dynamic-topping/index.js +0 -78
- package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
- package/lib/components/dynamic/dynamic-topping/item.js +0 -138
- package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/lib/components/dynamic/dynamic.css +0 -204
- package/lib/components/dynamic/dynamic.js +0 -391
- package/lib/components/dynamic/export-module/index.js +0 -33
- package/lib/components/dynamic/img/dynamic-P1.svg +0 -15
- package/lib/components/dynamic/img/dynamic-P2.svg +0 -15
- package/lib/components/dynamic/img/dynamic-P3.svg +0 -15
- package/lib/components/dynamic/img/dynamic-P4.svg +0 -15
- package/lib/components/dynamic/img/dynamic-P5.svg +0 -15
- package/lib/components/dynamic/img/dynamic-delay.svg +0 -17
- package/lib/components/dynamic/img/dynamic-desire.svg +0 -61
- package/lib/components/dynamic/img/dynamic-empty.png +0 -0
- package/lib/components/dynamic/img/dynamic-end.svg +0 -17
- package/lib/components/dynamic/img/dynamic-left-quoto.svg +0 -13
- package/lib/components/dynamic/img/dynamic-loading.gif +0 -0
- package/lib/components/dynamic/img/dynamic-normal.svg +0 -17
- package/lib/components/dynamic/img/dynamic-promise.svg +0 -61
- package/lib/components/dynamic/img/dynamic-reword.svg +0 -24
- package/lib/components/dynamic/img/dynamic-right-quoto.svg +0 -13
- package/lib/components/dynamic/img/dynamic-risk.svg +0 -17
- package/lib/components/dynamic/img/dynamic-submit-delay.svg +0 -16
- package/lib/components/dynamic/img/dynamic-submit-normal.svg +0 -18
- package/lib/components/dynamic/img/dynamic-top.svg +0 -14
- package/lib/components/dynamic/index.js +0 -27
- package/lib/components/dynamic/interface.js +0 -5
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -37
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -37
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -37
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -42
- package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +0 -51
- package/lib/components/dynamic/quick-operation/index.js +0 -112
- package/lib/components/dynamic/request-api.js +0 -92
- package/lib/components/dynamic/util.js +0 -140
- package/lib/components/file-list/components/single-file/index.css +0 -84
- package/lib/components/file-list/components/single-file/index.js +0 -115
- package/lib/components/file-list/img/new-file-list-doc.svg +0 -1
- package/lib/components/file-list/img/new-file-list-other.svg +0 -1
- package/lib/components/file-list/img/new-file-list-pdf.svg +0 -1
- package/lib/components/file-list/img/new-file-list-ppt.svg +0 -1
- package/lib/components/file-list/img/new-file-list-radio.svg +0 -1
- package/lib/components/file-list/img/new-file-list-video.svg +0 -1
- package/lib/components/file-list/img/new-file-list-xls.svg +0 -1
- package/lib/components/file-list/index.css +0 -5
- package/lib/components/file-list/index.js +0 -61
- package/lib/components/file-list/interface.js +0 -5
- package/lib/components/file-list/util.js +0 -78
- package/lib/components/img-viewer/icon/enlarge.js +0 -30
- package/lib/components/img-viewer/icon/left-rotate.js +0 -46
- package/lib/components/img-viewer/icon/right-rotate.js +0 -44
- package/lib/components/img-viewer/icon/shrink.js +0 -37
- package/lib/components/img-viewer/image/loading.gif +0 -0
- package/lib/components/img-viewer/index.css +0 -155
- package/lib/components/img-viewer/index.js +0 -228
- package/lib/components/img-viewer/interface.js +0 -5
- package/lib/components/img-viewer/util.js +0 -16
- package/lib/components/publish-dynamic-modal/index.js +0 -13
- package/lib/components/publish-dynamic-modal/interface.js +0 -5
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.css +0 -3
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +0 -191
- package/lib/components/publish-dynamic-modal/requist-api.js +0 -48
- package/lib/components/search-key-handle/index.js +0 -39
- package/lib/components/upload/img/doc.svg +0 -1
- package/lib/components/upload/img/other.svg +0 -1
- package/lib/components/upload/img/pdf.svg +0 -1
- package/lib/components/upload/img/ppt.svg +0 -1
- package/lib/components/upload/img/radio.svg +0 -1
- package/lib/components/upload/img/video.svg +0 -1
- package/lib/components/upload/img/xls.svg +0 -1
- package/lib/components/upload/index.css +0 -26
- package/lib/components/upload/util.js +0 -102
- package/lib/components-v1/buttonv2/ButtonLinked.js +0 -35
- package/lib/components-v1/buttonv2/ButtonOutlined.js +0 -64
- package/lib/components-v1/buttonv2/ButtonRounded.js +0 -101
- package/lib/components-v1/buttonv2/DefaultButton.js +0 -86
- package/lib/components-v1/buttonv2/index.js +0 -37
- package/lib/components-v1/buttonv2/style/style.js +0 -53
- package/lib/components-v1/buttonv2/style/theme.css +0 -3
- package/lib/components-v1/confirm/index.js +0 -158
- package/lib/pages/dynamic/index.css +0 -5
- package/lib/pages/dynamic/index.js +0 -25
- package/lib/pages/like-ranking/column.js +0 -141
- package/lib/pages/like-ranking/filter-buttons/department.js +0 -44
- package/lib/pages/like-ranking/filter-buttons/group.js +0 -34
- package/lib/pages/like-ranking/filter-buttons/index.css +0 -19
- package/lib/pages/like-ranking/filter-buttons/index.js +0 -44
- package/lib/pages/like-ranking/filter-buttons/modular.js +0 -110
- package/lib/pages/like-ranking/filter-buttons/name.js +0 -73
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +0 -27
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +0 -38
- package/lib/pages/like-ranking/filter-buttons/timer.js +0 -56
- package/lib/pages/like-ranking/image/dynamic-empty.png +0 -0
- package/lib/pages/like-ranking/image/loading.gif +0 -0
- package/lib/pages/like-ranking/image/ranking-1.png +0 -0
- package/lib/pages/like-ranking/image/ranking-2.png +0 -0
- package/lib/pages/like-ranking/image/ranking-3.png +0 -0
- package/lib/pages/like-ranking/index.css +0 -185
- package/lib/pages/like-ranking/index.js +0 -252
- package/lib/pages/like-ranking/mock.js +0 -366
- package/lib/pages/like-ranking/request-api.js +0 -15
- package/lib/utils/format-time.js +0 -161
- package/lib/utils/helpers.js +0 -41
- package/lib/utils/roundWeight.js +0 -105
- package/yarn-error.log +0 -15894
|
@@ -13,26 +13,16 @@ var _common = require("../../common");
|
|
|
13
13
|
|
|
14
14
|
var _mockData = require("../../mockData");
|
|
15
15
|
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
+
|
|
16
18
|
var _style = require("./style");
|
|
17
19
|
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
18
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
23
|
|
|
20
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
25
|
|
|
22
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
23
|
-
|
|
24
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
|
|
26
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
27
|
-
|
|
28
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
29
|
-
|
|
30
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
-
|
|
32
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
26
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
27
|
|
|
38
28
|
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."); }
|
|
@@ -49,11 +39,9 @@ function PeriodList(_ref) {
|
|
|
49
39
|
var actived = _ref.actived,
|
|
50
40
|
periodData = _ref.periodData,
|
|
51
41
|
onSelected = _ref.onSelected,
|
|
52
|
-
style = _ref.style
|
|
53
|
-
_ref$size = _ref.size,
|
|
54
|
-
size = _ref$size === void 0 ? "m" : _ref$size;
|
|
42
|
+
style = _ref.style;
|
|
55
43
|
|
|
56
|
-
var _useState = (0, _react.useState)([
|
|
44
|
+
var _useState = (0, _react.useState)(['0']),
|
|
57
45
|
_useState2 = _slicedToArray(_useState, 2),
|
|
58
46
|
activeOrder = _useState2[0],
|
|
59
47
|
setActiveOrder = _useState2[1];
|
|
@@ -65,48 +53,15 @@ function PeriodList(_ref) {
|
|
|
65
53
|
style: style
|
|
66
54
|
}, periodData.map(function (item, index) {
|
|
67
55
|
return /*#__PURE__*/_react["default"].createElement(_style.Item, {
|
|
68
|
-
className: item.order[0] == activeOrder[0] ?
|
|
56
|
+
className: item.order[0] == activeOrder[0] ? 'active' : '',
|
|
69
57
|
key: index,
|
|
70
58
|
onClick: function onClick() {
|
|
71
59
|
return onSelected(item.order[0]);
|
|
72
|
-
}
|
|
73
|
-
size: size
|
|
60
|
+
}
|
|
74
61
|
}, item.title);
|
|
75
|
-
}), new Array(6).fill(1).map(function () {
|
|
76
|
-
return /*#__PURE__*/_react["default"].createElement(_style.PlaceHolder, {
|
|
77
|
-
size: size
|
|
78
|
-
});
|
|
79
62
|
}));
|
|
80
63
|
}
|
|
81
64
|
|
|
82
|
-
function getDoubleMonthData(startMonth) {
|
|
83
|
-
var start = startMonth % 2 == 1 ? 1 : 2;
|
|
84
|
-
var month = start;
|
|
85
|
-
|
|
86
|
-
var getNextMonth = function getNextMonth(month) {
|
|
87
|
-
var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
88
|
-
return (month + step) % 12 || 12;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
var datas = [{
|
|
92
|
-
title: "".concat(start, " - ").concat(getNextMonth(start), "\u6708"),
|
|
93
|
-
order: ["4,".concat(start)],
|
|
94
|
-
checked: false
|
|
95
|
-
}];
|
|
96
|
-
|
|
97
|
-
while (1) {
|
|
98
|
-
month = getNextMonth(month, 2);
|
|
99
|
-
if (month == start) break;
|
|
100
|
-
datas.push({
|
|
101
|
-
title: "".concat(month, " - ").concat(getNextMonth(month), "\u6708"),
|
|
102
|
-
order: ["4,".concat(month)],
|
|
103
|
-
checked: false
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return datas;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
65
|
function Selector(_ref2) {
|
|
111
66
|
var className = _ref2.className,
|
|
112
67
|
onSelected = _ref2.onSelected,
|
|
@@ -116,14 +71,10 @@ function Selector(_ref2) {
|
|
|
116
71
|
showMonth = _ref2.showMonth,
|
|
117
72
|
showQuarter = _ref2.showQuarter,
|
|
118
73
|
showYear = _ref2.showYear,
|
|
119
|
-
showHalfYear = _ref2.showHalfYear,
|
|
120
|
-
showDoubleMonth = _ref2.showDoubleMonth,
|
|
121
74
|
yearsRange = _ref2.yearsRange,
|
|
122
|
-
wrapperStyle = _ref2.wrapperStyle
|
|
123
|
-
_ref2$startMonth = _ref2.startMonth,
|
|
124
|
-
startMonth = _ref2$startMonth === void 0 ? 1 : _ref2$startMonth;
|
|
75
|
+
wrapperStyle = _ref2.wrapperStyle;
|
|
125
76
|
|
|
126
|
-
var _useState3 = (0, _react.useState)(new Date().getFullYear() +
|
|
77
|
+
var _useState3 = (0, _react.useState)(new Date().getFullYear() + ''),
|
|
127
78
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
128
79
|
annualNum = _useState4[0],
|
|
129
80
|
setAnnualNum = _useState4[1];
|
|
@@ -133,7 +84,7 @@ function Selector(_ref2) {
|
|
|
133
84
|
annualNumIndex = _useState6[0],
|
|
134
85
|
setAnnualNumIndex = _useState6[1];
|
|
135
86
|
|
|
136
|
-
var _useState7 = (0, _react.useState)(
|
|
87
|
+
var _useState7 = (0, _react.useState)('-1'),
|
|
137
88
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
138
89
|
cycleType = _useState8[0],
|
|
139
90
|
setCycleType = _useState8[1];
|
|
@@ -143,7 +94,7 @@ function Selector(_ref2) {
|
|
|
143
94
|
periodData = _useState10[0],
|
|
144
95
|
setPeriodData = _useState10[1];
|
|
145
96
|
|
|
146
|
-
var _useState11 = (0, _react.useState)(
|
|
97
|
+
var _useState11 = (0, _react.useState)('0'),
|
|
147
98
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
148
99
|
yqmNum = _useState12[0],
|
|
149
100
|
setYqmNum = _useState12[1];
|
|
@@ -157,18 +108,17 @@ function Selector(_ref2) {
|
|
|
157
108
|
var yearIndex = (0, _common.computeYearIndex)(Number(annualNum), yearsData, computeType);
|
|
158
109
|
setAnnualNum(yearsData[yearIndex].title);
|
|
159
110
|
setAnnualNumIndex(yearIndex);
|
|
160
|
-
setCycleType(
|
|
161
|
-
setYqmNum(
|
|
111
|
+
setCycleType('');
|
|
112
|
+
setYqmNum('');
|
|
162
113
|
}
|
|
163
114
|
}
|
|
164
115
|
|
|
165
116
|
function handleSelected(period) {
|
|
166
|
-
var selected =
|
|
117
|
+
var selected = {
|
|
167
118
|
annualNum: annualNum,
|
|
168
119
|
cycleType: (0, _common.dealSelectedPeriodData)(period).cycleType,
|
|
169
120
|
yqmNum: (0, _common.dealSelectedPeriodData)(period).yqmNum
|
|
170
|
-
}
|
|
171
|
-
|
|
121
|
+
};
|
|
172
122
|
onSelected(selected);
|
|
173
123
|
}
|
|
174
124
|
|
|
@@ -187,64 +137,49 @@ function Selector(_ref2) {
|
|
|
187
137
|
title: "年度",
|
|
188
138
|
order: ["1"],
|
|
189
139
|
checked: false
|
|
140
|
+
}, showCustom && {
|
|
141
|
+
title: "自定义",
|
|
142
|
+
order: ["0,0"],
|
|
143
|
+
checked: false
|
|
190
144
|
}].filter(function (item) {
|
|
191
145
|
return item;
|
|
192
146
|
});
|
|
193
|
-
|
|
194
|
-
if (showHalfYear) {
|
|
195
|
-
periodDatas.push({
|
|
196
|
-
title: "上半年",
|
|
197
|
-
order: ["5,1"],
|
|
198
|
-
checked: false
|
|
199
|
-
}, {
|
|
200
|
-
title: "下半年",
|
|
201
|
-
order: ["5,2"],
|
|
202
|
-
checked: false
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
if (showQuarter) {
|
|
207
|
-
periodDatas.push.apply(periodDatas, _toConsumableArray(_mockData.MockQuarter));
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (showCustom) {
|
|
211
|
-
periodDatas.push({
|
|
212
|
-
title: "自定义",
|
|
213
|
-
order: ["0,0"],
|
|
214
|
-
checked: false
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
|
|
218
147
|
setPeriodData(periodDatas);
|
|
219
148
|
}, [selected, showCustom, showFullCycle, showMonth, showQuarter, showYear]);
|
|
220
149
|
return /*#__PURE__*/_react["default"].createElement(_style.Wrapper, {
|
|
221
150
|
className: className,
|
|
222
151
|
style: wrapperStyle
|
|
223
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.Head, null, yearsRange.length > 1 && /*#__PURE__*/_react["default"].createElement(
|
|
224
|
-
className:
|
|
152
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.Head, null, yearsRange.length > 1 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
153
|
+
className: (0, _classnames["default"])('titaui-period-selector__left-arrow', {
|
|
154
|
+
'disabled': !(yearsRangeLen > 1 && annualNumIndex != 0)
|
|
155
|
+
}),
|
|
225
156
|
onClick: function onClick() {
|
|
226
|
-
return setYear(
|
|
157
|
+
return setYear('subtract', yearsRangeLen > 1 && annualNumIndex != 0);
|
|
227
158
|
}
|
|
228
|
-
}), /*#__PURE__*/_react["default"].createElement(_style.Title, null, annualNum), yearsRange.length > 1 && /*#__PURE__*/_react["default"].createElement(
|
|
229
|
-
className:
|
|
159
|
+
}), /*#__PURE__*/_react["default"].createElement(_style.Title, null, annualNum), yearsRange.length > 1 && /*#__PURE__*/_react["default"].createElement("span", {
|
|
160
|
+
className: (0, _classnames["default"])('titaui-period-selector__right-arrow', {
|
|
161
|
+
'disabled': !(yearsRangeLen > 1 && annualNumIndex != yearsRangeLen - 1)
|
|
162
|
+
}),
|
|
230
163
|
onClick: function onClick() {
|
|
231
|
-
return setYear(
|
|
164
|
+
return setYear('add', yearsRangeLen > 1 && annualNumIndex != yearsRangeLen - 1);
|
|
232
165
|
}
|
|
233
166
|
})), /*#__PURE__*/_react["default"].createElement(PeriodList, {
|
|
234
|
-
actived: ["".concat(cycleType ==
|
|
167
|
+
actived: ["".concat(cycleType == '-1' ? '-1' : cycleType == '1' ? cycleType : "".concat(cycleType, ",").concat(yqmNum))],
|
|
235
168
|
periodData: periodData,
|
|
236
169
|
onSelected: function onSelected(period) {
|
|
237
170
|
handleSelected(period);
|
|
171
|
+
},
|
|
172
|
+
style: {
|
|
173
|
+
flexWrap: 'nowrap'
|
|
238
174
|
}
|
|
239
|
-
}),
|
|
240
|
-
actived: ["".concat(cycleType ==
|
|
241
|
-
periodData:
|
|
175
|
+
}), showQuarter && /*#__PURE__*/_react["default"].createElement(PeriodList, {
|
|
176
|
+
actived: ["".concat(cycleType == '-1' ? '-1' : cycleType == '1' ? cycleType : "".concat(cycleType, ",").concat(yqmNum))],
|
|
177
|
+
periodData: _mockData.MockQuarter,
|
|
242
178
|
onSelected: function onSelected(period) {
|
|
243
179
|
handleSelected(period);
|
|
244
180
|
}
|
|
245
181
|
}), showMonth && /*#__PURE__*/_react["default"].createElement(PeriodList, {
|
|
246
|
-
actived: ["".concat(cycleType ==
|
|
247
|
-
size: "s",
|
|
182
|
+
actived: ["".concat(cycleType == '-1' ? '-1' : cycleType == '1' ? cycleType : "".concat(cycleType, ",").concat(yqmNum))],
|
|
248
183
|
periodData: _mockData.MockMonth,
|
|
249
184
|
onSelected: function onSelected(period) {
|
|
250
185
|
handleSelected(period);
|
|
@@ -3,50 +3,36 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.Item = exports.List = exports.Icon = exports.Title = exports.Head = exports.Wrapper = void 0;
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
13
|
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
|
|
16
|
-
var Wrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
16
|
+
var Wrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 181px;\n min-height: 80px;\n padding: 15px 10px;\n border: 1px solid #f7f8fa;\n border-radius: 4px;\n box-shadow: 0px 4px 12px 0px rgba(127,145,180,0.2); \n background: #ffffff;\n box-sizing: content-box;\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Wrapper = Wrapper;
|
|
19
19
|
|
|
20
|
-
var Head = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n
|
|
20
|
+
var Head = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n height: 36px;\n margin: 0 auto 8px;\n padding: 8px 15px;\n border-radius: 3px;\n background: #f7f8fa;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])));
|
|
21
21
|
|
|
22
22
|
exports.Head = Head;
|
|
23
23
|
|
|
24
|
-
var Title = _styledComponents["default"].a(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
24
|
+
var Title = _styledComponents["default"].a(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1;\n font-size: 14px;\n height: 20px;\n color: #3f4755;\n cursor: default;\n text-align: center;\n\n &:hover {\n color: #3f4755;\n }\n"])));
|
|
25
25
|
|
|
26
26
|
exports.Title = Title;
|
|
27
27
|
|
|
28
|
-
var Icon = _styledComponents["default"].a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n
|
|
28
|
+
var Icon = _styledComponents["default"].a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transition: all .3s ease-in;\n color: #3f4755;\n\n &:hover {\n color: #2879ff;\n }\n\n &.disabled {\n color: #bfc7d5;\n cursor: default;\n\n &:hover {\n color: #bfc7d5;\n }\n }\n"])));
|
|
29
29
|
|
|
30
30
|
exports.Icon = Icon;
|
|
31
31
|
|
|
32
|
-
var List = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
|
|
32
|
+
var List = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n justify-content: space-between;\n"])));
|
|
33
33
|
|
|
34
34
|
exports.List = List;
|
|
35
35
|
|
|
36
|
-
var
|
|
37
|
-
if (size == 's') return 48;
|
|
38
|
-
if (size == 'm') return 72;
|
|
39
|
-
return 72;
|
|
40
|
-
};
|
|
36
|
+
var Item = _styledComponents["default"].a(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n min-width: 48px;\n padding: 8px;\n font-size: 12px;\n line-height: 17px;\n transition: all .3s ease-in;\n box-sizing: border-box;\n color: #6f7886;\n cursor: pointer;\n text-align: center;\n white-space: nowrap;\n\n &.active,\n &:hover {\n color: #2879ff;\n }\n\n &:hover {\n background: rgba(240,242,245,0.3);\n }\n"])));
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
return getItemWidthBySize(p.size);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
exports.Item = Item;
|
|
47
|
-
|
|
48
|
-
var PlaceHolder = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: ", "px;\n height: 0;\n"])), function (p) {
|
|
49
|
-
return getItemWidthBySize(p.size);
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
exports.PlaceHolder = PlaceHolder;
|
|
38
|
+
exports.Item = Item;
|
|
@@ -47,8 +47,7 @@ function PeriodSelector(_ref) {
|
|
|
47
47
|
var align = _ref.align,
|
|
48
48
|
className = _ref.className,
|
|
49
49
|
children = _ref.children,
|
|
50
|
-
|
|
51
|
-
isFetch = _ref$isFetch === void 0 ? true : _ref$isFetch,
|
|
50
|
+
isFetch = _ref.isFetch,
|
|
52
51
|
onChange = _ref.onChange,
|
|
53
52
|
selected = _ref.selected,
|
|
54
53
|
selectorClass = _ref.selectorClass,
|
|
@@ -62,12 +61,6 @@ function PeriodSelector(_ref) {
|
|
|
62
61
|
showQuarter = _ref$showQuarter === void 0 ? true : _ref$showQuarter,
|
|
63
62
|
_ref$showYear = _ref.showYear,
|
|
64
63
|
showYear = _ref$showYear === void 0 ? true : _ref$showYear,
|
|
65
|
-
_ref$showBimonthly = _ref.showBimonthly,
|
|
66
|
-
showBimonthly = _ref$showBimonthly === void 0 ? true : _ref$showBimonthly,
|
|
67
|
-
_ref$showHalfYear = _ref.showHalfYear,
|
|
68
|
-
showHalfYear = _ref$showHalfYear === void 0 ? true : _ref$showHalfYear,
|
|
69
|
-
_ref$startMonth = _ref.startMonth,
|
|
70
|
-
startMonth = _ref$startMonth === void 0 ? 1 : _ref$startMonth,
|
|
71
64
|
yearsRange = _ref.yearsRange,
|
|
72
65
|
wrapperStyle = _ref.wrapperStyle,
|
|
73
66
|
popClass = _ref.popClass,
|
|
@@ -75,13 +68,10 @@ function PeriodSelector(_ref) {
|
|
|
75
68
|
|
|
76
69
|
var _useState = (0, _react.useState)({
|
|
77
70
|
hasSetting: true,
|
|
78
|
-
isOpenCustom:
|
|
79
|
-
isOpenMonth:
|
|
80
|
-
isOpenQuarter:
|
|
81
|
-
isOpenYear:
|
|
82
|
-
isOpenBimonthly: showBimonthly,
|
|
83
|
-
isOpenHalfYear: showHalfYear,
|
|
84
|
-
yearStartMonth: 1
|
|
71
|
+
isOpenCustom: true,
|
|
72
|
+
isOpenMonth: true,
|
|
73
|
+
isOpenQuarter: true,
|
|
74
|
+
isOpenYear: true
|
|
85
75
|
}),
|
|
86
76
|
_useState2 = _slicedToArray(_useState, 2),
|
|
87
77
|
cycleSetting = _useState2[0],
|
|
@@ -101,27 +91,42 @@ function PeriodSelector(_ref) {
|
|
|
101
91
|
visible = _useState6[0],
|
|
102
92
|
setVisible = _useState6[1];
|
|
103
93
|
|
|
104
|
-
var fetchRef = (0, _react.useRef)(false);
|
|
105
94
|
(0, _react.useEffect)(function () {
|
|
106
95
|
if (selected) {
|
|
107
96
|
setSelectedPeriod(selected);
|
|
108
97
|
}
|
|
109
98
|
}, []);
|
|
110
99
|
(0, _react.useEffect)(function () {
|
|
111
|
-
if (!visible && (!isFetch || fetchRef.current)) return;
|
|
112
100
|
var url = (0, _helper.getApiUrl)("okr/cycleSetting");
|
|
101
|
+
var period = {
|
|
102
|
+
annualNum: new Date().getFullYear() + "",
|
|
103
|
+
cycleType: "2",
|
|
104
|
+
yqmNum: "".concat((0, _moment["default"])().quarter())
|
|
105
|
+
};
|
|
113
106
|
|
|
114
107
|
if (isFetch) {
|
|
115
108
|
(0, _helper.taker)(url, "GET").then(function (res) {
|
|
116
109
|
if (res.Code == 1) {
|
|
117
|
-
fetchRef.current = true;
|
|
118
110
|
setCycleSetting(res.Data);
|
|
119
111
|
|
|
120
112
|
if (selected) {
|
|
121
113
|
setSelectedPeriod(selected);
|
|
122
114
|
} else {
|
|
123
|
-
|
|
124
|
-
|
|
115
|
+
// 年度季度至少开启一项
|
|
116
|
+
if (res.Data.isOpenQuarter) {
|
|
117
|
+
// 季度开启,默认显示当前季度
|
|
118
|
+
setSelectedPeriod(period);
|
|
119
|
+
} else if (res.Data.isOpenMonth) {
|
|
120
|
+
// 季度关闭,月度开启,默认显示当前月
|
|
121
|
+
period = {
|
|
122
|
+
annualNum: new Date().getFullYear() + "",
|
|
123
|
+
cycleType: "3",
|
|
124
|
+
yqmNum: new Date().getMonth() + 1 + ""
|
|
125
|
+
};
|
|
126
|
+
setSelectedPeriod(period);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
onChange && onChange(period);
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
132
|
})["catch"](function (error) {
|
|
@@ -131,11 +136,11 @@ function PeriodSelector(_ref) {
|
|
|
131
136
|
if (selected) {
|
|
132
137
|
setSelectedPeriod(selected);
|
|
133
138
|
} else {
|
|
134
|
-
setSelectedPeriod(
|
|
135
|
-
onChange && onChange(
|
|
139
|
+
setSelectedPeriod(period);
|
|
140
|
+
onChange && onChange(period);
|
|
136
141
|
}
|
|
137
142
|
}
|
|
138
|
-
}, [
|
|
143
|
+
}, []);
|
|
139
144
|
|
|
140
145
|
var popup = /*#__PURE__*/_react["default"].createElement(_selector["default"], {
|
|
141
146
|
className: selectorClass,
|
|
@@ -145,9 +150,6 @@ function PeriodSelector(_ref) {
|
|
|
145
150
|
showMonth: isFetch ? cycleSetting.isOpenMonth : showMonth,
|
|
146
151
|
showQuarter: isFetch ? cycleSetting.isOpenQuarter : showQuarter,
|
|
147
152
|
showYear: isFetch ? cycleSetting.isOpenYear : showYear,
|
|
148
|
-
showHalfYear: isFetch ? cycleSetting.isOpenHalfYear : showHalfYear,
|
|
149
|
-
showDoubleMonth: isFetch ? cycleSetting.isOpenBimonthly : showBimonthly,
|
|
150
|
-
startMonth: isFetch ? cycleSetting.yearStartMonth : startMonth,
|
|
151
153
|
onSelected: function onSelected(period) {
|
|
152
154
|
setSelectedPeriod(period);
|
|
153
155
|
onChange && onChange(period);
|
|
@@ -200,8 +202,5 @@ PeriodSelector.defaultProps = {
|
|
|
200
202
|
showYear: true,
|
|
201
203
|
yearsRange: [2020, new Date().getFullYear() + 1]
|
|
202
204
|
};
|
|
203
|
-
PeriodSelector.formatPeriod = _common.formatPeriod;
|
|
204
|
-
PeriodSelector.getDateRangeByCycle = _common.getDateRangeByCycle;
|
|
205
|
-
PeriodSelector.getDefalutCycle = _common.getDefalutCycle;
|
|
206
205
|
var _default = PeriodSelector;
|
|
207
206
|
exports["default"] = _default;
|
|
@@ -17,7 +17,7 @@ require("./rc-trigger.css");
|
|
|
17
17
|
|
|
18
18
|
require("./index.css");
|
|
19
19
|
|
|
20
|
-
var _excluded = ["extraClass", "mask", "destroyPopupOnHide", "action", "popupPlacement", "builtinPlacements", "popupVisible", "zIndex", "
|
|
20
|
+
var _excluded = ["extraClass", "mask", "destroyPopupOnHide", "action", "popupPlacement", "builtinPlacements", "popupVisible", "zIndex", "popupAlign"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
@@ -62,7 +62,6 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
62
62
|
popupVisible = _props$popupVisible === void 0 ? false : _props$popupVisible,
|
|
63
63
|
_props$zIndex = props.zIndex,
|
|
64
64
|
zIndex = _props$zIndex === void 0 ? 2000 : _props$zIndex,
|
|
65
|
-
_onPopupVisibleChange = props.onPopupVisibleChange,
|
|
66
65
|
_props$popupAlign = props.popupAlign,
|
|
67
66
|
popupAlign = _props$popupAlign === void 0 ? {
|
|
68
67
|
offset: [0, 0],
|
|
@@ -109,7 +108,6 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
109
108
|
destroyPopupOnHide: destroyPopupOnHide,
|
|
110
109
|
onPopupVisibleChange: function onPopupVisibleChange(visible) {
|
|
111
110
|
setVisible(visible);
|
|
112
|
-
_onPopupVisibleChange && _onPopupVisibleChange(visible);
|
|
113
111
|
},
|
|
114
112
|
popupAlign: popupAlign
|
|
115
113
|
}, restProps));
|
|
@@ -5,16 +5,12 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _radioGroup = _interopRequireDefault(require("./radioGroup"));
|
|
13
|
-
|
|
14
12
|
require("./index.css");
|
|
15
13
|
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
15
|
|
|
20
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -40,9 +36,7 @@ var Radio = function Radio(props) {
|
|
|
40
36
|
checked = props.checked,
|
|
41
37
|
name = props.name,
|
|
42
38
|
value = props.value,
|
|
43
|
-
onChange = props.onChange
|
|
44
|
-
_props$className = props.className,
|
|
45
|
-
className = _props$className === void 0 ? '' : _props$className;
|
|
39
|
+
onChange = props.onChange;
|
|
46
40
|
|
|
47
41
|
var _useState = (0, _react.useState)(getChecked(checked)),
|
|
48
42
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -70,7 +64,7 @@ var Radio = function Radio(props) {
|
|
|
70
64
|
}
|
|
71
65
|
}, [checked]);
|
|
72
66
|
return /*#__PURE__*/_react["default"].createElement("label", {
|
|
73
|
-
className: "titaui-radio-wrapper
|
|
67
|
+
className: "titaui-radio-wrapper",
|
|
74
68
|
onMouseUp: function onMouseUp() {
|
|
75
69
|
onChange && onChange(value);
|
|
76
70
|
}
|
|
@@ -91,6 +85,4 @@ var Radio = function Radio(props) {
|
|
|
91
85
|
};
|
|
92
86
|
|
|
93
87
|
var _default = Radio;
|
|
94
|
-
exports["default"] = _default;
|
|
95
|
-
var RadioGroup = _radioGroup["default"];
|
|
96
|
-
exports.RadioGroup = RadioGroup;
|
|
88
|
+
exports["default"] = _default;
|