@titaui/pc 1.5.82 → 1.5.83
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/icon-avatar/index.css +15 -0
- package/lib/components/avatar/icon-avatar/index.js +50 -0
- package/lib/components/avatar/index.js +9 -1
- package/lib/components/avatar/num-avatar/index.css +12 -0
- package/lib/components/avatar/num-avatar/index.js +34 -0
- package/lib/components/button/admin-button/default.js +35 -0
- package/lib/components/button/admin-button/drop-down-arrow.js +93 -0
- package/lib/components/button/admin-button/index.css +86 -0
- package/lib/components/button/admin-button/index.js +40 -0
- package/lib/components/button/admin-button/primary.js +33 -0
- package/lib/components/button/admin-button/secondary.js +35 -0
- package/lib/components/button/default-button/index.css +49 -0
- package/lib/components/button/default-button/index.js +51 -0
- package/lib/components/button/export-button/index.css +51 -0
- package/lib/components/button/export-button/index.js +81 -0
- package/lib/components/button/images/daoru.svg +18 -0
- package/lib/components/button/index.js +23 -0
- package/lib/components/button/interface.js +5 -0
- package/lib/components/change-okr/Filter.js +133 -65
- package/lib/components/change-okr/Item.js +6 -0
- package/lib/components/change-okr/filterTab.js +2 -0
- package/lib/components/change-okr/index.js +2 -2
- package/lib/components/checkbox/index.js +4 -3
- package/lib/components/communication/CommunicationRecord.js +116 -161
- package/lib/components/communication/ConvertUserName.js +1 -1
- package/lib/components/communication/index.css +63 -0
- package/lib/components/communication/index.js +53 -28
- package/lib/components/communication/style.js +21 -25
- package/lib/components/create-okr/animation/check-animation.js +2746 -0
- package/lib/components/create-okr/constant.js +27 -0
- package/lib/components/create-okr/createCycle.js +193 -0
- package/lib/components/create-okr/createSuccessCmp.js +233 -0
- package/lib/components/create-okr/createSuccessCmpWrapper.js +20 -0
- package/lib/components/create-okr/fields/date-cycle.js +98 -0
- package/lib/components/create-okr/fields/index.css +346 -0
- package/lib/components/create-okr/fields/index.js +17 -0
- package/lib/components/create-okr/fields/input-with-err-popup.js +57 -0
- package/lib/components/create-okr/fields/o-new-name.js +197 -0
- package/lib/components/create-okr/fields/okr-case.js +98 -0
- package/lib/components/create-okr/fields/okr-classify.js +51 -0
- package/lib/components/create-okr/fields/okr-create-suggest.js +147 -0
- package/lib/components/create-okr/fields/okr-new-user-selector.js +106 -0
- package/lib/components/create-okr/fields/okr-parent.js +157 -0
- package/lib/components/create-okr/fields/okr-type-detail.js +196 -0
- package/lib/components/create-okr/fields/okr-type.js +131 -0
- package/lib/components/create-okr/fields/okr-visibility-detail.js +224 -0
- package/lib/components/create-okr/fields/okr-visibility.js +169 -0
- package/lib/components/create-okr/img/check-normal.svg +29 -0
- package/lib/components/create-okr/img/check-right.svg +16 -0
- package/lib/components/create-okr/img/check-wrong.svg +29 -0
- package/lib/components/create-okr/img/create-success-head.png +0 -0
- package/lib/components/create-okr/img/create-success-left-quotation.svg +14 -0
- package/lib/components/create-okr/img/create-success-message.svg +1 -0
- package/lib/components/create-okr/img/create-success-right-quotation.svg +14 -0
- package/lib/components/create-okr/img/create-success-shadow.svg +23 -0
- package/lib/components/create-okr/img/example.svg +11 -0
- package/lib/components/create-okr/img/hand.svg +12 -0
- package/lib/components/create-okr/img/kr-add.svg +12 -0
- package/lib/components/create-okr/img/left-quotation.svg +12 -0
- package/lib/components/create-okr/img/light.svg +1 -0
- package/lib/components/create-okr/img/pack-up.js +28 -0
- package/lib/components/create-okr/img/qr-code.png +0 -0
- package/lib/components/create-okr/img/right-quotation.svg +12 -0
- package/lib/components/create-okr/img/shower.png +0 -0
- package/lib/components/create-okr/img/target.svg +19 -0
- package/lib/components/create-okr/img/teach-okr.svg +17 -0
- package/lib/components/create-okr/img/wave.png +0 -0
- package/lib/components/create-okr/img/weight.svg +12 -0
- package/lib/components/create-okr/index.css +446 -0
- package/lib/components/create-okr/index.js +911 -0
- package/lib/components/create-okr/interface.js +5 -0
- package/lib/components/create-okr/kr-items/index.css +180 -0
- package/lib/components/create-okr/kr-items/kr-item-weight.js +194 -0
- package/lib/components/create-okr/kr-items/krDatas.js +299 -0
- package/lib/components/create-okr/kr-items/krItem.js +167 -0
- package/lib/components/create-okr/objectType.js +273 -0
- package/lib/components/create-okr/request-api.js +220 -0
- package/lib/components/create-okr/style.js +100 -0
- package/lib/components/create-okr/utils/getCreateOkrSurpassPercent.js +124 -0
- package/lib/components/create-okr/utils/helper.js +99 -0
- package/lib/components/create-okr/utils/index.js +23 -0
- package/lib/components/dropdown-layer/icon-item.js +5 -3
- package/lib/components/dropdown-layer/index.css +16 -0
- package/lib/components/dropdown-layer/index.js +21 -14
- package/lib/components/dynamic/components/condition-render/index.js +20 -0
- package/lib/components/dynamic/components/dangerous-html/index.js +22 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +78 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +192 -0
- package/lib/components/dynamic/components/obj-status/index.css +22 -0
- package/lib/components/dynamic/components/obj-status/index.js +38 -0
- package/lib/components/dynamic/components/percent/index.css +21 -0
- package/lib/components/dynamic/components/percent/index.js +38 -0
- package/lib/components/dynamic/components/title/index.css +35 -0
- package/lib/components/dynamic/components/title/index.js +59 -0
- package/lib/components/dynamic/constant.js +97 -0
- package/lib/components/dynamic/context/index.js +13 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.css +101 -0
- package/lib/components/dynamic/dynamic-item/components/header/index.js +299 -0
- package/lib/components/dynamic/dynamic-item/components/icon/index.css +10 -0
- package/lib/components/dynamic/dynamic-item/components/icon/index.js +35 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +22 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +22 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +173 -0
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +59 -0
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +48 -0
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +89 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +96 -0
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +171 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +67 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +110 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +111 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +158 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +215 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +91 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +125 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +22 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +95 -0
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +192 -0
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +138 -0
- package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +183 -0
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +153 -0
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +138 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +97 -0
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +207 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +59 -0
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +107 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +50 -0
- 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 +111 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +164 -0
- package/lib/components/dynamic/dynamic-item/index.css +128 -0
- package/lib/components/dynamic/dynamic-item/index.js +352 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- 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 +126 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +157 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +107 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/components/dynamic/dynamic-liking/index.js +76 -0
- package/lib/components/dynamic/dynamic-liking/item.js +91 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.css +36 -0
- package/lib/components/dynamic/dynamic-list/index.js +61 -0
- package/lib/components/dynamic/dynamic-topping/image/quotationMark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/topIcon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +148 -0
- package/lib/components/dynamic/dynamic-topping/index.js +80 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +140 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +204 -0
- package/lib/components/dynamic/dynamic.js +391 -0
- package/lib/components/dynamic/export-module/index.js +33 -0
- package/lib/components/dynamic/img/dynamic-P1.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P2.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P3.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P4.svg +15 -0
- package/lib/components/dynamic/img/dynamic-P5.svg +15 -0
- package/lib/components/dynamic/img/dynamic-delay.svg +17 -0
- package/lib/components/dynamic/img/dynamic-desire.svg +61 -0
- package/lib/components/dynamic/img/dynamic-empty.png +0 -0
- package/lib/components/dynamic/img/dynamic-end.svg +17 -0
- package/lib/components/dynamic/img/dynamic-left-quoto.svg +13 -0
- package/lib/components/dynamic/img/dynamic-loading.gif +0 -0
- package/lib/components/dynamic/img/dynamic-normal.svg +17 -0
- package/lib/components/dynamic/img/dynamic-promise.svg +61 -0
- package/lib/components/dynamic/img/dynamic-reword.svg +24 -0
- package/lib/components/dynamic/img/dynamic-right-quoto.svg +13 -0
- package/lib/components/dynamic/img/dynamic-risk.svg +17 -0
- package/lib/components/dynamic/img/dynamic-submit-delay.svg +16 -0
- package/lib/components/dynamic/img/dynamic-submit-normal.svg +18 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +27 -0
- package/lib/components/dynamic/interface.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +37 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +37 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +37 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +42 -0
- 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 +51 -0
- package/lib/components/dynamic/quick-operation/index.js +112 -0
- package/lib/components/dynamic/request-api.js +92 -0
- package/lib/components/dynamic/util.js +140 -0
- package/lib/components/emotionsSelector/style.js +1 -1
- package/lib/components/file-list/components/single-file/index.css +84 -0
- package/lib/components/file-list/components/single-file/index.js +115 -0
- package/lib/components/file-list/img/new-file-list-doc.svg +1 -0
- package/lib/components/file-list/img/new-file-list-other.svg +1 -0
- package/lib/components/file-list/img/new-file-list-pdf.svg +1 -0
- package/lib/components/file-list/img/new-file-list-ppt.svg +1 -0
- package/lib/components/file-list/img/new-file-list-radio.svg +1 -0
- package/lib/components/file-list/img/new-file-list-video.svg +1 -0
- package/lib/components/file-list/img/new-file-list-xls.svg +1 -0
- package/lib/components/file-list/index.css +5 -0
- package/lib/components/file-list/index.js +61 -0
- package/lib/components/file-list/interface.js +5 -0
- package/lib/components/file-list/util.js +78 -0
- package/lib/components/form/form-fields/input/index.css +11 -0
- package/lib/components/form/form-fields/input/index.js +3 -1
- package/lib/components/grid-page/image/{Assistant.svg → assistant.svg} +0 -0
- package/lib/components/grid-page/image/{Boss.svg → boss.svg} +0 -0
- package/lib/components/grid-page/image/{Default-background.png → default-background.png} +0 -0
- package/lib/components/grid-page/image/{UserManager.svg → userManager.svg} +0 -0
- package/lib/components/grid-page/personal-info/index.js +5 -5
- package/lib/components/img-viewer/icon/enlarge.js +30 -0
- package/lib/components/img-viewer/icon/left-rotate.js +46 -0
- package/lib/components/img-viewer/icon/right-rotate.js +44 -0
- package/lib/components/img-viewer/icon/shrink.js +37 -0
- package/lib/components/img-viewer/image/loading.gif +0 -0
- package/lib/components/img-viewer/index.css +155 -0
- package/lib/components/img-viewer/index.js +228 -0
- package/lib/components/img-viewer/interface.js +5 -0
- package/lib/components/img-viewer/util.js +16 -0
- package/lib/components/mblog/components/MblogAction.js +10 -6
- package/lib/components/mblog/index.js +24 -11
- package/lib/components/mblog/style.js +8 -8
- package/lib/components/okr-detail/components/header/index.css +4 -0
- 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 +15 -8
- package/lib/components/okr-flow/child-node/work-node.js +7 -1
- package/lib/components/okr-period-selector/select-cycle.js +139 -151
- package/lib/components/okr-progress-detail/index.css +1 -0
- 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 +168 -17
- package/lib/components/period-selector/components/selector/index.js +103 -38
- package/lib/components/period-selector/components/selector/style.js +23 -9
- package/lib/components/period-selector/index.js +29 -28
- package/lib/components/popup/index.js +3 -1
- package/lib/components/publish-dynamic-modal/index.js +13 -0
- package/lib/components/publish-dynamic-modal/interface.js +5 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.css +3 -0
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +191 -0
- package/lib/components/publish-dynamic-modal/requist-api.js +48 -0
- package/lib/components/radio/index.css +5 -0
- package/lib/components/radio/radio.js +12 -4
- package/lib/components/search-key-handle/index.js +39 -0
- package/lib/components/table/index.css +0 -1
- package/lib/components/upload/components/uploadedPreview.js +62 -54
- package/lib/components/upload/img/doc.svg +1 -0
- package/lib/components/upload/img/other.svg +1 -0
- package/lib/components/upload/img/pdf.svg +1 -0
- package/lib/components/upload/img/ppt.svg +1 -0
- package/lib/components/upload/img/radio.svg +1 -0
- package/lib/components/upload/img/video.svg +1 -0
- package/lib/components/upload/img/xls.svg +1 -0
- package/lib/components/upload/index.css +26 -0
- package/lib/components/upload/index.js +89 -57
- package/lib/components/upload/style.js +7 -7
- package/lib/components/upload/type.js +15 -15
- package/lib/components/upload/util.js +102 -0
- package/lib/components/upvote/index.js +37 -14
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +4 -0
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +50 -24
- package/lib/components/user-selector/export-modules/field-tree-selector/single-selector/index.js +11 -2
- package/lib/components/user-selector/layout/index.css +1 -1
- package/lib/components-v1/buttonv2/ButtonLinked.js +35 -0
- package/lib/components-v1/buttonv2/ButtonOutlined.js +64 -0
- package/lib/components-v1/buttonv2/ButtonRounded.js +101 -0
- package/lib/components-v1/buttonv2/DefaultButton.js +86 -0
- package/lib/components-v1/buttonv2/index.js +37 -0
- package/lib/components-v1/buttonv2/style/style.js +53 -0
- package/lib/components-v1/buttonv2/style/theme.css +3 -0
- package/lib/components-v1/confirm/index.js +158 -0
- package/lib/index.js +49 -5
- package/lib/pages/dynamic/index.css +5 -0
- package/lib/pages/dynamic/index.js +25 -0
- package/lib/pages/home-page/components/data-list/nav-selector/index.js +18 -0
- package/lib/pages/home-page/components/data-list/table/utils-function.js +6 -3
- package/lib/pages/like-ranking/column.js +141 -0
- package/lib/pages/like-ranking/filter-buttons/department.js +44 -0
- package/lib/pages/like-ranking/filter-buttons/group.js +34 -0
- package/lib/pages/like-ranking/filter-buttons/index.css +19 -0
- package/lib/pages/like-ranking/filter-buttons/index.js +40 -0
- package/lib/pages/like-ranking/filter-buttons/modular.js +110 -0
- package/lib/pages/like-ranking/filter-buttons/name.js +73 -0
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +27 -0
- package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +38 -0
- package/lib/pages/like-ranking/filter-buttons/timer.js +56 -0
- 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 +185 -0
- package/lib/pages/like-ranking/index.js +252 -0
- package/lib/pages/like-ranking/mock.js +366 -0
- package/lib/pages/like-ranking/request-api.js +15 -0
- package/lib/utils/auth.js +46 -5
- package/lib/utils/bs-global.js +26 -2
- package/lib/utils/format-time.js +161 -0
- package/lib/utils/helpers.js +41 -0
- package/lib/utils/roundWeight.js +105 -0
- package/lib/utils/tools.js +140 -20
- package/package.json +2 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CreateSuccessTips = exports.KrCheckTarget = exports.KrExample = exports.KrDesc = exports.OCheckTarget = exports.OExample = exports.ODesc = void 0;
|
|
7
|
+
var ODesc = ["O = 动词+你要做什么/渴望做什么+为了改变什么"];
|
|
8
|
+
exports.ODesc = ODesc;
|
|
9
|
+
var OExample = ["提高我们年度用户大会的出席率和参与度,为了提高客户的续费率"];
|
|
10
|
+
exports.OExample = OExample;
|
|
11
|
+
var OCheckTarget = ["含动词", "不建议包含数字"];
|
|
12
|
+
exports.OCheckTarget = OCheckTarget;
|
|
13
|
+
var KrDesc = ["KR1 = 动词+你要追踪的内容+从 X 到 Y/或者具体值", "KR2 = 动词+什么时间节点+达成什么关键成果"];
|
|
14
|
+
exports.KrDesc = KrDesc;
|
|
15
|
+
var KrExample = ["将客户续约率从70%提高到90%"];
|
|
16
|
+
exports.KrExample = KrExample;
|
|
17
|
+
var KrCheckTarget = ["至少含 1 个关键成果", "不建议超过 5 个关键成果", "关键成果定量可衡量"];
|
|
18
|
+
exports.KrCheckTarget = KrCheckTarget;
|
|
19
|
+
var CreateSuccessTips = {
|
|
20
|
+
0: "有时候目标会给你当头一棒,但不要灰心,关键成果会带领你拿棒子打回去。",
|
|
21
|
+
1: "没有计划的学习都只是浪费时间,没有目标的努力都只是自己骗自己而已。",
|
|
22
|
+
2: "目标应该激励你上天,关键成果要让你立足于大地。",
|
|
23
|
+
3: "OKRs-E——做正确的事,正确地做事,把事做正确。",
|
|
24
|
+
4: "OKR 像指南针,重在确定方向。",
|
|
25
|
+
5: "OKR 确保每一个人都朝向同一方向划船。"
|
|
26
|
+
};
|
|
27
|
+
exports.CreateSuccessTips = CreateSuccessTips;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _style = require("./style");
|
|
13
|
+
|
|
14
|
+
var _pop = _interopRequireDefault(require("../../components-v1/pop"));
|
|
15
|
+
|
|
16
|
+
var _button = _interopRequireDefault(require("../period-selector/components/button"));
|
|
17
|
+
|
|
18
|
+
var _periodSelector = _interopRequireDefault(require("../period-selector"));
|
|
19
|
+
|
|
20
|
+
var _rangePickerPop = _interopRequireDefault(require("../range-picker-pop"));
|
|
21
|
+
|
|
22
|
+
var _requestApi = require("./request-api");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
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."); }
|
|
39
|
+
|
|
40
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
41
|
+
|
|
42
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
43
|
+
|
|
44
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
function CreateCycle(_ref) {
|
|
49
|
+
var cycle = _ref.cycle,
|
|
50
|
+
container = _ref.container,
|
|
51
|
+
onChange = _ref.onChange;
|
|
52
|
+
var popRef = (0, _react.useRef)();
|
|
53
|
+
var btnRef = (0, _react.useRef)();
|
|
54
|
+
|
|
55
|
+
var _useState = (0, _react.useState)(cycle || {}),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
selfCycle = _useState2[0],
|
|
58
|
+
setSelfCycle = _useState2[1];
|
|
59
|
+
|
|
60
|
+
var _useState3 = (0, _react.useState)(),
|
|
61
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
62
|
+
cycleSetting = _useState4[0],
|
|
63
|
+
setCycleSetting = _useState4[1];
|
|
64
|
+
|
|
65
|
+
(0, _react.useEffect)(function () {
|
|
66
|
+
(0, _requestApi.getCycleSetting)().then(setCycleSetting);
|
|
67
|
+
}, []);
|
|
68
|
+
|
|
69
|
+
var onSelectClickHandler = function onSelectClickHandler() {
|
|
70
|
+
setSelfCycle(cycle);
|
|
71
|
+
popRef.current && popRef.current.show(btnRef.current);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var onPeriodSelectorChangeHandler = function onPeriodSelectorChangeHandler(c) {
|
|
75
|
+
setSelfCycle(_objectSpread(_objectSpread({}, selfCycle), c));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var onStartDateConfirmHandler = function onStartDateConfirmHandler(d) {
|
|
79
|
+
setSelfCycle(_objectSpread(_objectSpread({}, selfCycle), d));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var onEndDateCOnfirmHandler = function onEndDateCOnfirmHandler(d) {
|
|
83
|
+
setSelfCycle(_objectSpread(_objectSpread({}, selfCycle), d));
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var onSureClickHandler = function onSureClickHandler() {
|
|
87
|
+
onChange(selfCycle);
|
|
88
|
+
popRef.current && popRef.current.hide();
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var onCancelClickHandler = function onCancelClickHandler() {
|
|
92
|
+
popRef.current && popRef.current.hide();
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
if (!cycleSetting) return /*#__PURE__*/_react["default"].createElement(_style.SelectBtn, null, /*#__PURE__*/_react["default"].createElement("span", null, _periodSelector["default"].formatPeriod(cycle)), /*#__PURE__*/_react["default"].createElement("i", {
|
|
96
|
+
className: "tu-icon-sort-down"
|
|
97
|
+
}));
|
|
98
|
+
if (cycleSetting.isOpenCustom) return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_style.SelectBtn, {
|
|
99
|
+
ref: btnRef,
|
|
100
|
+
onClick: onSelectClickHandler
|
|
101
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
102
|
+
style: {
|
|
103
|
+
background: 'transparent'
|
|
104
|
+
}
|
|
105
|
+
}, _periodSelector["default"].formatPeriod(cycle)), /*#__PURE__*/_react["default"].createElement("i", {
|
|
106
|
+
className: "tu-icon-sort-down"
|
|
107
|
+
})), /*#__PURE__*/_react["default"].createElement(_pop["default"], {
|
|
108
|
+
ref: popRef,
|
|
109
|
+
container: container
|
|
110
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.CreateCycleWrapper, null, /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
111
|
+
selected: selfCycle,
|
|
112
|
+
showFullCycle: false,
|
|
113
|
+
onChange: onPeriodSelectorChangeHandler,
|
|
114
|
+
container: container,
|
|
115
|
+
yearsRange: [2018, 2030],
|
|
116
|
+
isFetch: false,
|
|
117
|
+
showYear: cycleSetting.isOpenYear,
|
|
118
|
+
showCustom: cycleSetting.isOpenCustom,
|
|
119
|
+
showMonth: cycleSetting.isOpenMonth,
|
|
120
|
+
showQuarter: cycleSetting.isOpenQuarter,
|
|
121
|
+
showBimonthly: cycleSetting.isOpenBimonthly,
|
|
122
|
+
showHalfYear: cycleSetting.isOpenHalfYear,
|
|
123
|
+
startMonth: cycleSetting.yearStartMonth,
|
|
124
|
+
style: {
|
|
125
|
+
width: '100%'
|
|
126
|
+
} // wrapperStyle={{ 'width': 200, }}
|
|
127
|
+
|
|
128
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.SelectBtn, null, /*#__PURE__*/_react["default"].createElement("span", null, _periodSelector["default"].formatPeriod(selfCycle)), /*#__PURE__*/_react["default"].createElement("i", {
|
|
129
|
+
className: "tu-icon-sort-down"
|
|
130
|
+
}))), /*#__PURE__*/_react["default"].createElement(_style.DateLine, {
|
|
131
|
+
style: {
|
|
132
|
+
borderBottom: '1px solid #F0F2F5'
|
|
133
|
+
}
|
|
134
|
+
}, "\u5F00\u59CB\u65E5\u671F\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
135
|
+
format: "YYYY/MM/DD",
|
|
136
|
+
controlled: true,
|
|
137
|
+
onConfirm: onStartDateConfirmHandler,
|
|
138
|
+
defaultRange: {
|
|
139
|
+
startDate: selfCycle.startDate,
|
|
140
|
+
endDate: selfCycle.endDate
|
|
141
|
+
},
|
|
142
|
+
container: container
|
|
143
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.TimeSapn, null, selfCycle.startDate, /*#__PURE__*/_react["default"].createElement("i", {
|
|
144
|
+
className: "tu-icon-arrow-down"
|
|
145
|
+
})))), /*#__PURE__*/_react["default"].createElement(_style.DateLine, null, "\u7ED3\u675F\u65E5\u671F\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
146
|
+
format: "YYYY/MM/DD",
|
|
147
|
+
controlled: true,
|
|
148
|
+
onConfirm: onEndDateCOnfirmHandler,
|
|
149
|
+
defaultRange: {
|
|
150
|
+
startDate: selfCycle.startDate,
|
|
151
|
+
endDate: selfCycle.endDate
|
|
152
|
+
},
|
|
153
|
+
container: container
|
|
154
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.TimeSapn, null, selfCycle.endDate, /*#__PURE__*/_react["default"].createElement("i", {
|
|
155
|
+
className: "tu-icon-arrow-down"
|
|
156
|
+
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
|
+
style: {
|
|
158
|
+
display: 'flex',
|
|
159
|
+
justifyContent: 'flex-end'
|
|
160
|
+
}
|
|
161
|
+
}, /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
162
|
+
size: "s",
|
|
163
|
+
style: {
|
|
164
|
+
marginRight: 12
|
|
165
|
+
},
|
|
166
|
+
onClick: onCancelClickHandler
|
|
167
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/_react["default"].createElement(_button["default"], {
|
|
168
|
+
size: "s",
|
|
169
|
+
type: "primary",
|
|
170
|
+
onClick: onSureClickHandler
|
|
171
|
+
}, "\u786E\u5B9A")))));
|
|
172
|
+
return /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
173
|
+
selected: cycle,
|
|
174
|
+
showFullCycle: false,
|
|
175
|
+
onChange: onChange,
|
|
176
|
+
container: container,
|
|
177
|
+
yearsRange: [2018, 2030],
|
|
178
|
+
isFetch: false,
|
|
179
|
+
showYear: cycleSetting.isOpenYear,
|
|
180
|
+
showCustom: cycleSetting.isOpenCustom,
|
|
181
|
+
showMonth: cycleSetting.isOpenMonth,
|
|
182
|
+
showQuarter: cycleSetting.isOpenQuarter,
|
|
183
|
+
showBimonthly: cycleSetting.isOpenBimonthly,
|
|
184
|
+
showHalfYear: cycleSetting.isOpenHalfYear,
|
|
185
|
+
startMonth: cycleSetting.yearStartMonth // wrapperStyle={{ 'width': 200, }}
|
|
186
|
+
|
|
187
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.SelectBtn, null, /*#__PURE__*/_react["default"].createElement("span", null, _periodSelector["default"].formatPeriod(cycle)), /*#__PURE__*/_react["default"].createElement("i", {
|
|
188
|
+
className: "tu-icon-sort-down"
|
|
189
|
+
})));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
var _default = CreateCycle;
|
|
193
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
require("./index.css");
|
|
13
|
+
|
|
14
|
+
var _constant = require("./constant");
|
|
15
|
+
|
|
16
|
+
var _shower = _interopRequireDefault(require("./img/shower.png"));
|
|
17
|
+
|
|
18
|
+
var _light = _interopRequireDefault(require("./img/light.svg"));
|
|
19
|
+
|
|
20
|
+
var _target = _interopRequireDefault(require("./img/target.svg"));
|
|
21
|
+
|
|
22
|
+
var _createSuccessLeftQuotation = _interopRequireDefault(require("./img/create-success-left-quotation.svg"));
|
|
23
|
+
|
|
24
|
+
var _createSuccessRightQuotation = _interopRequireDefault(require("./img/create-success-right-quotation.svg"));
|
|
25
|
+
|
|
26
|
+
var _createSuccessMessage = _interopRequireDefault(require("./img/create-success-message.svg"));
|
|
27
|
+
|
|
28
|
+
var _qrCode = _interopRequireDefault(require("./img/qr-code.png"));
|
|
29
|
+
|
|
30
|
+
var _createSuccessHead = _interopRequireDefault(require("./img/create-success-head.png"));
|
|
31
|
+
|
|
32
|
+
var _createSuccessShadow = _interopRequireDefault(require("./img/create-success-shadow.svg"));
|
|
33
|
+
|
|
34
|
+
var _html2canvas = _interopRequireDefault(require("html2canvas"));
|
|
35
|
+
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
+
|
|
38
|
+
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); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
+
|
|
44
|
+
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."); }
|
|
45
|
+
|
|
46
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
47
|
+
|
|
48
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
49
|
+
|
|
50
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
+
|
|
52
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
+
|
|
54
|
+
var CreateSuccessCmp = function CreateSuccessCmp(_ref) {
|
|
55
|
+
var createdSuccessInfo = _ref.createdSuccessInfo,
|
|
56
|
+
isDownload = _ref.isDownload,
|
|
57
|
+
onCloseModel = _ref.onCloseModel,
|
|
58
|
+
tipIndex = _ref.tipIndex,
|
|
59
|
+
downLoadRef = _ref.downLoadRef;
|
|
60
|
+
|
|
61
|
+
var _useState = (0, _react.useState)(false),
|
|
62
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
63
|
+
dontShowValue = _useState2[0],
|
|
64
|
+
setDontShowValue = _useState2[1];
|
|
65
|
+
|
|
66
|
+
var handleCloseModel = (0, _react.useCallback)(function () {
|
|
67
|
+
onCloseModel && onCloseModel(dontShowValue, createdSuccessInfo.workId);
|
|
68
|
+
}, [dontShowValue, onCloseModel]);
|
|
69
|
+
|
|
70
|
+
var handleInputChange = function handleInputChange(e) {
|
|
71
|
+
e.persist();
|
|
72
|
+
setDontShowValue(e.target.checked);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
var handleDownloadPic = (0, _react.useCallback)(function () {
|
|
76
|
+
var shareContent = downLoadRef.current,
|
|
77
|
+
//需要截图的包裹的(原生的)DOM 对象
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
width = shareContent.clientWidth,
|
|
80
|
+
//获取dom 宽度
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
height = shareContent.clientHeight,
|
|
83
|
+
//获取dom 高度
|
|
84
|
+
canvas = document.createElement("canvas"),
|
|
85
|
+
//创建一个canvas节点
|
|
86
|
+
scale = 2; //定义任意放大倍数 支持小数
|
|
87
|
+
|
|
88
|
+
canvas.width = width * scale; //定义canvas 宽度 * 缩放
|
|
89
|
+
|
|
90
|
+
canvas.height = height * scale; //定义canvas高度 *缩放
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
|
|
93
|
+
canvas.style.width = width + "px"; // @ts-ignore
|
|
94
|
+
|
|
95
|
+
canvas.style.height = height + "px"; // @ts-ignore
|
|
96
|
+
|
|
97
|
+
var opts = {
|
|
98
|
+
backgroundColor: null,
|
|
99
|
+
// 背景透明
|
|
100
|
+
scale: scale,
|
|
101
|
+
// 添加的scale 参数
|
|
102
|
+
canvas: canvas,
|
|
103
|
+
// 自定义 canvas
|
|
104
|
+
logging: false,
|
|
105
|
+
// 日志开关,便于查看html2canvas的内部执行流程
|
|
106
|
+
width: width,
|
|
107
|
+
// dom 原始宽度
|
|
108
|
+
height: height,
|
|
109
|
+
useCORS: true // 【重要】开启跨域配置
|
|
110
|
+
|
|
111
|
+
};
|
|
112
|
+
(0, _html2canvas["default"])(downLoadRef.current, opts).then(function (canvas) {
|
|
113
|
+
var imgUrl = canvas.toDataURL("image/png"); //得到图片的base64编码数据
|
|
114
|
+
|
|
115
|
+
var image = new Image();
|
|
116
|
+
image.setAttribute("crossOrigin", "anonymous");
|
|
117
|
+
|
|
118
|
+
image.onload = function () {
|
|
119
|
+
var a = document.createElement("a"); // 生成一个a元素
|
|
120
|
+
|
|
121
|
+
var event = new MouseEvent("click"); // 创建一个单击事件
|
|
122
|
+
|
|
123
|
+
a.download = "分享"; // 设置图片名称
|
|
124
|
+
|
|
125
|
+
a.href = imgUrl; // 将生成的URL设置为a.href属性
|
|
126
|
+
|
|
127
|
+
a.dispatchEvent(event); // 触发a的单击事件
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
image.src = imgUrl;
|
|
131
|
+
});
|
|
132
|
+
}, []);
|
|
133
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
134
|
+
className: "create-success-model"
|
|
135
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
136
|
+
className: "create-success-model__card",
|
|
137
|
+
ref: isDownload ? downLoadRef : null
|
|
138
|
+
}, isDownload ? null : /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
|
+
className: "tu-icon-cross2 create-success-model__close",
|
|
140
|
+
onClick: handleCloseModel
|
|
141
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
|
+
className: "create-success-model__top-block"
|
|
143
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
144
|
+
src: _light["default"],
|
|
145
|
+
className: "create-success-model__light ".concat(isDownload ? "create-success-model--animation-unset" : "")
|
|
146
|
+
}), isDownload ? null : /*#__PURE__*/_react["default"].createElement("img", {
|
|
147
|
+
src: _shower["default"],
|
|
148
|
+
className: "create-success-model__shower ".concat(isDownload ? "create-success-model--animation-unset" : "")
|
|
149
|
+
}), /*#__PURE__*/_react["default"].createElement("img", {
|
|
150
|
+
src: _createSuccessHead["default"],
|
|
151
|
+
className: "create-success-model__create-head"
|
|
152
|
+
}), isDownload ? null : /*#__PURE__*/_react["default"].createElement("img", {
|
|
153
|
+
src: _createSuccessMessage["default"],
|
|
154
|
+
className: "create-success-model__create-success-words"
|
|
155
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
156
|
+
className: "create-success-model__avatar"
|
|
157
|
+
}, createdSuccessInfo.principalUser.avatar.hasAvatar ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
158
|
+
className: "create-success-model__img",
|
|
159
|
+
src: "".concat(createdSuccessInfo.userAvatarBase64Url ? "data:image/png;base64," + createdSuccessInfo.userAvatarBase64Url : "")
|
|
160
|
+
}) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
|
+
className: "create-success-model__text-avatar",
|
|
162
|
+
style: {
|
|
163
|
+
background: createdSuccessInfo.principalUser.avatar.color
|
|
164
|
+
}
|
|
165
|
+
}, createdSuccessInfo.principalUser.name[0]))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
166
|
+
className: "create-success-model__bottom-block"
|
|
167
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
168
|
+
src: _createSuccessLeftQuotation["default"],
|
|
169
|
+
className: "create-success-model__left-quotation"
|
|
170
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
|
+
className: "create-success-model__tip"
|
|
172
|
+
}, _constant.CreateSuccessTips[tipIndex]), /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
|
+
className: "create-success-model__right-quotation"
|
|
174
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
175
|
+
src: _createSuccessRightQuotation["default"]
|
|
176
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
|
+
className: "create-success-model__congratulation"
|
|
178
|
+
}, "\u5DF2\u8D85\u8FC7\xA0Tita\xA0\xA0", /*#__PURE__*/_react["default"].createElement("span", {
|
|
179
|
+
className: "create-success-model__percent"
|
|
180
|
+
}, createdSuccessInfo.countSurpassPercentage, "%"), "\xA0\xA0\u7684\u4EBA\u521B\u5EFA\xA0OKR"), /*#__PURE__*/_react["default"].createElement("div", {
|
|
181
|
+
className: "create-success-model__okr-info ".concat(isDownload ? "" : "create-success-model--fix-height")
|
|
182
|
+
}, isDownload ? null : /*#__PURE__*/_react["default"].createElement("img", {
|
|
183
|
+
className: "create-success-model__shadow-img",
|
|
184
|
+
src: _createSuccessShadow["default"]
|
|
185
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
186
|
+
className: "create-success-model__o-name"
|
|
187
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
188
|
+
src: _target["default"],
|
|
189
|
+
className: "create-success-model__o-name-icon"
|
|
190
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
191
|
+
className: "create-success-model__o-name-text"
|
|
192
|
+
}, createdSuccessInfo.workName)), createdSuccessInfo.Krs.map(function (kr, index) {
|
|
193
|
+
// if(!isDownload && index > 2) {
|
|
194
|
+
// return null;
|
|
195
|
+
// }
|
|
196
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
197
|
+
className: "create-success-model__kr-wrapper"
|
|
198
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
199
|
+
className: "create-success-model__dot"
|
|
200
|
+
}), /*#__PURE__*/_react["default"].createElement("li", {
|
|
201
|
+
className: "create-success-model__kr ".concat(isDownload ? "create-success-model__kr--no-wrap" : "")
|
|
202
|
+
}, kr.mileStoneName));
|
|
203
|
+
})), isDownload ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
204
|
+
className: "create-success-model__qrcode ".concat(isDownload ? "create-success-model--hidden-box-shadow" : "")
|
|
205
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
206
|
+
src: _qrCode["default"],
|
|
207
|
+
width: "275"
|
|
208
|
+
})) : null), isDownload ? null : /*#__PURE__*/_react["default"].createElement("div", {
|
|
209
|
+
className: "create-success-model__func-btns-wrapper"
|
|
210
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
211
|
+
className: "create-success-model__primary-btns"
|
|
212
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
213
|
+
className: "create-success-model__common-btn-style create-success-model__return-list",
|
|
214
|
+
onClick: handleCloseModel
|
|
215
|
+
}, "\u67E5\u770B\u8BE6\u60C5"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
216
|
+
className: "create-success-model__common-btn-style create-success-model__download-img",
|
|
217
|
+
onClick: handleDownloadPic
|
|
218
|
+
}, "\u4E0B\u8F7D\u56FE\u7247")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
219
|
+
className: "create-success-model__checkbox-wrapper"
|
|
220
|
+
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
221
|
+
id: "dontShowCreateSucess",
|
|
222
|
+
checked: dontShowValue,
|
|
223
|
+
type: "checkbox",
|
|
224
|
+
onChange: handleInputChange,
|
|
225
|
+
className: "create-success-model__checkbox"
|
|
226
|
+
}), /*#__PURE__*/_react["default"].createElement("label", {
|
|
227
|
+
htmlFor: "dontShowCreateSucess",
|
|
228
|
+
className: "create-success-model__label"
|
|
229
|
+
}, "\u4E0B\u6B21\u4E0D\u518D\u63D0\u793A")))));
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
var _default = CreateSuccessCmp;
|
|
233
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
var CreateSuccessCmpWrapper = function CreateSuccessCmpWrapper(_ref) {
|
|
15
|
+
var children = _ref.children;
|
|
16
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_reactDom["default"].createPortal(children, document.body));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var _default = CreateSuccessCmpWrapper;
|
|
20
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _createCycle = _interopRequireDefault(require("../createCycle"));
|
|
13
|
+
|
|
14
|
+
var _style = require("../style");
|
|
15
|
+
|
|
16
|
+
var _periodSelector = _interopRequireDefault(require("../../period-selector"));
|
|
17
|
+
|
|
18
|
+
var _openData = require("../../../utils/open-data");
|
|
19
|
+
|
|
20
|
+
var _UserSelectorPop = _interopRequireDefault(require("../../../components-v1/userSelector/UserSelectorPop"));
|
|
21
|
+
|
|
22
|
+
var _requestApi = require("../request-api");
|
|
23
|
+
|
|
24
|
+
require("./index.css");
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
|
+
|
|
34
|
+
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."); }
|
|
35
|
+
|
|
36
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
37
|
+
|
|
38
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
39
|
+
|
|
40
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
41
|
+
|
|
42
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
|
+
|
|
44
|
+
var _default = function _default(_ref) {
|
|
45
|
+
var cycle = _ref.cycle,
|
|
46
|
+
setCycle = _ref.setCycle,
|
|
47
|
+
modalRef = _ref.modalRef,
|
|
48
|
+
setUser = _ref.setUser,
|
|
49
|
+
user = _ref.user,
|
|
50
|
+
isCreateModal = _ref.isCreateModal;
|
|
51
|
+
(0, _react.useEffect)(function () {
|
|
52
|
+
// 若果外部提供了配置,则不调用默认季度配置
|
|
53
|
+
if (cycle && cycle.yqmNum != undefined) return;
|
|
54
|
+
(0, _requestApi.getCycleSetting)().then(function (res) {
|
|
55
|
+
var cycleData = _periodSelector["default"].getDefalutCycle(res);
|
|
56
|
+
|
|
57
|
+
setCycle(cycleData);
|
|
58
|
+
});
|
|
59
|
+
}, []);
|
|
60
|
+
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
61
|
+
className: "create-modal__sub-block"
|
|
62
|
+
}, !isCreateModal ? /*#__PURE__*/_react["default"].createElement(_style.TitleLine, null, "\u5468\u671F") : /*#__PURE__*/_react["default"].createElement("div", {
|
|
63
|
+
className: "create-modal__sub-title"
|
|
64
|
+
}, "\u5468\u671F"), /*#__PURE__*/_react["default"].createElement(_createCycle["default"], {
|
|
65
|
+
onChange: setCycle,
|
|
66
|
+
container: modalRef.current && modalRef.current.getRef(),
|
|
67
|
+
cycle: cycle
|
|
68
|
+
})), !isCreateModal ? /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement(_style.Space, null), /*#__PURE__*/_react["default"].createElement(_style.ItemWrapper, null, /*#__PURE__*/_react["default"].createElement(_style.TitleLine, null, "\u8D1F\u8D23\u4EBA"), /*#__PURE__*/_react["default"].createElement(_UserSelectorPop["default"], {
|
|
69
|
+
onSubmit: function onSubmit(_ref2) {
|
|
70
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
|
71
|
+
u = _ref3[0];
|
|
72
|
+
|
|
73
|
+
var avatar = {
|
|
74
|
+
color: u.UserAvatar.Color,
|
|
75
|
+
small: u.UserAvatar.Small
|
|
76
|
+
};
|
|
77
|
+
setUser({
|
|
78
|
+
name: u.Name,
|
|
79
|
+
id: u.Id,
|
|
80
|
+
avatar: avatar,
|
|
81
|
+
departmentName: u.Department,
|
|
82
|
+
departmentId: u.DepartmentId
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
style: {
|
|
86
|
+
width: "100%"
|
|
87
|
+
},
|
|
88
|
+
container: modalRef.current && modalRef.current.getRef(),
|
|
89
|
+
multi: false
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement(_style.SelectBtn, null, /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
91
|
+
name: user.name,
|
|
92
|
+
id: user.id
|
|
93
|
+
})), /*#__PURE__*/_react["default"].createElement("i", {
|
|
94
|
+
className: "tu-icon-sort-down"
|
|
95
|
+
}))))) : null);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
exports["default"] = _default;
|