@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
|
@@ -12,6 +12,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
|
|
13
13
|
var _titaUi = require("tita-ui");
|
|
14
14
|
|
|
15
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
16
|
+
|
|
15
17
|
var _periodSelector = _interopRequireDefault(require("../period-selector"));
|
|
16
18
|
|
|
17
19
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
@@ -20,8 +22,6 @@ var _rangePickerPop = _interopRequireDefault(require("../range-picker-pop"));
|
|
|
20
22
|
|
|
21
23
|
require("./index.css");
|
|
22
24
|
|
|
23
|
-
var _helper = require("../period-selector/helper");
|
|
24
|
-
|
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
26
26
|
|
|
27
27
|
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); }
|
|
@@ -47,16 +47,78 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
47
47
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
48
48
|
|
|
49
49
|
function _formatCycleData(periodParams, getCycleRange) {
|
|
50
|
-
if (!periodParams) return
|
|
50
|
+
if (!periodParams) return '';
|
|
51
|
+
var quarter = ['', '第一季度', '第二季度', '第三季度', '第四季度'];
|
|
52
|
+
var cycleDate = '';
|
|
51
53
|
var startDate = periodParams.startDate;
|
|
52
54
|
var endDate = periodParams.endDate;
|
|
55
|
+
var annualNum = periodParams.annualNum == '-1' ? '全部年份' : periodParams.annualNum;
|
|
56
|
+
|
|
57
|
+
switch (periodParams.cycleType.toString()) {
|
|
58
|
+
case '-1':
|
|
59
|
+
cycleDate = '全部周期';
|
|
60
|
+
break;
|
|
61
|
+
|
|
62
|
+
case '1':
|
|
63
|
+
cycleDate = '年度';
|
|
64
|
+
break;
|
|
65
|
+
|
|
66
|
+
case '2':
|
|
67
|
+
// 季度
|
|
68
|
+
cycleDate = quarter[Number(periodParams.yqmNum)];
|
|
69
|
+
break;
|
|
70
|
+
|
|
71
|
+
case '3':
|
|
72
|
+
cycleDate = periodParams.yqmNum + '月';
|
|
73
|
+
break;
|
|
74
|
+
|
|
75
|
+
default:
|
|
76
|
+
cycleDate = '自定义';
|
|
77
|
+
}
|
|
53
78
|
|
|
54
79
|
if (new Date(periodParams.startDate).getFullYear() == new Date().getFullYear()) {
|
|
55
80
|
startDate = periodParams.startDate.slice(5);
|
|
56
81
|
endDate = periodParams.endDate.slice(5);
|
|
57
82
|
}
|
|
58
83
|
|
|
59
|
-
return
|
|
84
|
+
return annualNum + '年 ' + cycleDate + "".concat(getCycleRange ? ',' + startDate + '~' + endDate : '');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function getDefaultDateOfCycle(cycle) {
|
|
88
|
+
switch (cycle.cycleType) {
|
|
89
|
+
case '1':
|
|
90
|
+
{
|
|
91
|
+
return {
|
|
92
|
+
startDate: "".concat(cycle.annualNum, "/01/01"),
|
|
93
|
+
endDate: "".concat(cycle.annualNum, "/12/31")
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
case '2':
|
|
98
|
+
{
|
|
99
|
+
var quarter = (0, _moment["default"])().set('year', Number(cycle.annualNum)).set('quarter', Number(cycle.yqmNum));
|
|
100
|
+
return {
|
|
101
|
+
startDate: quarter.startOf('quarter').format('YYYY/MM/DD'),
|
|
102
|
+
endDate: quarter.endOf('quarter').format('YYYY/MM/DD')
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
case '3':
|
|
107
|
+
{
|
|
108
|
+
return {
|
|
109
|
+
startDate: "".concat(cycle.annualNum, "/").concat(cycle.yqmNum < 10 ? '0' + cycle.yqmNum : cycle.yqmNum, "/01"),
|
|
110
|
+
endDate: (0, _moment["default"])(cycle.annualNum + '/' + cycle.yqmNum + '/' + 1).add(1, 'month').set('date', 0).format('YYYY/MM/DD')
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
default:
|
|
115
|
+
{
|
|
116
|
+
return {
|
|
117
|
+
startDate: (0, _moment["default"])().set('year', Number(cycle.annualNum)).format('YYYY/MM/DD'),
|
|
118
|
+
endDate: (0, _moment["default"])().set('year', Number(cycle.annualNum)).add(30, 'day').format('YYYY/MM/DD')
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
60
122
|
}
|
|
61
123
|
|
|
62
124
|
function CreateCycle(_ref) {
|
|
@@ -68,7 +130,6 @@ function CreateCycle(_ref) {
|
|
|
68
130
|
canEdit = _ref$canEdit === void 0 ? true : _ref$canEdit,
|
|
69
131
|
_ref$getCycleRange = _ref.getCycleRange,
|
|
70
132
|
getCycleRange = _ref$getCycleRange === void 0 ? false : _ref$getCycleRange,
|
|
71
|
-
className = _ref.className,
|
|
72
133
|
_ref$popupAlign = _ref.popupAlign,
|
|
73
134
|
popupAlign = _ref$popupAlign === void 0 ? {
|
|
74
135
|
offset: [0, 0],
|
|
@@ -86,23 +147,14 @@ function CreateCycle(_ref) {
|
|
|
86
147
|
selfCycle = _useState2[0],
|
|
87
148
|
setSelfCycle = _useState2[1];
|
|
88
149
|
|
|
89
|
-
var
|
|
90
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
91
|
-
cycleSetting = _useState4[0],
|
|
92
|
-
setCycleSetting = _useState4[1];
|
|
150
|
+
var cycleWrapperRef = (0, _react.useRef)(document.createElement('div'));
|
|
93
151
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (res.Code == 1) {
|
|
98
|
-
setCycleSetting(res.Data);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
}, []);
|
|
102
|
-
var cycleWrapperRef = (0, _react.useRef)(document.createElement("div"));
|
|
152
|
+
var onSelectClickHandler = function onSelectClickHandler() {
|
|
153
|
+
setSelfCycle(cycle); // popRef.current && popRef.current.open(btnRef.current);
|
|
154
|
+
};
|
|
103
155
|
|
|
104
156
|
var onPeriodSelectorChangeHandler = function onPeriodSelectorChangeHandler(c) {
|
|
105
|
-
setSelfCycle(_objectSpread(_objectSpread({}, selfCycle), c));
|
|
157
|
+
setSelfCycle(_objectSpread(_objectSpread(_objectSpread({}, selfCycle), c), getDefaultDateOfCycle(c)));
|
|
106
158
|
};
|
|
107
159
|
|
|
108
160
|
var onStartDateConfirmHandler = function onStartDateConfirmHandler(d) {
|
|
@@ -113,7 +165,7 @@ function CreateCycle(_ref) {
|
|
|
113
165
|
setSelfCycle(_objectSpread(_objectSpread({}, selfCycle), d));
|
|
114
166
|
};
|
|
115
167
|
|
|
116
|
-
var onSureClickHandler = function onSureClickHandler(
|
|
168
|
+
var onSureClickHandler = function onSureClickHandler() {
|
|
117
169
|
onChange(selfCycle);
|
|
118
170
|
popRef.current && popRef.current.close();
|
|
119
171
|
};
|
|
@@ -122,135 +174,95 @@ function CreateCycle(_ref) {
|
|
|
122
174
|
popRef.current && popRef.current.close();
|
|
123
175
|
};
|
|
124
176
|
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
|
|
177
|
+
var popup = /*#__PURE__*/_react["default"].createElement("div", {
|
|
178
|
+
className: "okr-detail-date-cycle-wrapper",
|
|
179
|
+
onClick: function onClick(e) {
|
|
180
|
+
return e.stopPropagation();
|
|
181
|
+
},
|
|
182
|
+
ref: cycleWrapperRef,
|
|
183
|
+
style: {
|
|
184
|
+
'backgroundColor': 'white',
|
|
185
|
+
'boxShadow': '0px 4px 12px 0px rgb(127 145 180 / 20%)',
|
|
186
|
+
'borderRadius': 4
|
|
128
187
|
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
ref: cycleWrapperRef,
|
|
141
|
-
style: {
|
|
142
|
-
backgroundColor: "white",
|
|
143
|
-
boxShadow: "0px 4px 12px 0px rgb(127 145 180 / 20%)",
|
|
144
|
-
borderRadius: 4
|
|
145
|
-
}
|
|
146
|
-
}, /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
147
|
-
style: {
|
|
148
|
-
width: "100%"
|
|
149
|
-
},
|
|
150
|
-
selected: selfCycle,
|
|
151
|
-
showFullCycle: false,
|
|
152
|
-
onChange: onPeriodSelectorChangeHandler,
|
|
153
|
-
container: cycleWrapperRef.current,
|
|
154
|
-
yearsRange: [2018, 2030],
|
|
155
|
-
isFetch: false,
|
|
156
|
-
showYear: cycleSetting.isOpenYear,
|
|
157
|
-
showCustom: cycleSetting.isOpenCustom,
|
|
158
|
-
showMonth: cycleSetting.isOpenMonth,
|
|
159
|
-
showQuarter: cycleSetting.isOpenQuarter,
|
|
160
|
-
showBimonthly: cycleSetting.isOpenBimonthly,
|
|
161
|
-
showHalfYear: cycleSetting.isOpenHalfYear,
|
|
162
|
-
startMonth: cycleSetting.yearStartMonth
|
|
163
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
164
|
-
className: "okr-detail-date-cycle__button"
|
|
165
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, _formatCycleData(selfCycle, false)), /*#__PURE__*/_react["default"].createElement("i", {
|
|
166
|
-
className: "tu-icon-sort-down"
|
|
167
|
-
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
168
|
-
className: "okr-detail-date-cycle__date-line",
|
|
169
|
-
style: {
|
|
170
|
-
borderBottom: "1px solid #F0F2F5"
|
|
171
|
-
}
|
|
172
|
-
}, "\u5F00\u59CB\u65E5\u671F\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
173
|
-
format: "YYYY/MM/DD",
|
|
174
|
-
controlled: true,
|
|
175
|
-
onConfirm: onStartDateConfirmHandler,
|
|
176
|
-
defaultRange: {
|
|
177
|
-
startDate: selfCycle.startDate,
|
|
178
|
-
endDate: selfCycle.endDate
|
|
179
|
-
},
|
|
180
|
-
container: container
|
|
181
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
182
|
-
className: "okr-detail-date-cycle__time"
|
|
183
|
-
}, selfCycle.startDate, /*#__PURE__*/_react["default"].createElement("i", {
|
|
184
|
-
className: "tu-icon-arrow-down okr-detail-date-cycle__select-time-down-icon"
|
|
185
|
-
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
186
|
-
className: "okr-detail-date-cycle__date-line"
|
|
187
|
-
}, "\u7ED3\u675F\u65E5\u671F\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
188
|
-
format: "YYYY/MM/DD",
|
|
189
|
-
controlled: true,
|
|
190
|
-
onConfirm: onEndDateCOnfirmHandler,
|
|
191
|
-
defaultRange: {
|
|
192
|
-
startDate: selfCycle.startDate,
|
|
193
|
-
endDate: selfCycle.endDate
|
|
194
|
-
},
|
|
195
|
-
container: container
|
|
196
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
197
|
-
className: "okr-detail-date-cycle__time"
|
|
198
|
-
}, selfCycle.endDate, /*#__PURE__*/_react["default"].createElement("i", {
|
|
199
|
-
className: "tu-icon-arrow-down okr-detail-date-cycle__select-time-down-icon"
|
|
200
|
-
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
201
|
-
style: {
|
|
202
|
-
display: "flex",
|
|
203
|
-
justifyContent: "flex-end"
|
|
204
|
-
}
|
|
205
|
-
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
206
|
-
size: "s",
|
|
207
|
-
style: {
|
|
208
|
-
marginRight: 12
|
|
209
|
-
},
|
|
210
|
-
onClick: onCancelClickHandler
|
|
211
|
-
}, "\u53D6\u6D88"), /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
212
|
-
size: "s",
|
|
213
|
-
type: "primary",
|
|
214
|
-
onClick: onSureClickHandler
|
|
215
|
-
}, "\u786E\u5B9A")));
|
|
216
|
-
} else {
|
|
217
|
-
return /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
218
|
-
style: {
|
|
219
|
-
width: "100%"
|
|
220
|
-
},
|
|
221
|
-
selected: cycle,
|
|
222
|
-
showFullCycle: false,
|
|
223
|
-
onChange: onChange,
|
|
224
|
-
container: cycleWrapperRef.current,
|
|
225
|
-
yearsRange: [2018, 2030],
|
|
226
|
-
className: className,
|
|
227
|
-
isFetch: false,
|
|
228
|
-
showYear: cycleSetting.isOpenYear,
|
|
229
|
-
showCustom: cycleSetting.isOpenCustom,
|
|
230
|
-
showMonth: cycleSetting.isOpenMonth,
|
|
231
|
-
showQuarter: cycleSetting.isOpenQuarter,
|
|
232
|
-
showBimonthly: cycleSetting.isOpenBimonthly,
|
|
233
|
-
showHalfYear: cycleSetting.isOpenHalfYear,
|
|
234
|
-
startMonth: cycleSetting.yearStartMonth
|
|
235
|
-
}, renderInnerContent({
|
|
236
|
-
btnRef: btnRef,
|
|
237
|
-
clickCallback: function clickCallback() {},
|
|
238
|
-
text: _formatCycleData(cycle, getCycleRange)
|
|
239
|
-
}));
|
|
188
|
+
}, /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
189
|
+
style: {
|
|
190
|
+
'width': '100%'
|
|
191
|
+
},
|
|
192
|
+
selected: selfCycle,
|
|
193
|
+
showFullCycle: false,
|
|
194
|
+
onChange: onPeriodSelectorChangeHandler,
|
|
195
|
+
container: cycleWrapperRef.current,
|
|
196
|
+
yearsRange: [2018, 2030],
|
|
197
|
+
wrapperStyle: {
|
|
198
|
+
'width': 200
|
|
240
199
|
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
|
|
200
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
201
|
+
className: 'okr-detail-date-cycle__button'
|
|
202
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, _formatCycleData(selfCycle, false)), /*#__PURE__*/_react["default"].createElement("i", {
|
|
203
|
+
className: "tu-icon-sort-down"
|
|
204
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
205
|
+
className: "okr-detail-date-cycle__date-line",
|
|
206
|
+
style: {
|
|
207
|
+
borderBottom: '1px solid #F0F2F5'
|
|
208
|
+
}
|
|
209
|
+
}, "\u5F00\u59CB\u65E5\u671F\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
210
|
+
format: "YYYY/MM/DD",
|
|
211
|
+
controlled: true,
|
|
212
|
+
onConfirm: onStartDateConfirmHandler,
|
|
213
|
+
defaultRange: {
|
|
214
|
+
'startDate': selfCycle.startDate,
|
|
215
|
+
'endDate': selfCycle.endDate
|
|
216
|
+
},
|
|
217
|
+
container: container
|
|
218
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
219
|
+
className: "okr-detail-date-cycle__time"
|
|
220
|
+
}, selfCycle.startDate, /*#__PURE__*/_react["default"].createElement("i", {
|
|
221
|
+
className: "tu-icon-arrow-down okr-detail-date-cycle__select-time-down-icon"
|
|
222
|
+
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
223
|
+
className: "okr-detail-date-cycle__date-line"
|
|
224
|
+
}, "\u7ED3\u675F\u65E5\u671F\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
225
|
+
format: "YYYY/MM/DD",
|
|
226
|
+
controlled: true,
|
|
227
|
+
onConfirm: onEndDateCOnfirmHandler,
|
|
228
|
+
defaultRange: {
|
|
229
|
+
'startDate': selfCycle.startDate,
|
|
230
|
+
'endDate': selfCycle.endDate
|
|
231
|
+
},
|
|
232
|
+
container: container
|
|
233
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
234
|
+
className: "okr-detail-date-cycle__time"
|
|
235
|
+
}, selfCycle.endDate, /*#__PURE__*/_react["default"].createElement("i", {
|
|
236
|
+
className: "tu-icon-arrow-down okr-detail-date-cycle__select-time-down-icon"
|
|
237
|
+
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
238
|
+
style: {
|
|
239
|
+
'display': 'flex',
|
|
240
|
+
'justifyContent': 'flex-end'
|
|
241
|
+
}
|
|
242
|
+
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
243
|
+
size: "s",
|
|
244
|
+
style: {
|
|
245
|
+
'marginRight': 12
|
|
246
|
+
},
|
|
247
|
+
onClick: onCancelClickHandler
|
|
248
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
249
|
+
size: "s",
|
|
250
|
+
type: "primary",
|
|
251
|
+
onClick: onSureClickHandler
|
|
252
|
+
}, "\u786E\u5B9A")));
|
|
253
|
+
|
|
254
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, canEdit ? /*#__PURE__*/_react["default"].createElement(_popup["default"], {
|
|
244
255
|
popup: popup,
|
|
245
256
|
popupPlacement: "bottomLeft",
|
|
246
257
|
ref: popRef,
|
|
247
|
-
popupAlign: popupAlign
|
|
248
|
-
onPopupVisibleChange: handleVisibleChange
|
|
258
|
+
popupAlign: popupAlign
|
|
249
259
|
}, renderInnerContent({
|
|
250
260
|
btnRef: btnRef,
|
|
261
|
+
clickCallback: onSelectClickHandler,
|
|
251
262
|
text: _formatCycleData(cycle, getCycleRange)
|
|
252
263
|
})) : renderInnerContent({
|
|
253
264
|
btnRef: btnRef,
|
|
265
|
+
clickCallback: onSelectClickHandler,
|
|
254
266
|
text: _formatCycleData(cycle, getCycleRange)
|
|
255
267
|
}));
|
|
256
268
|
}
|
|
@@ -271,7 +271,7 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
271
271
|
|
|
272
272
|
if (data.isStandardMode) {
|
|
273
273
|
return /*#__PURE__*/_react["default"].createElement(_style.ReviewProblem, null, /*#__PURE__*/_react["default"].createElement(_style.ReviewCatalog, null, "\u95EE\u9898\u4E0E\u4E0D\u8DB3"), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
|
|
274
|
-
maxLength:
|
|
274
|
+
maxLength: 500,
|
|
275
275
|
value: (0, _mblog.htmlDecodeByRegExp)(data.Drawback),
|
|
276
276
|
initialHeight: 56,
|
|
277
277
|
style: {
|
|
@@ -299,7 +299,7 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
299
299
|
className: "delete-replay"
|
|
300
300
|
}, "\u5220\u9664"))), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
|
|
301
301
|
ref: "textareaView".concat(index + 1),
|
|
302
|
-
maxLength:
|
|
302
|
+
maxLength: 500,
|
|
303
303
|
value: (0, _mblog.htmlDecodeByRegExp)(item.drawback),
|
|
304
304
|
initialHeight: 56,
|
|
305
305
|
style: {
|
|
@@ -310,7 +310,7 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
310
310
|
},
|
|
311
311
|
placeholder: "<p>\u8BF7\u63CF\u8FF0\u51FA\u73B0\u7684\u67D0\u4E2A\u95EE\u9898\u5E76\u9488\u5BF9\u8BE5\u95EE\u9898\u5C55\u5F00\u5206\u6790</p>"
|
|
312
312
|
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_style.ReviewCatalogSecond, null, "\u6839\u672C\u539F\u56E0"), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
|
|
313
|
-
maxLength:
|
|
313
|
+
maxLength: 500,
|
|
314
314
|
value: (0, _mblog.htmlDecodeByRegExp)(item.cause),
|
|
315
315
|
autoResizing: true,
|
|
316
316
|
style: {
|
|
@@ -321,7 +321,7 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
321
321
|
},
|
|
322
322
|
placeholder: "<p>\u8BF7\u586B\u5199\u95EE\u9898\u51FA\u73B0\u7684\u6839\u672C\u539F\u56E0</p>"
|
|
323
323
|
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_style.ReviewCatalogSecond, null, "\u76F8\u5E94\u89E3\u51B3\u63AA\u65BD"), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
|
|
324
|
-
maxLength:
|
|
324
|
+
maxLength: 500,
|
|
325
325
|
value: (0, _mblog.htmlDecodeByRegExp)(item.measures),
|
|
326
326
|
autoResizing: true,
|
|
327
327
|
style: {
|
|
@@ -607,7 +607,7 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
607
607
|
}, ObjData.ObjType == 65 ? "KR".concat(ObjData.ObjIndex == 0 ? '' : ObjData.ObjIndex) : ''), /*#__PURE__*/_react["default"].createElement("p", {
|
|
608
608
|
className: "okr-name"
|
|
609
609
|
}, (0, _mblog.htmlDecodeByRegExp)(ObjData.ObjName)))), /*#__PURE__*/_react["default"].createElement(_style.ReviewWorth, null, /*#__PURE__*/_react["default"].createElement(_style.ReviewCatalog, null, "\u4EF7\u503C\u4E0E\u6536\u83B7"), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
|
|
610
|
-
maxLength:
|
|
610
|
+
maxLength: 2000,
|
|
611
611
|
value: (0, _mblog.htmlDecodeByRegExp)(data.gains),
|
|
612
612
|
initialHeight: 56,
|
|
613
613
|
style: {
|
|
@@ -69,18 +69,18 @@ var ReviewPop = /*#__PURE__*/function (_PureComponent) {
|
|
|
69
69
|
|
|
70
70
|
if (isStandardMode) {
|
|
71
71
|
// 标准模式
|
|
72
|
-
isAllowSubmit = (_this.characterCheck(data.gains,
|
|
72
|
+
isAllowSubmit = (_this.characterCheck(data.gains, 2000) || _this.characterCheck(data.Drawback, 500)) && data.gains.length <= 2000 && data.Drawback.length <= 500;
|
|
73
73
|
} else {
|
|
74
74
|
// 高级模式
|
|
75
75
|
// 是否填写问题与不足
|
|
76
76
|
var isHasDrawBack = data.drawbackList.some(function (item) {
|
|
77
|
-
return _this.characterCheck(item.drawback,
|
|
77
|
+
return _this.characterCheck(item.drawback, 500);
|
|
78
78
|
}); // 问题与不足字数是否超出限制
|
|
79
79
|
|
|
80
80
|
var isDrawbackBeyondLimit = data.drawbackList.some(function (item) {
|
|
81
|
-
return item.cause.length >
|
|
81
|
+
return item.cause.length > 500 || item.measures.length > 500 || item.drawback.length > 500;
|
|
82
82
|
});
|
|
83
|
-
isAllowSubmit = (_this.characterCheck(data.gains,
|
|
83
|
+
isAllowSubmit = (_this.characterCheck(data.gains, 2000) || isHasDrawBack) && data.gains.length <= 2000 && !isDrawbackBeyondLimit;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
_this.setState({
|
|
@@ -3,19 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.getDefalutCycle = getDefalutCycle;
|
|
8
|
-
exports.getDateRangeByCycle = exports.computeYearIndex = exports.formatPeriod = exports.dealYearsRange = exports.dealSelectedPeriodData = void 0;
|
|
9
|
-
|
|
10
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
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; }
|
|
15
|
-
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
6
|
+
exports.computeYearIndex = exports.formatPeriod = exports.dealYearsRange = exports.dealSelectedPeriodData = void 0;
|
|
19
7
|
|
|
20
8
|
var dealSelectedPeriodData = function dealSelectedPeriodData(period) {
|
|
21
9
|
var option = {};
|
|
@@ -63,12 +51,11 @@ var dealYearsRange = function dealYearsRange(yearsRange, showAllYears) {
|
|
|
63
51
|
exports.dealYearsRange = dealYearsRange;
|
|
64
52
|
|
|
65
53
|
var formatPeriod = function formatPeriod(selected) {
|
|
66
|
-
if (!selected) return '';
|
|
67
54
|
var quarter = ["", "第一季度", "第二季度", "第三季度", "第四季度"];
|
|
68
55
|
var cycleDate = "";
|
|
69
|
-
var annualNum = selected.annualNum == '-1' ? "全部年份" : selected.annualNum
|
|
56
|
+
var annualNum = selected.annualNum == '-1' ? "全部年份" : selected.annualNum;
|
|
70
57
|
|
|
71
|
-
switch (
|
|
58
|
+
switch (selected.cycleType) {
|
|
72
59
|
case '-1':
|
|
73
60
|
cycleDate = "全部周期";
|
|
74
61
|
break;
|
|
@@ -86,14 +73,6 @@ var formatPeriod = function formatPeriod(selected) {
|
|
|
86
73
|
cycleDate = selected.yqmNum + "月";
|
|
87
74
|
break;
|
|
88
75
|
|
|
89
|
-
case '4':
|
|
90
|
-
cycleDate = "".concat(selected.yqmNum, " - ").concat(Number(selected.yqmNum) + 1 % 12, "\u6708");
|
|
91
|
-
break;
|
|
92
|
-
|
|
93
|
-
case '5':
|
|
94
|
-
cycleDate = selected.yqmNum == '1' ? '上半年' : '下半年';
|
|
95
|
-
break;
|
|
96
|
-
|
|
97
76
|
default:
|
|
98
77
|
cycleDate = "自定义";
|
|
99
78
|
}
|
|
@@ -118,128 +97,4 @@ var computeYearIndex = function computeYearIndex(currentYear, yearsData, compute
|
|
|
118
97
|
return newIndex;
|
|
119
98
|
};
|
|
120
99
|
|
|
121
|
-
exports.computeYearIndex = computeYearIndex;
|
|
122
|
-
|
|
123
|
-
var getDateRangeByCycle = function getDateRangeByCycle(cycle) {
|
|
124
|
-
var startMonth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
125
|
-
|
|
126
|
-
if (!cycle) {
|
|
127
|
-
var start = (0, _moment["default"])();
|
|
128
|
-
return {
|
|
129
|
-
startDate: start.format('YYYY/MM/DD'),
|
|
130
|
-
endDate: start.add(1, 'M').format('YYYY/MM/DD')
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
;
|
|
135
|
-
|
|
136
|
-
switch (cycle.cycleType) {
|
|
137
|
-
case '1':
|
|
138
|
-
{
|
|
139
|
-
var _start = (0, _moment["default"])().year(Number(cycle.annualNum)).month(startMonth - 1).date(1);
|
|
140
|
-
|
|
141
|
-
return {
|
|
142
|
-
startDate: _start.format('YYYY/MM/DD'),
|
|
143
|
-
endDate: _start.add(11, 'M').endOf('M').format('YYYY/MM/DD')
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
case '2':
|
|
148
|
-
{
|
|
149
|
-
var yearStart = (0, _moment["default"])().year(Number(cycle.annualNum)).month(startMonth - 1).date(1);
|
|
150
|
-
var quarterStart = yearStart.add((Number(cycle.yqmNum) - 1) * 3, 'M');
|
|
151
|
-
return {
|
|
152
|
-
startDate: quarterStart.format('YYYY/MM/DD'),
|
|
153
|
-
endDate: quarterStart.add(2, 'M').endOf('M').format('YYYY/MM/DD')
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
case '3':
|
|
158
|
-
{
|
|
159
|
-
return {
|
|
160
|
-
startDate: "".concat(cycle.annualNum, "/").concat(Number(cycle.yqmNum) < 10 ? '0' + cycle.yqmNum : cycle.yqmNum, "/01"),
|
|
161
|
-
endDate: (0, _moment["default"])(cycle.annualNum + '/' + cycle.yqmNum + '/' + 1).add(1, 'month').set('date', 0).format('YYYY/MM/DD')
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
case '4':
|
|
166
|
-
{
|
|
167
|
-
var _start2 = (0, _moment["default"])().year(Number(cycle.annualNum)).month(Number(cycle.yqmNum) - 1).date(1);
|
|
168
|
-
|
|
169
|
-
return {
|
|
170
|
-
startDate: _start2.format('YYYY/MM/DD'),
|
|
171
|
-
endDate: _start2.add(1, 'month').endOf('M').format('YYYY/MM/DD')
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
case '5':
|
|
176
|
-
{
|
|
177
|
-
var _start3 = (0, _moment["default"])().year(Number(cycle.annualNum)).month(startMonth - 1).date(1);
|
|
178
|
-
|
|
179
|
-
if (cycle.yqmNum == '2') _start3.add(6, 'M');
|
|
180
|
-
return {
|
|
181
|
-
startDate: _start3.format('YYYY/MM/DD'),
|
|
182
|
-
endDate: _start3.add(5, 'month').endOf('M').format('YYYY/MM/DD')
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
default:
|
|
187
|
-
{
|
|
188
|
-
return {
|
|
189
|
-
startDate: (0, _moment["default"])().set('year', Number(cycle.annualNum)).format('YYYY/MM/DD'),
|
|
190
|
-
endDate: (0, _moment["default"])().set('year', Number(cycle.annualNum)).add(30, 'day').format('YYYY/MM/DD')
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
exports.getDateRangeByCycle = getDateRangeByCycle;
|
|
197
|
-
|
|
198
|
-
function getQuaterNum(month) {
|
|
199
|
-
var startMonth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
200
|
-
var m = month >= startMonth ? month : month + 12;
|
|
201
|
-
return Math.floor((m - startMonth) / 3) + 1;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function getDefalutCycle(setting) {
|
|
205
|
-
if (setting.isOpenQuarter) {
|
|
206
|
-
var _cycle = {
|
|
207
|
-
annualNum: new Date().getFullYear() + "",
|
|
208
|
-
cycleType: "2",
|
|
209
|
-
yqmNum: "".concat(getQuaterNum(new Date().getMonth() + 1, setting.yearStartMonth))
|
|
210
|
-
};
|
|
211
|
-
return _objectSpread(_objectSpread({}, _cycle), getDateRangeByCycle(_cycle, setting.yearStartMonth));
|
|
212
|
-
} else if (setting.isOpenMonth) {
|
|
213
|
-
var _cycle2 = {
|
|
214
|
-
annualNum: new Date().getFullYear() + "",
|
|
215
|
-
cycleType: "3",
|
|
216
|
-
yqmNum: new Date().getMonth() + 1 + ""
|
|
217
|
-
};
|
|
218
|
-
return _objectSpread(_objectSpread({}, _cycle2), getDateRangeByCycle(_cycle2, setting.yearStartMonth));
|
|
219
|
-
} else if (setting.isOpenBimonthly) {
|
|
220
|
-
var _cycle3 = {
|
|
221
|
-
annualNum: new Date().getFullYear() + "",
|
|
222
|
-
cycleType: "4",
|
|
223
|
-
yqmNum: new Date().getMonth() + 1 + ""
|
|
224
|
-
};
|
|
225
|
-
return _objectSpread(_objectSpread({}, _cycle3), getDateRangeByCycle(_cycle3, setting.yearStartMonth));
|
|
226
|
-
} else if (setting.isOpenHalfYear) {
|
|
227
|
-
var _cycle4 = {
|
|
228
|
-
annualNum: new Date().getFullYear() + "",
|
|
229
|
-
cycleType: "5",
|
|
230
|
-
yqmNum: "1"
|
|
231
|
-
};
|
|
232
|
-
return _objectSpread(_objectSpread({}, _cycle4), getDateRangeByCycle(_cycle4, setting.yearStartMonth));
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
var cycle = {
|
|
236
|
-
annualNum: new Date().getFullYear() + "",
|
|
237
|
-
cycleType: "1",
|
|
238
|
-
yqmNum: "1"
|
|
239
|
-
};
|
|
240
|
-
return _objectSpread({
|
|
241
|
-
annualNum: new Date().getFullYear() + "",
|
|
242
|
-
cycleType: "1",
|
|
243
|
-
yqmNum: "1"
|
|
244
|
-
}, getDateRangeByCycle(cycle, setting.yearStartMonth));
|
|
245
|
-
}
|
|
100
|
+
exports.computeYearIndex = computeYearIndex;
|