@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
|
@@ -1,196 +0,0 @@
|
|
|
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 _titaUi = require("tita-ui");
|
|
13
|
-
|
|
14
|
-
var _confirm = _interopRequireDefault(require("../../../components-v1/confirm"));
|
|
15
|
-
|
|
16
|
-
var _objectType = _interopRequireDefault(require("../objectType"));
|
|
17
|
-
|
|
18
|
-
var _requestApi = require("../request-api");
|
|
19
|
-
|
|
20
|
-
require("./index.css");
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
|
-
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; }
|
|
27
|
-
|
|
28
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
29
|
-
|
|
30
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
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(props) {
|
|
45
|
-
var _props$canEdit = props.canEdit,
|
|
46
|
-
canEdit = _props$canEdit === void 0 ? false : _props$canEdit,
|
|
47
|
-
workId = props.workId,
|
|
48
|
-
typeProp = props.typeProp,
|
|
49
|
-
departIdProp = props.departIdProp,
|
|
50
|
-
departNameProp = props.departNameProp,
|
|
51
|
-
groupIdProp = props.groupIdProp,
|
|
52
|
-
groupNameProp = props.groupNameProp;
|
|
53
|
-
|
|
54
|
-
var getType = function getType(okrType, departName, groupName) {
|
|
55
|
-
var typeId = 1,
|
|
56
|
-
typeName = "个人";
|
|
57
|
-
|
|
58
|
-
switch (okrType) {
|
|
59
|
-
case 1:
|
|
60
|
-
typeId = okrType;
|
|
61
|
-
typeName = "个人";
|
|
62
|
-
break;
|
|
63
|
-
|
|
64
|
-
case 2:
|
|
65
|
-
typeName = departName;
|
|
66
|
-
typeId = 2;
|
|
67
|
-
break;
|
|
68
|
-
|
|
69
|
-
case 3:
|
|
70
|
-
typeName = "公司";
|
|
71
|
-
typeId = 3;
|
|
72
|
-
break;
|
|
73
|
-
|
|
74
|
-
case 4:
|
|
75
|
-
typeName = groupName || "团队";
|
|
76
|
-
typeId = 4;
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return {
|
|
81
|
-
typeId: typeId,
|
|
82
|
-
typeName: typeName
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
var _useState = (0, _react.useState)(getType(typeProp, departNameProp, groupNameProp)),
|
|
87
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
88
|
-
type = _useState2[0],
|
|
89
|
-
setType = _useState2[1];
|
|
90
|
-
|
|
91
|
-
var _useState3 = (0, _react.useState)({
|
|
92
|
-
departId: departIdProp,
|
|
93
|
-
departName: departNameProp
|
|
94
|
-
}),
|
|
95
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
96
|
-
depart = _useState4[0],
|
|
97
|
-
setDepart = _useState4[1];
|
|
98
|
-
|
|
99
|
-
var _useState5 = (0, _react.useState)({
|
|
100
|
-
groupId: groupIdProp,
|
|
101
|
-
groupName: groupNameProp
|
|
102
|
-
}),
|
|
103
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
104
|
-
group = _useState6[0],
|
|
105
|
-
setGroup = _useState6[1];
|
|
106
|
-
|
|
107
|
-
var typeRef = (0, _react.useRef)();
|
|
108
|
-
var objTypeRef = (0, _react.useRef)();
|
|
109
|
-
|
|
110
|
-
var updateType = /*#__PURE__*/function () {
|
|
111
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
112
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
113
|
-
while (1) {
|
|
114
|
-
switch (_context.prev = _context.next) {
|
|
115
|
-
case 0:
|
|
116
|
-
_context.next = 2;
|
|
117
|
-
return (0, _requestApi.updateOCommitType)({
|
|
118
|
-
okrId: workId,
|
|
119
|
-
okrType: type.typeId,
|
|
120
|
-
departmentId: depart.departId,
|
|
121
|
-
groupId: group.groupId
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
case 2:
|
|
125
|
-
case "end":
|
|
126
|
-
return _context.stop();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}, _callee);
|
|
130
|
-
}));
|
|
131
|
-
|
|
132
|
-
return function updateType() {
|
|
133
|
-
return _ref.apply(this, arguments);
|
|
134
|
-
};
|
|
135
|
-
}();
|
|
136
|
-
|
|
137
|
-
(0, _react.useEffect)(function () {
|
|
138
|
-
if (type.typeId !== typeProp || depart.departId !== departIdProp || group.groupId !== groupIdProp) {
|
|
139
|
-
updateType();
|
|
140
|
-
}
|
|
141
|
-
}, [type, group, depart]);
|
|
142
|
-
|
|
143
|
-
function objTypeConfirm() {
|
|
144
|
-
// 把值拿出来 放到 project-time 上
|
|
145
|
-
if (!objTypeRef.current) return;
|
|
146
|
-
var data = objTypeRef.current.state;
|
|
147
|
-
var okrType = data.okrType,
|
|
148
|
-
departmentId = data.departmentId,
|
|
149
|
-
departmentName = data.departmentName,
|
|
150
|
-
groupName = data.groupName,
|
|
151
|
-
groupId = data.groupId;
|
|
152
|
-
var type = getType(okrType, departmentName, groupName);
|
|
153
|
-
setType(type);
|
|
154
|
-
setDepart({
|
|
155
|
-
departId: departmentId,
|
|
156
|
-
departName: departmentName
|
|
157
|
-
});
|
|
158
|
-
setGroup({
|
|
159
|
-
groupName: groupName,
|
|
160
|
-
groupId: groupId
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
var onCancelHanderl = function onCancelHanderl() {
|
|
165
|
-
typeRef.current && typeRef.current.hide();
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
var onOkHandler = function onOkHandler() {
|
|
169
|
-
objTypeConfirm();
|
|
170
|
-
typeRef.current && typeRef.current.hide();
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, canEdit && /*#__PURE__*/_react["default"].createElement(_confirm["default"], {
|
|
174
|
-
ref: typeRef,
|
|
175
|
-
innerContent: /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
|
-
className: "okr-type"
|
|
177
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, type.typeName), canEdit && /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
178
|
-
content: "\u7F16\u8F91"
|
|
179
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
180
|
-
className: "tu-icon-edit edit-icon tu-ml-10"
|
|
181
|
-
}))),
|
|
182
|
-
onCancel: onCancelHanderl,
|
|
183
|
-
onOk: onOkHandler,
|
|
184
|
-
blurToHide: true
|
|
185
|
-
}, /*#__PURE__*/_react["default"].createElement(_objectType["default"], {
|
|
186
|
-
ref: objTypeRef,
|
|
187
|
-
okrType: type.typeId,
|
|
188
|
-
okrTypeName: type.typeName,
|
|
189
|
-
departmentId: depart.departId,
|
|
190
|
-
departmentName: depart.departName,
|
|
191
|
-
groupId: group.groupId,
|
|
192
|
-
groupName: group.groupName
|
|
193
|
-
})), !canEdit && type.typeName);
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
exports["default"] = _default;
|
|
@@ -1,131 +0,0 @@
|
|
|
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 _bsGlobal = require("../../../utils/bs-global");
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
|
-
var _style = require("../style");
|
|
15
|
-
|
|
16
|
-
var _objectType = _interopRequireDefault(require("../objectType"));
|
|
17
|
-
|
|
18
|
-
var _confirm = _interopRequireDefault(require("../../../components-v1/confirm"));
|
|
19
|
-
|
|
20
|
-
var _openData = require("../../../utils/open-data");
|
|
21
|
-
|
|
22
|
-
require("./index.css");
|
|
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
|
-
var _default = function _default(_ref) {
|
|
31
|
-
var dept = _ref.dept,
|
|
32
|
-
setDept = _ref.setDept,
|
|
33
|
-
type = _ref.type,
|
|
34
|
-
setType = _ref.setType,
|
|
35
|
-
setTeam = _ref.setTeam,
|
|
36
|
-
team = _ref.team,
|
|
37
|
-
isCreateModal = _ref.isCreateModal;
|
|
38
|
-
var setting = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting;
|
|
39
|
-
var openClassify = setting.OkrClassify;
|
|
40
|
-
var typeRef = (0, _react.useRef)();
|
|
41
|
-
var objTypeRef = (0, _react.useRef)();
|
|
42
|
-
|
|
43
|
-
function objTypeConfirm() {
|
|
44
|
-
// 把值拿出来 放到 project-time 上
|
|
45
|
-
if (!objTypeRef.current) return;
|
|
46
|
-
var data = objTypeRef.current.state;
|
|
47
|
-
var okrType = data.okrType,
|
|
48
|
-
departmentId = data.departmentId,
|
|
49
|
-
departmentName = data.departmentName,
|
|
50
|
-
groupName = data.groupName,
|
|
51
|
-
groupId = data.groupId;
|
|
52
|
-
|
|
53
|
-
switch (okrType) {
|
|
54
|
-
case 1:
|
|
55
|
-
setType({
|
|
56
|
-
typeId: okrType,
|
|
57
|
-
typeName: "个人"
|
|
58
|
-
});
|
|
59
|
-
break;
|
|
60
|
-
|
|
61
|
-
case 2:
|
|
62
|
-
setType({
|
|
63
|
-
typeName: departmentName,
|
|
64
|
-
typeId: 2
|
|
65
|
-
});
|
|
66
|
-
break;
|
|
67
|
-
|
|
68
|
-
case 3:
|
|
69
|
-
setType({
|
|
70
|
-
typeName: "公司",
|
|
71
|
-
typeId: 3
|
|
72
|
-
});
|
|
73
|
-
break;
|
|
74
|
-
|
|
75
|
-
case 4:
|
|
76
|
-
setType({
|
|
77
|
-
typeName: groupName || "团队",
|
|
78
|
-
typeId: 4
|
|
79
|
-
});
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
setDept({
|
|
84
|
-
departmentId: departmentId,
|
|
85
|
-
departmentName: departmentName
|
|
86
|
-
});
|
|
87
|
-
setTeam({
|
|
88
|
-
groupName: groupName,
|
|
89
|
-
groupId: groupId
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
var onCancelHanderl = function onCancelHanderl() {
|
|
94
|
-
typeRef.current && typeRef.current.hide();
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
var onOkHandler = function onOkHandler() {
|
|
98
|
-
objTypeConfirm();
|
|
99
|
-
typeRef.current && typeRef.current.hide();
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
-
className: "create-modal__sub-block",
|
|
104
|
-
style: {
|
|
105
|
-
flex: openClassify ? 1 : 2
|
|
106
|
-
}
|
|
107
|
-
}, isCreateModal ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
|
-
className: "create-modal__sub-title"
|
|
109
|
-
}, "\u7C7B\u578B") : /*#__PURE__*/_react["default"].createElement(_style.TitleLine, null, "\u7C7B\u578B"), /*#__PURE__*/_react["default"].createElement(_confirm["default"], {
|
|
110
|
-
ref: typeRef,
|
|
111
|
-
innerContent: /*#__PURE__*/_react["default"].createElement(_style.SelectBtn, null, /*#__PURE__*/_react["default"].createElement("span", null, type.typeId == 2 ? /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
|
|
112
|
-
id: dept.departmentId,
|
|
113
|
-
name: dept.departmentName
|
|
114
|
-
}) : type.typeName), /*#__PURE__*/_react["default"].createElement("i", {
|
|
115
|
-
className: "tu-icon-sort-down"
|
|
116
|
-
})),
|
|
117
|
-
onCancel: onCancelHanderl,
|
|
118
|
-
onOk: onOkHandler,
|
|
119
|
-
blurToHide: true
|
|
120
|
-
}, /*#__PURE__*/_react["default"].createElement(_objectType["default"], {
|
|
121
|
-
ref: objTypeRef,
|
|
122
|
-
okrType: type.typeId,
|
|
123
|
-
okrTypeName: type.typeName,
|
|
124
|
-
departmentId: dept.departmentId,
|
|
125
|
-
departmentName: dept.departmentName,
|
|
126
|
-
groupId: team.groupId,
|
|
127
|
-
groupName: team.groupName
|
|
128
|
-
})));
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
exports["default"] = _default;
|
|
@@ -1,224 +0,0 @@
|
|
|
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 _titaUi = require("tita-ui");
|
|
13
|
-
|
|
14
|
-
var _userSelector = require("../../user-selector");
|
|
15
|
-
|
|
16
|
-
var _openData = require("../../../utils/open-data");
|
|
17
|
-
|
|
18
|
-
var _requestApi = require("../request-api");
|
|
19
|
-
|
|
20
|
-
require("./index.css");
|
|
21
|
-
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
27
|
-
|
|
28
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
-
|
|
30
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
31
|
-
|
|
32
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
33
|
-
|
|
34
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
35
|
-
|
|
36
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
37
|
-
|
|
38
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
39
|
-
|
|
40
|
-
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."); }
|
|
41
|
-
|
|
42
|
-
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); }
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
|
-
|
|
50
|
-
var visibilityList = [{
|
|
51
|
-
value: 1,
|
|
52
|
-
lable: "全公司"
|
|
53
|
-
}, {
|
|
54
|
-
value: 2,
|
|
55
|
-
lable: "仅相关成员"
|
|
56
|
-
}, {
|
|
57
|
-
value: 3,
|
|
58
|
-
lable: "仅直接下属"
|
|
59
|
-
}, {
|
|
60
|
-
value: 4,
|
|
61
|
-
lable: "指定范围"
|
|
62
|
-
}];
|
|
63
|
-
|
|
64
|
-
var _default = function _default(_ref) {
|
|
65
|
-
var _ref$canEdit = _ref.canEdit,
|
|
66
|
-
canEdit = _ref$canEdit === void 0 ? false : _ref$canEdit,
|
|
67
|
-
workId = _ref.workId,
|
|
68
|
-
_ref$visibilityProp = _ref.visibilityProp,
|
|
69
|
-
visibilityProp = _ref$visibilityProp === void 0 ? 1 : _ref$visibilityProp,
|
|
70
|
-
_ref$visiableScopePro = _ref.visiableScopeProp,
|
|
71
|
-
visiableScopeProp = _ref$visiableScopePro === void 0 ? {} : _ref$visiableScopePro,
|
|
72
|
-
onSave = _ref.onSave;
|
|
73
|
-
var selectorRef = (0, _react.useRef)();
|
|
74
|
-
|
|
75
|
-
var _useState = (0, _react.useState)(visiableScopeProp),
|
|
76
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
77
|
-
visibilityArea = _useState2[0],
|
|
78
|
-
setVisibilityArea = _useState2[1];
|
|
79
|
-
|
|
80
|
-
var _useState3 = (0, _react.useState)(visibilityProp),
|
|
81
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
82
|
-
visibility = _useState4[0],
|
|
83
|
-
setVisibility = _useState4[1];
|
|
84
|
-
|
|
85
|
-
var updateVisibility = /*#__PURE__*/function () {
|
|
86
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
87
|
-
var _visibilityArea$users, users, _visibilityArea$depar, departments, _visibilityArea$group, groups, areaUserIds, areaOrgIds, areaGroupIds;
|
|
88
|
-
|
|
89
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
90
|
-
while (1) {
|
|
91
|
-
switch (_context.prev = _context.next) {
|
|
92
|
-
case 0:
|
|
93
|
-
_visibilityArea$users = visibilityArea.users, users = _visibilityArea$users === void 0 ? [] : _visibilityArea$users, _visibilityArea$depar = visibilityArea.departments, departments = _visibilityArea$depar === void 0 ? [] : _visibilityArea$depar, _visibilityArea$group = visibilityArea.groups, groups = _visibilityArea$group === void 0 ? [] : _visibilityArea$group;
|
|
94
|
-
areaUserIds = (users || []).reduce(function (res, cur) {
|
|
95
|
-
return [].concat(_toConsumableArray(res), [cur.userId]);
|
|
96
|
-
}, []);
|
|
97
|
-
areaOrgIds = (departments || []).reduce(function (res, cur) {
|
|
98
|
-
return [].concat(_toConsumableArray(res), [cur.id]);
|
|
99
|
-
}, []);
|
|
100
|
-
areaGroupIds = (groups || []).reduce(function (res, cur) {
|
|
101
|
-
return [].concat(_toConsumableArray(res), [cur.id]);
|
|
102
|
-
}, []);
|
|
103
|
-
_context.next = 6;
|
|
104
|
-
return (0, _requestApi.updateOkrVisibility)({
|
|
105
|
-
workId: workId,
|
|
106
|
-
visibility: visibility,
|
|
107
|
-
areaUserIds: areaUserIds,
|
|
108
|
-
areaOrgIds: areaOrgIds,
|
|
109
|
-
areaGroupIds: areaGroupIds
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
case 6:
|
|
113
|
-
onSave && onSave();
|
|
114
|
-
|
|
115
|
-
case 7:
|
|
116
|
-
case "end":
|
|
117
|
-
return _context.stop();
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}, _callee);
|
|
121
|
-
}));
|
|
122
|
-
|
|
123
|
-
return function updateVisibility() {
|
|
124
|
-
return _ref2.apply(this, arguments);
|
|
125
|
-
};
|
|
126
|
-
}();
|
|
127
|
-
|
|
128
|
-
(0, _react.useEffect)(function () {
|
|
129
|
-
if (!visibility) return;
|
|
130
|
-
updateVisibility();
|
|
131
|
-
}, [visibility, visibilityArea]);
|
|
132
|
-
|
|
133
|
-
var onOptionChange = function onOptionChange(v) {
|
|
134
|
-
if (v === 4) {
|
|
135
|
-
selectorRef.current && selectorRef.current.open();
|
|
136
|
-
} else {
|
|
137
|
-
setVisibility(v);
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
var onOk = function onOk(selectNodes) {
|
|
142
|
-
setVisibility(4);
|
|
143
|
-
setVisibilityArea(selectNodes);
|
|
144
|
-
selectorRef.current && selectorRef.current.close();
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
var renderLabel = function renderLabel() {
|
|
148
|
-
if (visibility === 4) {
|
|
149
|
-
var _visibilityArea$group2 = visibilityArea.groups,
|
|
150
|
-
groups = _visibilityArea$group2 === void 0 ? [] : _visibilityArea$group2,
|
|
151
|
-
_visibilityArea$depar2 = visibilityArea.departments,
|
|
152
|
-
departments = _visibilityArea$depar2 === void 0 ? [] : _visibilityArea$depar2,
|
|
153
|
-
_visibilityArea$users2 = visibilityArea.users,
|
|
154
|
-
users = _visibilityArea$users2 === void 0 ? [] : _visibilityArea$users2;
|
|
155
|
-
var text = [],
|
|
156
|
-
jsxDom = [];
|
|
157
|
-
(departments || []).forEach(function (item) {
|
|
158
|
-
jsxDom.push( /*#__PURE__*/_react["default"].createElement(_openData.OpenDepartmentName, {
|
|
159
|
-
id: item.id,
|
|
160
|
-
name: item.name
|
|
161
|
-
}));
|
|
162
|
-
jsxDom.push( /*#__PURE__*/_react["default"].createElement("span", null, "\u3001"));
|
|
163
|
-
text.push(item.name);
|
|
164
|
-
});
|
|
165
|
-
(users || []).forEach(function (item) {
|
|
166
|
-
jsxDom.push( /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
167
|
-
id: item.userId,
|
|
168
|
-
name: item.name
|
|
169
|
-
}));
|
|
170
|
-
jsxDom.push( /*#__PURE__*/_react["default"].createElement("span", null, "\u3001"));
|
|
171
|
-
text.push(item.name);
|
|
172
|
-
});
|
|
173
|
-
(groups || []).forEach(function (item) {
|
|
174
|
-
jsxDom.push( /*#__PURE__*/_react["default"].createElement("span", null, item.name, "\u3001"));
|
|
175
|
-
text.push(item.name);
|
|
176
|
-
});
|
|
177
|
-
if (!text.length) return "仅相关成员可见";
|
|
178
|
-
return (0, _openData.isWechat)() ? jsxDom : text.join("、");
|
|
179
|
-
} // @ts-ignore
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
return visibilityList.find(function (i) {
|
|
183
|
-
return i.value === visibility;
|
|
184
|
-
}).lable;
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
var renderSelect = function renderSelect() {
|
|
188
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
189
|
-
className: "visibility"
|
|
190
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, renderLabel()), canEdit && /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
|
|
191
|
-
content: "\u7F16\u8F91"
|
|
192
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
193
|
-
className: "tu-icon-edit visibility-edit-icon tu-ml-10"
|
|
194
|
-
})));
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, canEdit && /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement(_userSelector.FieldPersonSelector, {
|
|
198
|
-
ref: selectorRef // @ts-ignore
|
|
199
|
-
,
|
|
200
|
-
multiple: true,
|
|
201
|
-
onOk: onOk,
|
|
202
|
-
position: "center",
|
|
203
|
-
selectNodes: visibilityArea,
|
|
204
|
-
trigger: /*#__PURE__*/_react["default"].createElement("div", {
|
|
205
|
-
style: {
|
|
206
|
-
visibility: "hidden",
|
|
207
|
-
position: "absolute",
|
|
208
|
-
zIndex: -1,
|
|
209
|
-
height: 36
|
|
210
|
-
}
|
|
211
|
-
}, "empty select")
|
|
212
|
-
}), /*#__PURE__*/_react["default"].createElement(_titaUi.Select, {
|
|
213
|
-
value: visibility,
|
|
214
|
-
onChange: onOptionChange,
|
|
215
|
-
options: visibilityList // @ts-ignore
|
|
216
|
-
,
|
|
217
|
-
onClick: function onClick(e) {
|
|
218
|
-
return e.stopPropagation();
|
|
219
|
-
},
|
|
220
|
-
renderSelect: renderSelect
|
|
221
|
-
})), !canEdit && renderSelect());
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
exports["default"] = _default;
|