@titaui/pc 1.11.4-1 → 1.11.4-2
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/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/dynamic/constant.js +31 -30
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +21 -6
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +4 -4
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +19 -7
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/{es/pages/group-management/page-view/loading → lib/components/dynamic/dynamic-item/dynamic-interview-share}/index.js +33 -11
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/index.js +41 -32
- package/lib/components/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/menus/export-modules/interview-menus/constant.js +12 -12
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/select/Option.js +3 -3
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +27 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/{es/components/okr-detail/components/okr-tree → lib/components/task-tree}/precls.js +1 -1
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/{es/components/okr-detail/components/okr-tree/tree-node/default-node.js → lib/components/task-tree/task-item-node/e-empty.js} +13 -6
- package/{es/components/okr-detail/components/okr-tree/tree-node/e-node → lib/components/task-tree/task-item-node}/e-project.js +29 -34
- package/{es/components/e-status-dropdown/index.js → lib/components/task-tree/task-item-node/e-status-dropdown.js} +3 -3
- package/{es/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js → lib/components/task-tree/task-item-node/e-task.js} +140 -121
- package/{es/components/okr-detail/components/okr-tree/tree-node → lib/components/task-tree/task-item-node}/get-process-color.js +3 -3
- package/lib/components/task-tree/task-item-node/index.css +290 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +8 -0
- package/{es/components/okr-detail/components/okr-tree/index.js → lib/components/task-tree/task-tree.js} +17 -16
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/index.js +8 -0
- package/package.json +1 -1
- package/yarn-error.log +6356 -5424
- package/es/components/cascader/time.js +0 -31
- package/es/components/common-share/request-apis.js +0 -56
- package/es/components/confidence/heart.js +0 -66
- package/es/components/create-okr-modal/fields/index.js +0 -17
- package/es/components/create-okr-modal/utils/getCreateOkrSurpassPercent.js +0 -154
- package/es/components/date-picker/BodyItem.js +0 -121
- package/es/components/date-picker/CalendarBody.js +0 -157
- package/es/components/date-picker/CalendarHeader.js +0 -187
- package/es/components/date-picker/index.js +0 -157
- package/es/components/date-range-picker/index.js +0 -210
- package/es/components/dialog/index.js +0 -119
- package/es/components/dialog-confirm/index.js +0 -154
- package/es/components/drop-selector/icon-item.js +0 -40
- package/es/components/drop-selector/index.js +0 -179
- package/es/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/es/components/dynamic/dynamic-liking/mock.js +0 -83
- package/es/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/es/components/e-priority/index.js +0 -88
- package/es/components/grid-layout/commen-components/index.js +0 -73
- package/es/components/grid-layout/image/could.js +0 -8
- package/es/components/grid-layout/image/lv.js +0 -8
- package/es/components/grid-layout/image/tita-mask.js +0 -8
- package/es/components/help-card/request-api.js +0 -35
- package/es/components/icon-button-list/index.js +0 -65
- package/es/components/menus/context.js +0 -18
- package/es/components/menus/precls.js +0 -8
- package/es/components/okr-detail/auth.js +0 -197
- package/es/components/okr-detail/components/ao-nice/index.js +0 -245
- package/es/components/okr-detail/components/block-line/index.js +0 -20
- package/es/components/okr-detail/components/header/index.js +0 -211
- package/es/components/okr-detail/components/icon-text/index.js +0 -116
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +0 -88
- package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-status-dropdown.js +0 -98
- package/es/components/okr-detail/components/okr-tree/tree-node/index.js +0 -90
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/get-process-color.js +0 -46
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +0 -421
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/index.js +0 -54
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +0 -62
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +0 -94
- package/es/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +0 -273
- package/es/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +0 -207
- package/es/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +0 -236
- package/es/components/okr-detail/components/padding-layout.js +0 -22
- package/es/components/okr-detail/components/tab-panel-content/index.js +0 -27
- package/es/components/okr-detail/context.js +0 -30
- package/es/components/okr-detail/e-list/index.js +0 -243
- package/es/components/okr-detail/e-list/precls.js +0 -8
- package/es/components/okr-detail/e-list/search-form/fields/e-order.js +0 -172
- package/es/components/okr-detail/e-list/search-form/fields/e-status.js +0 -99
- package/es/components/okr-detail/e-list/search-form/fields/e-user.js +0 -49
- package/es/components/okr-detail/e-list/search-form/index.js +0 -143
- package/es/components/okr-detail/error-page/index.js +0 -33
- package/es/components/okr-detail/index.js +0 -428
- package/es/components/okr-detail/loading/index.js +0 -28
- package/es/components/okr-detail/okr-list/add-parent-okr.js +0 -37
- package/es/components/okr-detail/okr-list/create-kr-item/heart.js +0 -38
- package/es/components/okr-detail/okr-list/drag-order-kr.js +0 -62
- package/es/components/okr-detail/okr-list/empty/index.js +0 -48
- package/es/components/okr-detail/okr-list/index.js +0 -524
- package/es/components/okr-detail/okr-list/warp-parent-okr.js +0 -21
- package/es/components/okr-detail/store.js +0 -1
- package/es/components/okr-flow/child-node/fields/creator.js +0 -175
- package/es/components/okr-flow/child-node/fields/okrClassify.js +0 -31
- package/es/components/okr-flow/child-node/fields/okrType.js +0 -21
- package/es/components/okr-flow/child-node/helper.js +0 -35
- package/es/components/okr-flow/child-node/index.js +0 -110
- package/es/components/okr-flow/child-node/kr-node.js +0 -75
- package/es/components/okr-flow/child-node/work-node.js +0 -242
- package/es/components/okr-flow/context.js +0 -14
- package/es/components/okr-flow/empty/index.js +0 -29
- package/es/components/okr-flow/export-modules/okr-search-panel/index.js +0 -394
- package/es/components/okr-flow/index.js +0 -24
- package/es/components/okr-flow/mini-map/index.js +0 -112
- package/es/components/okr-flow/mini-map/map.js +0 -145
- package/es/components/okr-flow/mini-map/mini-node.js +0 -57
- package/es/components/okr-flow/mini-map/utils.js +0 -79
- package/es/components/okr-flow/okr-map/index.js +0 -192
- package/es/components/okr-flow/open-data/index.js +0 -115
- package/es/components/okr-flow/precls.js +0 -8
- package/es/components/okr-flow/request-apis.js +0 -118
- package/es/components/okr-flow/root-node/index.js +0 -229
- package/es/components/okr-flow/utils/config.js +0 -18
- package/es/components/okr-flow/utils/helper.js +0 -36
- package/es/components/okr-flow/utils/index.js +0 -66
- package/es/components/okr-flow/utils/tree-handler.js +0 -323
- package/es/components/okr-progress-modal/helper.js +0 -156
- package/es/components/okr-progress-modal/request-apis.js +0 -34
- package/es/components/okr-share/request-apis.js +0 -56
- package/es/components/okrcase-library/server/network.js +0 -407
- package/es/components/pagination/locale/en_US.js +0 -22
- package/es/components/pagination/locale/zh_CN.js +0 -22
- package/es/components/point-demo/drop-down-box/index.js +0 -159
- package/es/components/point-demo/index.js +0 -533
- package/es/components/point-demo/input/index.js +0 -176
- package/es/components/point-demo/point-demo.js +0 -75
- package/es/components/point-demo/popup/index.js +0 -113
- package/es/components/point-demo/popup/placement.js +0 -44
- package/es/components/range-picker-pop/index.js +0 -273
- package/es/components/scrollbar/simplebar/helpers.js +0 -59
- package/es/components/scrollbar/simplebar/index.js +0 -91
- package/es/components/scrollbar/simplebar/scrollbar-width.js +0 -47
- package/es/components/scrollbar/simplebar/simplebar.js +0 -852
- package/es/components/scrollbar/simplebar-react.js +0 -163
- package/es/components/search-dropdown/index.js +0 -40
- package/es/components/search-input/index.js +0 -126
- package/es/components/select/Option.js +0 -94
- package/es/components/select/index.js +0 -330
- package/es/components/selector-input/debounce.js +0 -36
- package/es/components/selector-input/index.js +0 -109
- package/es/components/slider-input/index.js +0 -119
- package/es/components/switch/index.js +0 -39
- package/es/components/table/index.js +0 -275
- package/es/components/tabs/index.js +0 -63
- package/es/components/task-relation-modal/tree-node/index.js +0 -58
- package/es/components/tita-chart/charts/img/could.js +0 -8
- package/es/components/tooltip/error-tip.js +0 -24
- package/es/components/tooltip/index.js +0 -21
- package/es/components/tree/index.js +0 -79
- package/es/components/tree/precls.js +0 -8
- package/es/components/upvote/request-apis.js +0 -45
- package/es/components/user-selector/action-btns/btn-cancel.js +0 -21
- package/es/components/user-selector/action-btns/btn-ok.js +0 -21
- package/es/components/user-selector/action-btns/index.js +0 -27
- package/es/components/user-selector/context.js +0 -18
- package/es/components/user-selector/empty/group.js +0 -55
- package/es/components/user-selector/empty/index.js +0 -28
- package/es/components/user-selector/export-modules/depart-search-selector/result-part.js +0 -41
- package/es/components/user-selector/export-modules/group-selector/index.js +0 -170
- package/es/components/user-selector/export-modules/group-selector/searched-panel.js +0 -68
- package/es/components/user-selector/export-modules/multiple-user-selector--bak/index.js +0 -246
- package/es/components/user-selector/index.js +0 -25
- package/es/components/user-selector/layout/index.js +0 -25
- package/es/components/user-selector/loading/index.js +0 -18
- package/es/components/user-selector/request-apis.js +0 -180
- package/es/components/user-selector/searched-panel/index.js +0 -139
- package/es/components/user-selector/searched-panel/result-part.js +0 -43
- package/es/components/user-selector/select-tree/selected-tree/index.js +0 -91
- package/es/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +0 -48
- package/es/components/user-selector/select-tree/tree-nodes/tree-duties-node/index.js +0 -27
- package/es/components/user-selector/select-tree/tree-nodes/tree-group-node/index.js +0 -57
- package/es/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +0 -93
- package/es/components/user-selector/utils.js +0 -139
- package/es/components/viewer/ImageListRender.js +0 -143
- package/es/components/viewer/index.js +0 -168
- package/es/components/word-cloud/index.js +0 -109
- package/es/components/word-cloud/request-apis.js +0 -26
- package/es/components-v1/animate/AnimateChild.js +0 -76
- package/es/components-v1/animate/animate.js +0 -148
- package/es/components-v1/animate/index.js +0 -13
- package/es/components-v1/dom/index.js +0 -30
- package/es/components-v1/placement/index.js +0 -13
- package/es/components-v1/placement/placement.js +0 -111
- package/es/components-v1/placement/placementInner.js +0 -139
- package/es/components-v1/pop/Pop.js +0 -246
- package/es/components-v1/pop/PopInner.js +0 -163
- package/es/components-v1/pop/index.js +0 -13
- package/es/components-v1/progress/CircleProgress.js +0 -152
- package/es/components-v1/progress/LineProgress.js +0 -83
- package/es/components-v1/progress/index.js +0 -80
- package/es/components-v1/select/Option.js +0 -94
- package/es/components-v1/select/index.js +0 -330
- package/es/components-v1/utils/animate/animate.js +0 -103
- package/es/components-v1/utils/animate/event.js +0 -79
- package/es/components-v1/utils/dom/index.js +0 -30
- package/es/components-v1/utils/placement/autoAdjustPlacement.js +0 -93
- package/es/components-v1/utils/placement/getContainerVisibleArea.js +0 -22
- package/es/components-v1/utils/placement/getExpectPlacement.js +0 -49
- package/es/components-v1/utils/placement/getPlacementInContainer.js +0 -26
- package/es/components-v1/utils/placement/placement.js +0 -76
- package/es/index.js +0 -777
- package/es/pages/appointment-demo/drop-down-box/index.js +0 -159
- package/es/pages/appointment-demo/index.js +0 -649
- package/es/pages/appointment-demo/input/index.js +0 -176
- package/es/pages/appointment-demo/popup/index.js +0 -113
- package/es/pages/appointment-demo/popup/placement.js +0 -44
- package/es/pages/group-management/components/checkbox/index.js +0 -28
- package/es/pages/group-management/components/input-form/index.js +0 -174
- package/es/pages/group-management/components/radio/index.js +0 -21
- package/es/pages/group-management/components/table/index.js +0 -174
- package/es/pages/group-management/groupInterface.js +0 -293
- package/es/pages/group-management/index.js +0 -13
- package/es/pages/group-management/page-view/empty.js +0 -111
- package/es/pages/group-management/page-view/group-empty.js +0 -66
- package/es/pages/group-management/page-view/importGroupStaff/index.js +0 -208
- package/es/pages/group-management/page-view/index.js +0 -412
- package/es/pages/group-management/table/index.js +0 -104
- package/es/pages/group-management/tree/add-group-dialog/index.js +0 -153
- package/es/pages/group-management/tree/delete-group-dialog/index.js +0 -82
- package/es/pages/group-management/tree/edit-group-dialog/index.js +0 -155
- package/es/pages/group-management/tree/group-form/index.js +0 -207
- package/es/pages/group-management/tree/index.js +0 -168
- package/es/pages/group-management/tree/operation-panel.js +0 -41
- package/es/pages/group-management/tree/trigger-render.js +0 -99
- package/es/pages/like-ranking/mock.js +0 -366
- package/es/pages/okr-map/export-modules/index.js +0 -1
- package/es/pages/okr-map/export-modules/okr-map/header/index.js +0 -182
- package/es/pages/okr-map/export-modules/okr-map/header/show-kr-confirm.js +0 -47
- package/es/pages/okr-map/export-modules/okr-map/okr-map.js +0 -497
- package/es/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -69
- package/es/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +0 -168
- package/es/pages/okr-map/hooks/useStorage.js +0 -96
- package/es/pages/okr-map/index.js +0 -18
- package/es/pages/okr-map/level2-search/depart.js +0 -53
- package/es/pages/okr-map/level2-search/group.js +0 -69
- package/es/pages/okr-map/level2-search/index.js +0 -51
- package/es/pages/okr-map/level2-search/level2-input.js +0 -46
- package/es/pages/okr-map/level2-search/user.js +0 -54
- package/es/pages/okr-map/no-okr/index.js +0 -24
- package/es/pages/okr-map/number-select/index.js +0 -81
- package/es/pages/okr-map/open-data/index.js +0 -115
- package/es/pages/okr-map/precls.js +0 -8
- package/es/pages/okr-map/request-apis.js +0 -76
- package/es/pages/okr-map/share-dialog/index.js +0 -122
- package/es/pages/okr-map/unsupport-ie/index.js +0 -83
- package/es/pages/okr-map/utils.js +0 -51
- package/es/utils/auth.js +0 -294
- package/es/utils/bs-global.js +0 -114
- package/es/utils/local-storage.js +0 -42
- package/es/utils/mblog.js +0 -33
- package/es/utils/mock-bsglobal.js +0 -1837
- package/es/utils/open-data.js +0 -341
- package/es/utils/request-v1.js +0 -115
- package/es/utils/request.js +0 -183
- package/es/utils/tools.js +0 -286
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.uniqueArray = exports.transToMapData = exports.toTree = exports.formatNodes = exports.findNode = exports.diffAndUpdate = exports.deleteKrById = exports.deleteChildrenById = exports.checkChildrenLevel = exports.buildTreeNodes = void 0;
|
|
7
|
-
|
|
8
|
-
var _cloneDeep = _interopRequireDefault(require("clone-deep"));
|
|
9
|
-
|
|
10
|
-
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
|
-
|
|
16
|
-
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."); }
|
|
17
|
-
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
21
|
-
|
|
22
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
var insertSort = function insertSort(arr, item) {
|
|
27
|
-
if (!arr.length) return arr.splice(0, 0, item);
|
|
28
|
-
var modelType = item.modelType;
|
|
29
|
-
var index = arr.length;
|
|
30
|
-
|
|
31
|
-
if (modelType == "kr") {
|
|
32
|
-
index = arr.findIndex(function (item) {
|
|
33
|
-
return item.modelType == "work";
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (index == -1) index = arr.length;
|
|
38
|
-
arr.splice(index, 0, item);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var toTree = function toTree(data, showkr) {
|
|
42
|
-
var cloneData = (0, _cloneDeep["default"])(data);
|
|
43
|
-
var map = {};
|
|
44
|
-
var res = [];
|
|
45
|
-
cloneData.forEach(function (item) {
|
|
46
|
-
return map[item.id] = item;
|
|
47
|
-
});
|
|
48
|
-
cloneData.forEach(function (item) {
|
|
49
|
-
var modelType = item.modelType,
|
|
50
|
-
data = item.data;
|
|
51
|
-
var parent;
|
|
52
|
-
|
|
53
|
-
if (modelType == "work") {
|
|
54
|
-
parent = showkr ? map[data.parentKrId || data.parentId] : map[data.parentId];
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (modelType == "kr") {
|
|
58
|
-
parent = map[data.workId];
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (parent) {
|
|
62
|
-
if (!parent.children) parent.children = [];
|
|
63
|
-
insertSort(parent.children, item);
|
|
64
|
-
} else {
|
|
65
|
-
insertSort(res, item);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
return res;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
exports.toTree = toTree;
|
|
72
|
-
|
|
73
|
-
var checkChildrenLevel = function checkChildrenLevel(item, goalLevel, curLevel) {
|
|
74
|
-
var _item$children = item.children,
|
|
75
|
-
children = _item$children === void 0 ? [] : _item$children;
|
|
76
|
-
if (!children.length) return;
|
|
77
|
-
|
|
78
|
-
if (goalLevel == curLevel) {
|
|
79
|
-
item.children = [];
|
|
80
|
-
} else {
|
|
81
|
-
children.forEach(function (child) {
|
|
82
|
-
checkChildrenLevel(child, goalLevel, curLevel + 1);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
exports.checkChildrenLevel = checkChildrenLevel;
|
|
88
|
-
|
|
89
|
-
var buildTreeNodes = function buildTreeNodes(nodes, goalLevel, showkr) {
|
|
90
|
-
if (!nodes.length) return []; // 生成树
|
|
91
|
-
|
|
92
|
-
var initRoots = toTree(nodes, showkr); // 根据层级控制显示,多余的节点放在根节点上
|
|
93
|
-
|
|
94
|
-
for (var i = 0; i < initRoots.length; i++) {
|
|
95
|
-
checkChildrenLevel(initRoots[i], goalLevel, 1);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
return initRoots;
|
|
99
|
-
}; // 取出所有返回节点,平铺
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
exports.buildTreeNodes = buildTreeNodes;
|
|
103
|
-
|
|
104
|
-
var formatNodes = function formatNodes(res, showkr) {
|
|
105
|
-
var searchIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
106
|
-
var nodes = [];
|
|
107
|
-
var _res$OkrModel = res.OkrModel,
|
|
108
|
-
OkrModel = _res$OkrModel === void 0 ? [] : _res$OkrModel,
|
|
109
|
-
_res$KrModel = res.KrModel,
|
|
110
|
-
KrModel = _res$KrModel === void 0 ? [] : _res$KrModel;
|
|
111
|
-
OkrModel && uniqueArray(OkrModel, "workId").forEach(function (item) {
|
|
112
|
-
nodes.push({
|
|
113
|
-
id: item.workId,
|
|
114
|
-
data: item,
|
|
115
|
-
modelType: "work",
|
|
116
|
-
isSearchRes: searchIds.includes(item.workId)
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
showkr && KrModel && uniqueArray(KrModel, "mileStoneId").forEach(function (item) {
|
|
120
|
-
nodes.push({
|
|
121
|
-
id: item.mileStoneId,
|
|
122
|
-
data: item,
|
|
123
|
-
modelType: "kr"
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
return nodes;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
exports.formatNodes = formatNodes;
|
|
130
|
-
|
|
131
|
-
var flatTree = function flatTree(current, elements, showkr) {
|
|
132
|
-
var isParentExpand = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
133
|
-
if (!current) return;
|
|
134
|
-
var id = current.id,
|
|
135
|
-
data = current.data,
|
|
136
|
-
modelType = current.modelType,
|
|
137
|
-
_current$children = current.children,
|
|
138
|
-
children = _current$children === void 0 ? [] : _current$children,
|
|
139
|
-
isSearchRes = current.isSearchRes;
|
|
140
|
-
|
|
141
|
-
if (modelType == "root") {
|
|
142
|
-
elements.push({
|
|
143
|
-
id: "".concat(id),
|
|
144
|
-
type: "RootNode",
|
|
145
|
-
data: data
|
|
146
|
-
});
|
|
147
|
-
} else {
|
|
148
|
-
var isChildExpand = false;
|
|
149
|
-
|
|
150
|
-
if (showkr) {
|
|
151
|
-
isChildExpand = children.length > 0;
|
|
152
|
-
} else {
|
|
153
|
-
var childTotal = children.filter(function (item) {
|
|
154
|
-
return item.modelType == "work";
|
|
155
|
-
}).length;
|
|
156
|
-
var krChildTotal = children.filter(function (item) {
|
|
157
|
-
return item.modelType == "kr";
|
|
158
|
-
}).reduce(function (count, current) {
|
|
159
|
-
return count += (current.children || []).length;
|
|
160
|
-
}, 0);
|
|
161
|
-
isChildExpand = childTotal + krChildTotal > 0;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
elements.push({
|
|
165
|
-
id: "".concat(id),
|
|
166
|
-
type: "ChildNode",
|
|
167
|
-
data: {
|
|
168
|
-
id: id,
|
|
169
|
-
data: data,
|
|
170
|
-
isParentExpand: isParentExpand,
|
|
171
|
-
isChildExpand: isChildExpand,
|
|
172
|
-
modelType: modelType,
|
|
173
|
-
isSearchRes: isSearchRes
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (children.length) {
|
|
179
|
-
children.forEach(function (child) {
|
|
180
|
-
if (!child) return;
|
|
181
|
-
var modelType = child.modelType,
|
|
182
|
-
_child$children = child.children,
|
|
183
|
-
children = _child$children === void 0 ? [] : _child$children;
|
|
184
|
-
|
|
185
|
-
if (!showkr && modelType == "kr") {
|
|
186
|
-
if (children.length > 0) {
|
|
187
|
-
children.forEach(function (sub) {
|
|
188
|
-
if (!sub) return;
|
|
189
|
-
elements.push({
|
|
190
|
-
id: "e".concat(id, "-").concat(sub.id),
|
|
191
|
-
source: "".concat(id),
|
|
192
|
-
target: "".concat(sub.id)
|
|
193
|
-
});
|
|
194
|
-
flatTree(sub, elements, showkr, current.modelType != "root");
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
} else {
|
|
198
|
-
elements.push({
|
|
199
|
-
id: "e".concat(id, "-").concat(child.id),
|
|
200
|
-
source: "".concat(id),
|
|
201
|
-
target: "".concat(child.id)
|
|
202
|
-
});
|
|
203
|
-
flatTree(child, elements, showkr, current.modelType != "root");
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
}; // tree to array
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
var transToMapData = function transToMapData(root, showkr) {
|
|
211
|
-
var elements = [];
|
|
212
|
-
flatTree(root, elements, showkr);
|
|
213
|
-
return elements;
|
|
214
|
-
}; // 删除子节点
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
exports.transToMapData = transToMapData;
|
|
218
|
-
|
|
219
|
-
var deleteChildrenById = function deleteChildrenById(node, parentId) {
|
|
220
|
-
if (!node) return;
|
|
221
|
-
var id = node.id,
|
|
222
|
-
_node$children = node.children,
|
|
223
|
-
children = _node$children === void 0 ? [] : _node$children;
|
|
224
|
-
|
|
225
|
-
if (parentId == id) {
|
|
226
|
-
node.children = [];
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (children.length > 0) {
|
|
230
|
-
children.forEach(function (child) {
|
|
231
|
-
child && deleteChildrenById(child, parentId);
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
exports.deleteChildrenById = deleteChildrenById;
|
|
237
|
-
|
|
238
|
-
var diff = function diff(targetArr, source, sourceArr, sourceIndex) {
|
|
239
|
-
var sourceId = source.id,
|
|
240
|
-
sourceChildren = source.children;
|
|
241
|
-
targetArr.forEach(function (target, index) {
|
|
242
|
-
var id = target.id,
|
|
243
|
-
_target$children = target.children,
|
|
244
|
-
children = _target$children === void 0 ? [] : _target$children;
|
|
245
|
-
|
|
246
|
-
if (sourceId == id) {
|
|
247
|
-
targetArr[index] = source;
|
|
248
|
-
sourceArr[sourceIndex] = null;
|
|
249
|
-
} else if (children.length > 0) {
|
|
250
|
-
diff(children, source, sourceArr, sourceIndex);
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
}; // 对比更新
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
var diffAndUpdate = function diffAndUpdate(targetArr, sourceArr) {
|
|
257
|
-
sourceArr.map(function (source, index) {
|
|
258
|
-
source && diff(targetArr, source, sourceArr, index);
|
|
259
|
-
});
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
exports.diffAndUpdate = diffAndUpdate;
|
|
263
|
-
|
|
264
|
-
var findNode = function findNode(tree, targetId) {
|
|
265
|
-
var target;
|
|
266
|
-
|
|
267
|
-
var search = function search(node, targetId) {
|
|
268
|
-
if (!node) return;
|
|
269
|
-
var id = node.id,
|
|
270
|
-
_node$children2 = node.children,
|
|
271
|
-
children = _node$children2 === void 0 ? [] : _node$children2;
|
|
272
|
-
|
|
273
|
-
if (id == targetId) {
|
|
274
|
-
target = node;
|
|
275
|
-
} else if (children.length > 0) {
|
|
276
|
-
children.forEach(function (child) {
|
|
277
|
-
search(child, targetId);
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
search(tree, targetId);
|
|
283
|
-
return target;
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
exports.findNode = findNode;
|
|
287
|
-
|
|
288
|
-
var deleteKrById = function deleteKrById(targetId, current, currentIndex, parent) {
|
|
289
|
-
var id = current.id,
|
|
290
|
-
_current$children2 = current.children,
|
|
291
|
-
children = _current$children2 === void 0 ? [] : _current$children2;
|
|
292
|
-
|
|
293
|
-
if (current && current.id == targetId) {
|
|
294
|
-
if (parent) {
|
|
295
|
-
var _parent$children;
|
|
296
|
-
|
|
297
|
-
try {
|
|
298
|
-
parent.data.counter.krTotal = parent.data.counter.krTotal - 1;
|
|
299
|
-
} catch (error) {
|
|
300
|
-
throw error;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
(_parent$children = parent.children).splice.apply(_parent$children, [currentIndex, 1].concat(_toConsumableArray(children)));
|
|
304
|
-
}
|
|
305
|
-
} else if (children.length > 0) {
|
|
306
|
-
children.forEach(function (child, index) {
|
|
307
|
-
deleteKrById(targetId, child, index, current);
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
exports.deleteKrById = deleteKrById;
|
|
313
|
-
|
|
314
|
-
var uniqueArray = function uniqueArray(arr, id) {
|
|
315
|
-
var obj = {};
|
|
316
|
-
arr = arr.reduce(function (item, next) {
|
|
317
|
-
obj[next[id]] ? "" : obj[next[id]] = true && item.push(next);
|
|
318
|
-
return item;
|
|
319
|
-
}, []);
|
|
320
|
-
return arr;
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
exports.uniqueArray = uniqueArray;
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.transProgress = exports.getOptions = exports.getOSetting = exports.getKrSetting = exports.getKrOptions = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _getLocale = require("../../utils/getLocale");
|
|
13
|
-
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
|
-
var getOSetting = function getOSetting() {
|
|
19
|
-
return {
|
|
20
|
-
settingTitle: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Setmatically"),
|
|
21
|
-
switchLabel: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Setmatically"),
|
|
22
|
-
options: [{
|
|
23
|
-
label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Autup"),
|
|
24
|
-
key: 1,
|
|
25
|
-
tooltip: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_KRCompletion")
|
|
26
|
-
}, {
|
|
27
|
-
label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Autcom"),
|
|
28
|
-
key: 2,
|
|
29
|
-
tooltip: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_SubO")
|
|
30
|
-
}],
|
|
31
|
-
getRecommandText: function getRecommandText() {
|
|
32
|
-
var autoUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
33
|
-
var updateWay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
34
|
-
var recommandProgressObj = arguments.length > 2 ? arguments[2] : undefined;
|
|
35
|
-
|
|
36
|
-
if (autoUpdate) {
|
|
37
|
-
if (updateWay == 1) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
38
|
-
className: "auto-update__recommand-tip"
|
|
39
|
-
}, (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Automatic'));
|
|
40
|
-
if (updateWay == 2) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
41
|
-
className: "auto-update__recommand-tip"
|
|
42
|
-
}, (0, _getLocale.getLocale)('OKR_MyO_calculationSubO'));
|
|
43
|
-
} else {
|
|
44
|
-
var childOkrProgress = recommandProgressObj.childOkrProgress,
|
|
45
|
-
childkrProgress = recommandProgressObj.childkrProgress;
|
|
46
|
-
var textArr = [];
|
|
47
|
-
childkrProgress !== -1 && textArr.push("KR\u5B8C\u6210\u5EA6".concat(childkrProgress, "%"));
|
|
48
|
-
childOkrProgress !== -1 && textArr.push("".concat((0, _getLocale.getLocale)('OKR_MyO_Ew_SubobjCom')).concat(childOkrProgress, "%"));
|
|
49
|
-
if (textArr.length == 0) return '';
|
|
50
|
-
return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
51
|
-
className: "auto-update__recommand-icon"
|
|
52
|
-
}, (0, _getLocale.getLocale)('Per_Ass_Pop_title_Recommend')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
53
|
-
className: "auto-update__recommand-tip"
|
|
54
|
-
}, "\uFF08", textArr.join(','), "\uFF09"));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
exports.getOSetting = getOSetting;
|
|
61
|
-
|
|
62
|
-
var getKrSetting = function getKrSetting() {
|
|
63
|
-
return {
|
|
64
|
-
settingTitle: (0, _getLocale.getLocale)("OKR_MyO_KRCompletion"),
|
|
65
|
-
switchLabel: (0, _getLocale.getLocale)("OKR_MyO_SetKRcompletion"),
|
|
66
|
-
options: [{
|
|
67
|
-
label: (0, _getLocale.getLocale)("OKR_MyO_Updatetask"),
|
|
68
|
-
key: 1,
|
|
69
|
-
tooltip: (0, _getLocale.getLocale)("OKR_MyO_AeKRcompletionde")
|
|
70
|
-
}, {
|
|
71
|
-
label: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Autcom"),
|
|
72
|
-
key: 2,
|
|
73
|
-
tooltip: (0, _getLocale.getLocale)("OKR_MyO_KRcompletionde")
|
|
74
|
-
}],
|
|
75
|
-
getRecommandText: function getRecommandText(recommandProgressObj) {
|
|
76
|
-
var autoUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
77
|
-
var updateWay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
78
|
-
|
|
79
|
-
if (autoUpdate) {
|
|
80
|
-
if (updateWay === 1) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
|
-
className: "auto-update__recommand-tip"
|
|
82
|
-
}, (0, _getLocale.getLocale)("OKR_MyO_Automatic"));
|
|
83
|
-
if (updateWay === 2) return /*#__PURE__*/_react["default"].createElement("span", {
|
|
84
|
-
className: "auto-update__recommand-tip"
|
|
85
|
-
}, (0, _getLocale.getLocale)("OKR_MyO_calculationSubO"));
|
|
86
|
-
return /*#__PURE__*/_react["default"].createElement("span", null);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
var childOkrProgress = recommandProgressObj.childOkrProgress,
|
|
90
|
-
childEProgress = recommandProgressObj.childEProgress;
|
|
91
|
-
var textArr = [];
|
|
92
|
-
|
|
93
|
-
if (childEProgress !== -1) {
|
|
94
|
-
textArr.push("".concat((0, _getLocale.getLocale)("OKR_MyO_Ecompletion")).concat(childEProgress).concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Percentage")));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (childOkrProgress !== -1) {
|
|
98
|
-
textArr.push("".concat((0, _getLocale.getLocale)("OKR_MyO_Ew_SubobjCom")).concat(childOkrProgress).concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Percentage")));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (textArr.length === 0) return "";
|
|
102
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
103
|
-
className: "auto-update__recommand-icon"
|
|
104
|
-
}, (0, _getLocale.getLocale)("Per_Ass_Pop_title_Recommend")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
105
|
-
className: "auto-update__recommand-tip",
|
|
106
|
-
style: {
|
|
107
|
-
marginLeft: 0
|
|
108
|
-
}
|
|
109
|
-
}, "(", textArr.join(","), ")"));
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
exports.getKrSetting = getKrSetting;
|
|
115
|
-
|
|
116
|
-
var transProgress = function transProgress(progress) {
|
|
117
|
-
return progress === -1 ? 0 : progress;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
exports.transProgress = transProgress;
|
|
121
|
-
|
|
122
|
-
var getKrOptions = function getKrOptions() {
|
|
123
|
-
return [{
|
|
124
|
-
id: 1,
|
|
125
|
-
color: "#2879ff",
|
|
126
|
-
text: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Notrack")
|
|
127
|
-
}, {
|
|
128
|
-
id: 2,
|
|
129
|
-
color: "#F6BD16",
|
|
130
|
-
text: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Atrisk")
|
|
131
|
-
}, {
|
|
132
|
-
id: 3,
|
|
133
|
-
color: "#F05E5E",
|
|
134
|
-
text: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Postoned")
|
|
135
|
-
}];
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
exports.getKrOptions = getKrOptions;
|
|
139
|
-
|
|
140
|
-
var getOptions = function getOptions() {
|
|
141
|
-
return [{
|
|
142
|
-
id: 6,
|
|
143
|
-
color: "#2879ff",
|
|
144
|
-
text: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Notrack")
|
|
145
|
-
}, {
|
|
146
|
-
id: 2,
|
|
147
|
-
color: "#F6BD16",
|
|
148
|
-
text: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Atrisk")
|
|
149
|
-
}, {
|
|
150
|
-
id: 3,
|
|
151
|
-
color: "#F05E5E",
|
|
152
|
-
text: (0, _getLocale.getLocale)("OKR_MyO_Pop_Upd_Postoned")
|
|
153
|
-
}];
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
exports.getOptions = getOptions;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getORecommandProgress = exports.getKrRecommandProgress = void 0;
|
|
7
|
-
|
|
8
|
-
var _axios = _interopRequireDefault(require("axios"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
|
-
var tenantId = BSGlobal && BSGlobal.tenantInfo.Id || 0;
|
|
13
|
-
var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
|
|
14
|
-
|
|
15
|
-
var requestDomain = function requestDomain() {
|
|
16
|
-
if (!window.location.hostname.match(/dev/)) return "";
|
|
17
|
-
return "".concat(location.protocol, "//www.tita.gift");
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
var getKrRecommandProgress = function getKrRecommandProgress(krId) {
|
|
21
|
-
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/kr/recommend/progress?krId=").concat(krId)).then(function (progress) {
|
|
22
|
-
return progress.data;
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
exports.getKrRecommandProgress = getKrRecommandProgress;
|
|
27
|
-
|
|
28
|
-
var getORecommandProgress = function getORecommandProgress(workId) {
|
|
29
|
-
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/recommend/progress?workId=").concat(workId)).then(function (progress) {
|
|
30
|
-
return progress.data;
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
exports.getORecommandProgress = getORecommandProgress;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.uploadBase64 = exports.getImageBase64ByUrl = exports.getBase64DownloadUrl = exports.addShare = void 0;
|
|
7
|
-
|
|
8
|
-
var _axios = _interopRequireDefault(require("axios"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
|
-
var tenantId = BSGlobal && BSGlobal.tenantInfo.Id || 0;
|
|
13
|
-
var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
|
|
14
|
-
|
|
15
|
-
var requestDomain = function requestDomain() {
|
|
16
|
-
if (!window.location.hostname.match(/dev/)) return "";
|
|
17
|
-
return "http://www.tita.gift";
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
var getImageBase64ByUrl = function getImageBase64ByUrl(toUserId) {
|
|
21
|
-
return _axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/share/getBase64Str"), {
|
|
22
|
-
toUserId: toUserId
|
|
23
|
-
}).then(function (getBase64Str) {
|
|
24
|
-
return getBase64Str.data;
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
exports.getImageBase64ByUrl = getImageBase64ByUrl;
|
|
29
|
-
|
|
30
|
-
var getBase64DownloadUrl = function getBase64DownloadUrl(base64) {
|
|
31
|
-
return _axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/share/imageDownLoadDfs"), {
|
|
32
|
-
SharePicLink: base64
|
|
33
|
-
}).then(function (dfs) {
|
|
34
|
-
return dfs.data;
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
exports.getBase64DownloadUrl = getBase64DownloadUrl;
|
|
39
|
-
|
|
40
|
-
var uploadBase64 = function uploadBase64(base64) {
|
|
41
|
-
return _axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/share/imagedfs"), {
|
|
42
|
-
SharePicLink: base64
|
|
43
|
-
}).then(function (dfs) {
|
|
44
|
-
return dfs.data;
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
exports.uploadBase64 = uploadBase64;
|
|
49
|
-
|
|
50
|
-
var addShare = function addShare(data) {
|
|
51
|
-
return _axios["default"].post("".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/user/feed/AddShare"), data).then(function (dfs) {
|
|
52
|
-
return dfs.data;
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
exports.addShare = addShare;
|