@titaui/pc 1.12.13-beta.1 → 1.12.15
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/communication/index.js +6 -0
- package/lib/components/dialog-confirm/index.css +0 -1
- package/lib/components/dialog-confirm/index.js +3 -5
- package/lib/components/drawer/index.css +9 -0
- package/lib/components/drawer/index.js +11 -8
- package/lib/components/dynamic/dynamic-item/components/header/index.js +5 -1
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +2 -3
- package/lib/components/dynamic/dynamic-item/index.css +0 -1
- package/lib/components/dynamic/dynamic-item/index.js +14 -19
- package/lib/components/dynamic/dynamic-list/index.js +19 -2
- package/lib/components/form/form-fields/date/index.js +13 -13
- package/lib/components/menus/components/menu-tree/tree-node/index.css +0 -120
- package/lib/components/menus/components/menu-tree/tree-node/index.js +2 -22
- package/lib/components/menus/export-modules/appraisal-menus/index.js +30 -12
- package/lib/components/menus/export-modules/appraisal-menus/menu-highlight.js +22 -6
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +104 -9
- package/lib/components/menus/export-modules/okr-menus/menus.js +6 -3
- package/lib/components/menus/i18n.js +0 -8
- package/lib/components/menus/index.js +0 -6
- package/lib/components/menus/request-apis.js +2 -8
- package/lib/components/nav-top/components/app-center/images/chart.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/file.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/interview.svg +20 -0
- package/lib/components/nav-top/components/app-center/images/learning.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/okr.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/performance.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/plan.svg +22 -0
- package/lib/components/nav-top/components/app-center/images/project.svg +23 -0
- package/lib/components/nav-top/components/app-center/images/summary.svg +23 -0
- package/lib/components/nav-top/components/app-center/index.css +154 -0
- package/lib/components/{import-modal/import-okr-modal → nav-top/components/app-center}/index.js +104 -84
- package/lib/components/nav-top/components/menu/index.js +3 -7
- package/lib/components/nav-top/index.css +48 -7
- package/lib/components/nav-top/index.js +54 -33
- package/lib/components/nav-top/utils.js +464 -1
- package/lib/components/okr-detail/components/header/o-avatar.js +6 -0
- package/lib/components/okr-flow/export-modal/color.png +0 -0
- package/lib/components/okr-flow/export-modal/index.css +28 -13
- package/lib/components/okr-flow/export-modal/index.js +81 -44
- package/lib/components/okr-flow/export-modal/trans1.png +0 -0
- package/lib/components/period-selector/components/button/style.js +1 -1
- package/lib/components/period-selector/index.css +1 -0
- package/lib/components/period-selector/index.js +7 -2
- package/lib/components/picker/components/panels/date-panel/date-body.js +19 -31
- package/lib/components/picker/components/panels/date-panel/date-head.js +8 -8
- package/lib/components/picker/components/panels/date-panel/index.js +1 -1
- package/lib/components/picker/components/panels/month-panel/index.css +0 -5
- package/lib/components/picker/components/panels/month-panel/index.js +4 -34
- package/lib/components/picker/components/panels/month-panel/month-body.js +5 -4
- package/lib/components/picker/components/panels/month-panel/month-head.js +1 -1
- package/lib/components/picker/components/panels/year-panel/index.css +0 -5
- package/lib/components/picker/components/panels/year-panel/index.js +3 -34
- package/lib/components/picker/components/panels/year-panel/year-body.js +3 -10
- package/lib/components/picker/components/picker-trigger/index.css +1 -6
- package/lib/components/picker/components/picker-trigger/index.js +11 -16
- package/lib/components/picker/context.js +2 -17
- package/lib/components/picker/index.css +1 -29
- package/lib/components/picker/index.js +0 -3
- package/lib/components/picker/picker-panels.js +61 -98
- package/lib/components/picker/picker.js +30 -44
- package/lib/components/picker/utils.js +11 -168
- package/lib/components/rich-editor/schemas/list.js +1 -0
- package/lib/components/search-input/index.js +0 -5
- package/lib/components/select-layer/index.js +22 -8
- package/lib/components/select-tags/index.js +1 -7
- package/lib/components/task-relation-modal/helper.js +1 -56
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +1 -4
- package/lib/components/task-relation-modal/okr-relation/request-api.js +2 -6
- package/lib/components/task-relation-modal/request-api.js +5 -2
- package/lib/components/task-relation-modal/tree/work-tree/index.js +27 -31
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +22 -3
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +11 -11
- package/lib/components/textarea/index.js +5 -7
- package/lib/components/tooltip/tooltip.js +9 -4
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +11 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +21 -3
- package/lib/components/user-selector/export-modules/multiple-user-selector--bak/index.css +1 -1
- package/lib/components/user-selector/request-apis.js +39 -9
- package/lib/components/user-selector/searched-panel/index.js +7 -1
- package/lib/index.js +0 -56
- package/lib/pages/aha2021/index.js +5 -5
- package/lib/pages/aha2021/new-menu-switcher/index.css +40 -0
- package/lib/{components/import-modal/radio.js → pages/aha2021/new-menu-switcher/index.js} +42 -23
- package/lib/pages/aha2021/new-menu-switcher/new-menu-bg.png +0 -0
- package/lib/pages/aha2021/request-api.js +15 -0
- package/lib/pages/okr-map/level2-search/user.js +1 -0
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/constant.js +2 -14
- package/lib/utils/helpers.js +11 -56
- package/package.json +1 -2
- package/lib/components/attachments-preview/index.css +0 -11
- package/lib/components/attachments-preview/index.js +0 -112
- package/lib/components/auto-save/img/failed.svg +0 -17
- package/lib/components/auto-save/img/success.svg +0 -16
- package/lib/components/auto-save/index.css +0 -39
- package/lib/components/auto-save/index.js +0 -78
- package/lib/components/auto-save/interface.js +0 -5
- package/lib/components/color-date-picker/index.css +0 -72
- package/lib/components/color-date-picker/index.js +0 -129
- package/lib/components/color-date-picker/interface.js +0 -14
- package/lib/components/dialog-upload/img/doc.svg +0 -1
- package/lib/components/dialog-upload/img/other.svg +0 -1
- package/lib/components/dialog-upload/img/pdf.svg +0 -1
- package/lib/components/dialog-upload/img/ppt.svg +0 -1
- package/lib/components/dialog-upload/img/radio.svg +0 -1
- package/lib/components/dialog-upload/img/video.svg +0 -1
- package/lib/components/dialog-upload/img/xls.svg +0 -1
- package/lib/components/dialog-upload/index.css +0 -77
- package/lib/components/dialog-upload/index.js +0 -330
- package/lib/components/dialog-upload/type.js +0 -35
- package/lib/components/dialog-upload/uploaded-preview.css +0 -77
- package/lib/components/dialog-upload/uploaded-preview.js +0 -132
- package/lib/components/dialog-upload/util.js +0 -131
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/api.js +0 -27
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/encourage.js +0 -119
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/APP-shoucang-m.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/ascore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curEfforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGood.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/curGreat.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/efforts.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/good.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/great.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/halfscore.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/loading.gif +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/score.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/img/top.svg +0 -14
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.css +0 -75
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +0 -195
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/rate.js +0 -143
- package/lib/components/dynamic/dynamic-item/components/header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +0 -31
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.css +0 -170
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +0 -151
- package/lib/components/dynamic/dynamic-item/components/okr-progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/okr-progress/request-api.js +0 -10
- package/lib/components/dynamic/dynamic-item/components/okr-progress/utils.js +0 -10
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.css +0 -8
- package/lib/components/dynamic/dynamic-item/components/progress/components/kr-progress/index.js +0 -26
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.css +0 -8
- package/lib/components/dynamic/dynamic-item/components/progress/components/o-progress/index.js +0 -26
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.css +0 -197
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +0 -220
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/request-api.js +0 -20
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/util.js +0 -134
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.css +0 -10
- package/lib/components/dynamic/dynamic-item/components/progress/components/task-progress/index.js +0 -60
- package/lib/components/dynamic/dynamic-item/components/progress/index.css +0 -25
- package/lib/components/dynamic/dynamic-item/components/progress/index.js +0 -71
- package/lib/components/dynamic/dynamic-item/components/progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +0 -31
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +0 -59
- package/lib/components/dynamic/dynamic-item/components/schedule/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +0 -45
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +0 -166
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +0 -360
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +0 -49
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.css +0 -24
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/index.js +0 -52
- package/lib/components/dynamic/dynamic-item/components/table-row-o-project/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.css +0 -50
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/index.js +0 -65
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +0 -16
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +0 -201
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +0 -169
- package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +0 -5
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +0 -27
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/come-on-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/evaluate-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/nice-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-big.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/img/very-good-small.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +0 -68
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +0 -50
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +0 -43
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +0 -87
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +0 -45
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/evalute.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/fighting.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/happy.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/long-story.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/img/pressure.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +0 -171
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +0 -231
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +0 -30
- package/lib/components/import-modal/helper.js +0 -179
- package/lib/components/import-modal/image/loading.gif +0 -0
- package/lib/components/import-modal/import-okr-modal/index.css +0 -18
- package/lib/components/import-modal/import-task-modal/index.css +0 -18
- package/lib/components/import-modal/import-task-modal/index.js +0 -241
- package/lib/components/import-modal/import-task-modal/search-form.js +0 -135
- package/lib/components/import-modal/index.css +0 -30
- package/lib/components/import-modal/index.js +0 -20
- package/lib/components/import-modal/request-api.js +0 -204
- package/lib/components/import-modal/search/category-select.js +0 -74
- package/lib/components/import-modal/search/okr-classify-select.js +0 -74
- package/lib/components/import-modal/search/okr-status-select.js +0 -74
- package/lib/components/import-modal/search/okr-type-select.js +0 -87
- package/lib/components/import-modal/search/principal.js +0 -135
- package/lib/components/import-modal/search/relation.js +0 -80
- package/lib/components/import-modal/search/search-dropdown/index.css +0 -50
- package/lib/components/import-modal/search/search-dropdown/index.js +0 -32
- package/lib/components/import-modal/search/task-relation.js +0 -83
- package/lib/components/import-modal/search/task-status-select.js +0 -87
- package/lib/components/import-modal/search/work-relation.js +0 -83
- package/lib/components/import-modal/search/work-status-select.js +0 -74
- package/lib/components/import-modal/tree/okr-tree/index.css +0 -61
- package/lib/components/import-modal/tree/okr-tree/index.js +0 -267
- package/lib/components/import-modal/tree/okr-tree/search-form.js +0 -169
- package/lib/components/import-modal/tree/task-work-tree/index.css +0 -123
- package/lib/components/import-modal/tree/task-work-tree/index.js +0 -187
- package/lib/components/import-modal/tree-node/index.css +0 -0
- package/lib/components/import-modal/tree-node/index.js +0 -51
- package/lib/components/import-modal/tree-node/kr-node/index.css +0 -58
- package/lib/components/import-modal/tree-node/kr-node/index.js +0 -108
- package/lib/components/import-modal/tree-node/milestone-node/index.css +0 -61
- package/lib/components/import-modal/tree-node/milestone-node/index.js +0 -118
- package/lib/components/import-modal/tree-node/o-node/index.css +0 -46
- package/lib/components/import-modal/tree-node/o-node/index.js +0 -138
- package/lib/components/import-modal/tree-node/work-node/index.css +0 -51
- package/lib/components/import-modal/tree-node/work-node/index.js +0 -108
- package/lib/components/menus/components/menu-tree/images/summary-menu/caidan-enjoy.svg +0 -14
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-setup.svg +0 -18
- package/lib/components/menus/components/menu-tree/images/summary-menu/my-zongjie.svg +0 -15
- package/lib/components/menus/components/menu-tree/images/summary-menu/zongjie-s.svg +0 -15
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +0 -78
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +0 -78
- package/lib/components/menus/export-modules/summary-menus/depart-menus/helper.js +0 -56
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.css +0 -32
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +0 -231
- package/lib/components/menus/export-modules/summary-menus/index.css +0 -9
- package/lib/components/menus/export-modules/summary-menus/index.js +0 -134
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +0 -76
- package/lib/components/menus/export-modules/summary-menus/menus.js +0 -190
- package/lib/components/menus/export-modules/summary-menus/request-api.js +0 -17
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +0 -242
- package/lib/components/new-confidence/constant.js +0 -53
- package/lib/components/new-confidence/img/1.svg +0 -40
- package/lib/components/new-confidence/img/10.svg +0 -33
- package/lib/components/new-confidence/img/2.svg +0 -40
- package/lib/components/new-confidence/img/3.svg +0 -40
- package/lib/components/new-confidence/img/4.svg +0 -40
- package/lib/components/new-confidence/img/5.svg +0 -40
- package/lib/components/new-confidence/img/6.svg +0 -40
- package/lib/components/new-confidence/img/7.svg +0 -40
- package/lib/components/new-confidence/img/8.svg +0 -40
- package/lib/components/new-confidence/img/9.svg +0 -40
- package/lib/components/new-confidence/index.css +0 -62
- package/lib/components/new-confidence/index.js +0 -115
- package/lib/components/new-confidence/interface.js +0 -5
- package/lib/components/picker/components/cross.svg +0 -17
- package/lib/components/picker/components/panels/week-panel/index.css +0 -42
- package/lib/components/picker/components/panels/week-panel/index.js +0 -49
- package/lib/components/picker/components/panels/week-panel/utils.js +0 -124
- package/lib/components/picker/components/panels/week-panel/week-body.js +0 -71
- package/lib/components/picker/components/panels/week-panel/week-head.js +0 -80
- package/lib/components/picker/range-picker/components/picker-trigger/index.css +0 -97
- package/lib/components/picker/range-picker/components/picker-trigger/index.js +0 -109
- package/lib/components/picker/range-picker/components/placeholder/index.js +0 -91
- package/lib/components/picker/range-picker/components/select-input/index.js +0 -72
- package/lib/components/picker/range-picker/components/shortcuts/index.js +0 -45
- package/lib/components/picker/range-picker/index.css +0 -158
- package/lib/components/picker/range-picker/index.js +0 -263
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +0 -117
- package/lib/components/promise-confirm/interface.js +0 -5
- package/lib/components/rate/index.css +0 -111
- package/lib/components/rate/index.js +0 -52
- package/lib/components/regulation-setting-item/index.css +0 -33
- package/lib/components/regulation-setting-item/index.js +0 -37
- package/lib/components/rich-editor-at/components/index.css +0 -66
- package/lib/components/rich-editor-at/components/index.js +0 -188
- package/lib/components/rich-editor-at/index.css +0 -40
- package/lib/components/rich-editor-at/index.js +0 -113
- package/lib/components/rich-editor-upload/index.css +0 -11
- package/lib/components/rich-editor-upload/index.js +0 -87
- package/lib/components/write-summary-modal/index.css +0 -79
- package/lib/components/write-summary-modal/index.js +0 -167
- package/lib/components/write-summary-modal/interface.js +0 -19
- package/lib/components/write-summary-modal/request-api.js +0 -18
- package/lib/components/write-summary-modal/utils.js +0 -31
- package/lib/utils/planDataJson.js +0 -11115
|
@@ -1,134 +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["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _reactRouter = require("react-router");
|
|
15
|
-
|
|
16
|
-
var _departMenus = _interopRequireDefault(require("./depart-menus"));
|
|
17
|
-
|
|
18
|
-
var _flipMenuCard = _interopRequireDefault(require("../../components/flip-menu-card"));
|
|
19
|
-
|
|
20
|
-
var _searchColleague = _interopRequireDefault(require("../../components/search-colleague"));
|
|
21
|
-
|
|
22
|
-
var _summaryFrontMenus = _interopRequireDefault(require("./summary-front-menus"));
|
|
23
|
-
|
|
24
|
-
var _context = require("../../context");
|
|
25
|
-
|
|
26
|
-
var _precls = _interopRequireDefault(require("../../precls"));
|
|
27
|
-
|
|
28
|
-
var _getLocale = require("../../../../utils/getLocale");
|
|
29
|
-
|
|
30
|
-
require("../../index.css");
|
|
31
|
-
|
|
32
|
-
require("./index.css");
|
|
33
|
-
|
|
34
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
41
|
-
|
|
42
|
-
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."); }
|
|
43
|
-
|
|
44
|
-
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); }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
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; }
|
|
49
|
-
|
|
50
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
|
-
|
|
52
|
-
function SummaryMenus(props) {
|
|
53
|
-
var _props$onSelect = props.onSelect,
|
|
54
|
-
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
|
|
55
|
-
history = props.history;
|
|
56
|
-
|
|
57
|
-
var _useState = (0, _react.useState)({}),
|
|
58
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
-
flipOptions = _useState2[0],
|
|
60
|
-
setFlipOptions = _useState2[1];
|
|
61
|
-
|
|
62
|
-
var _useState3 = (0, _react.useState)(""),
|
|
63
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
64
|
-
flipBackType = _useState4[0],
|
|
65
|
-
setFlipBackType = _useState4[1];
|
|
66
|
-
|
|
67
|
-
var summmaryFrontMenu = (0, _react.useRef)();
|
|
68
|
-
var menuRef = (0, _react.useRef)();
|
|
69
|
-
var flipRef = (0, _react.useRef)({
|
|
70
|
-
next: function next() {},
|
|
71
|
-
goback: function goback() {}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
var onUserSelectHandler = function onUserSelectHandler(user) {
|
|
75
|
-
location.href = "#/summary/manage?toUserId=".concat(user.id);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
var flipGoNext = function flipGoNext(opt) {
|
|
79
|
-
setFlipBackType(opt.type);
|
|
80
|
-
setFlipOptions(opt.options);
|
|
81
|
-
flipRef.current.next();
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
var collapseMenu = function collapseMenu(isHide) {
|
|
85
|
-
if (isHide) {
|
|
86
|
-
menuRef.current.style.width = "0px";
|
|
87
|
-
} else {
|
|
88
|
-
menuRef.current.style.width = "";
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
var onFlipChangeHandler = function onFlipChangeHandler(isBack) {
|
|
93
|
-
if (!isBack) {
|
|
94
|
-
// 返回,取消菜单的高亮
|
|
95
|
-
summmaryFrontMenu.current.setSelectedMenuKeys([]);
|
|
96
|
-
setTimeout(function () {
|
|
97
|
-
return (// 正面时销毁背面
|
|
98
|
-
setFlipBackType("")
|
|
99
|
-
);
|
|
100
|
-
}, 600);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
return /*#__PURE__*/_react["default"].createElement(_context.FlipContext.Provider, {
|
|
105
|
-
value: {
|
|
106
|
-
flipGoNext: flipGoNext
|
|
107
|
-
}
|
|
108
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
109
|
-
ref: menuRef,
|
|
110
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "-summary-menus"))
|
|
111
|
-
}, /*#__PURE__*/_react["default"].createElement(_flipMenuCard["default"], {
|
|
112
|
-
ref: flipRef,
|
|
113
|
-
collapseMenu: collapseMenu,
|
|
114
|
-
defaultWidth: _getLocale.isEn ? 210 : 180,
|
|
115
|
-
onChange: onFlipChangeHandler
|
|
116
|
-
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
|
-
style: {
|
|
118
|
-
marginBottom: 12
|
|
119
|
-
}
|
|
120
|
-
}, /*#__PURE__*/_react["default"].createElement(_searchColleague["default"], {
|
|
121
|
-
onSelect: onUserSelectHandler
|
|
122
|
-
})), /*#__PURE__*/_react["default"].createElement(_summaryFrontMenus["default"], {
|
|
123
|
-
ref: summmaryFrontMenu,
|
|
124
|
-
onSelect: onSelect,
|
|
125
|
-
history: history
|
|
126
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
127
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "-summary-menus-back"), "tita-bootstrap__scrollbar")
|
|
128
|
-
}, flipBackType == "depart" && /*#__PURE__*/_react["default"].createElement(_departMenus["default"], null)))));
|
|
129
|
-
} // @ts-ignore
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
var _default = (0, _reactRouter.withRouter)(SummaryMenus);
|
|
133
|
-
|
|
134
|
-
exports["default"] = _default;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _menus = require("./menus");
|
|
9
|
-
|
|
10
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
-
|
|
12
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
13
|
-
|
|
14
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
|
-
|
|
16
|
-
var _default = /*#__PURE__*/function () {
|
|
17
|
-
function _default(history) {
|
|
18
|
-
_classCallCheck(this, _default);
|
|
19
|
-
|
|
20
|
-
this.history = null;
|
|
21
|
-
this.history = history;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
_createClass(_default, [{
|
|
25
|
-
key: "highlight",
|
|
26
|
-
value: function highlight(cb) {
|
|
27
|
-
if (this.isALLSummary()) {
|
|
28
|
-
cb(_menus.PAGE_SUMMARY_ALl);
|
|
29
|
-
} else if (this.isMySummary()) {
|
|
30
|
-
cb(_menus.PAGE_SUMMARY_MY);
|
|
31
|
-
} else if (this.isSummaryChart()) {
|
|
32
|
-
cb(_menus.PAGE_SUMMARY_CHART);
|
|
33
|
-
} else if (this.isShare()) {
|
|
34
|
-
cb(_menus.PAGE_SUMMARY_SHARE);
|
|
35
|
-
} else if (this.isSubordinatesSummary()) {
|
|
36
|
-
cb(_menus.PAGE_SUMMARY_SUBORDINATE);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
key: "isALLSummary",
|
|
43
|
-
value: function isALLSummary() {
|
|
44
|
-
var pathname = this.history.location.pathname;
|
|
45
|
-
return pathname.match(/summary\/all/);
|
|
46
|
-
}
|
|
47
|
-
}, {
|
|
48
|
-
key: "isMySummary",
|
|
49
|
-
value: function isMySummary() {
|
|
50
|
-
var pathname = this.history.location.pathname;
|
|
51
|
-
return pathname.match(/summary\/my/);
|
|
52
|
-
}
|
|
53
|
-
}, {
|
|
54
|
-
key: "isSubordinatesSummary",
|
|
55
|
-
value: function isSubordinatesSummary() {
|
|
56
|
-
var pathname = this.history.location.pathname;
|
|
57
|
-
return pathname.match(/summary\/subordinates/);
|
|
58
|
-
}
|
|
59
|
-
}, {
|
|
60
|
-
key: "isShare",
|
|
61
|
-
value: function isShare() {
|
|
62
|
-
var pathname = this.history.location.pathname;
|
|
63
|
-
return pathname.match(/summary\/share/);
|
|
64
|
-
}
|
|
65
|
-
}, {
|
|
66
|
-
key: "isSummaryChart",
|
|
67
|
-
value: function isSummaryChart() {
|
|
68
|
-
var pathname = this.history.location.pathname;
|
|
69
|
-
return pathname.match(/summary\/chart/);
|
|
70
|
-
}
|
|
71
|
-
}]);
|
|
72
|
-
|
|
73
|
-
return _default;
|
|
74
|
-
}();
|
|
75
|
-
|
|
76
|
-
exports["default"] = _default;
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.defaultRefObject = exports["default"] = exports.PAGE_SUMMARY_SUBORDINATE = exports.PAGE_SUMMARY_SHARE = exports.PAGE_SUMMARY_ROLE = exports.PAGE_SUMMARY_MY = exports.PAGE_SUMMARY_DEPART = exports.PAGE_SUMMARY_CHART = exports.PAGE_SUMMARY_ALl = void 0;
|
|
7
|
-
|
|
8
|
-
var _i18n = require("../../i18n");
|
|
9
|
-
|
|
10
|
-
var _index = require("../../components/menu-tree/tree-node/index");
|
|
11
|
-
|
|
12
|
-
var _getLocale = require("../../../../utils/getLocale");
|
|
13
|
-
|
|
14
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
-
|
|
16
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
17
|
-
|
|
18
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
-
|
|
20
|
-
var defaultRefObject = {
|
|
21
|
-
menus: [],
|
|
22
|
-
insertSubordinates: function insertSubordinates() {},
|
|
23
|
-
getMenus: function getMenus() {},
|
|
24
|
-
setSubordinatesLoading: function setSubordinatesLoading() {},
|
|
25
|
-
SUBORDINATES: ''
|
|
26
|
-
};
|
|
27
|
-
exports.defaultRefObject = defaultRefObject;
|
|
28
|
-
var PAGE_SUMMARY_ALl = 'summaryall';
|
|
29
|
-
exports.PAGE_SUMMARY_ALl = PAGE_SUMMARY_ALl;
|
|
30
|
-
var PAGE_SUMMARY_MY = 'summarymy';
|
|
31
|
-
exports.PAGE_SUMMARY_MY = PAGE_SUMMARY_MY;
|
|
32
|
-
var PAGE_SUMMARY_SUBORDINATE = 'subordinates';
|
|
33
|
-
exports.PAGE_SUMMARY_SUBORDINATE = PAGE_SUMMARY_SUBORDINATE;
|
|
34
|
-
var PAGE_SUMMARY_SHARE = 'share';
|
|
35
|
-
exports.PAGE_SUMMARY_SHARE = PAGE_SUMMARY_SHARE;
|
|
36
|
-
var PAGE_SUMMARY_DEPART = 'depart';
|
|
37
|
-
exports.PAGE_SUMMARY_DEPART = PAGE_SUMMARY_DEPART;
|
|
38
|
-
var PAGE_SUMMARY_ROLE = 'role';
|
|
39
|
-
exports.PAGE_SUMMARY_ROLE = PAGE_SUMMARY_ROLE;
|
|
40
|
-
var PAGE_SUMMARY_CHART = 'chart';
|
|
41
|
-
exports.PAGE_SUMMARY_CHART = PAGE_SUMMARY_CHART;
|
|
42
|
-
|
|
43
|
-
var summaryMenus = /*#__PURE__*/function () {
|
|
44
|
-
function summaryMenus(props) {
|
|
45
|
-
_classCallCheck(this, summaryMenus);
|
|
46
|
-
|
|
47
|
-
this.COMPANYALL = _index.COMPANY_ALL_NODE;
|
|
48
|
-
this.SHARE = _index.SHARE_NODE;
|
|
49
|
-
this.SUBORDINATES = 'subordinates';
|
|
50
|
-
console.log('props', props);
|
|
51
|
-
this.menus = [{
|
|
52
|
-
icon: 'all-zongjie',
|
|
53
|
-
label: _i18n.locale.menu_all_summary,
|
|
54
|
-
key: PAGE_SUMMARY_ALl,
|
|
55
|
-
type: _index.MENU_ITEM_NOE,
|
|
56
|
-
href: '#/summary/all',
|
|
57
|
-
isShow: true
|
|
58
|
-
}, {
|
|
59
|
-
icon: 'caidan-my',
|
|
60
|
-
label: _i18n.locale.menu_my_summary,
|
|
61
|
-
key: PAGE_SUMMARY_MY,
|
|
62
|
-
type: _index.MENU_ITEM_NOE,
|
|
63
|
-
href: '#/summary/my',
|
|
64
|
-
isShow: true
|
|
65
|
-
}, {
|
|
66
|
-
icon: 'caidan-xiashu',
|
|
67
|
-
label: _i18n.locale.menu_my_subordinates,
|
|
68
|
-
key: this.SUBORDINATES,
|
|
69
|
-
type: _index.SUBORDINATES_NODE,
|
|
70
|
-
isLeaf: false,
|
|
71
|
-
children: [],
|
|
72
|
-
href: '#/summary/subordinates',
|
|
73
|
-
isShow: window.BSGlobal.loginUserInfo.HasSub
|
|
74
|
-
}, {
|
|
75
|
-
icon: 'caidan-enjoy',
|
|
76
|
-
label: _i18n.locale.menu_my_share,
|
|
77
|
-
key: PAGE_SUMMARY_SHARE,
|
|
78
|
-
type: _index.MENU_ITEM_NOE,
|
|
79
|
-
href: '#/summary/share',
|
|
80
|
-
isShow: props.isShowShare
|
|
81
|
-
}, {
|
|
82
|
-
icon: 'bumen',
|
|
83
|
-
label: _i18n.locale.menu_department,
|
|
84
|
-
key: this.COMPANYALL,
|
|
85
|
-
type: this.COMPANYALL,
|
|
86
|
-
href: '',
|
|
87
|
-
isShow: props.isShowDept
|
|
88
|
-
}, {
|
|
89
|
-
icon: '',
|
|
90
|
-
label: _i18n.locale.menu_summary,
|
|
91
|
-
key: 'other',
|
|
92
|
-
type: _index.GROUP_NAME_NODE,
|
|
93
|
-
href: '',
|
|
94
|
-
isShow: true
|
|
95
|
-
}, {
|
|
96
|
-
icon: 'my-setup',
|
|
97
|
-
label: _i18n.locale.menu_summary_role,
|
|
98
|
-
key: PAGE_SUMMARY_ROLE,
|
|
99
|
-
type: _index.MENU_ITEM_NOE,
|
|
100
|
-
href: '#/enterprise/manage?reactRouterName=daily',
|
|
101
|
-
isShow: true
|
|
102
|
-
}];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
_createClass(summaryMenus, [{
|
|
106
|
-
key: "setSubordinatesLoading",
|
|
107
|
-
value: function setSubordinatesLoading(loading) {
|
|
108
|
-
this.menus[1].children = [];
|
|
109
|
-
|
|
110
|
-
if (loading) {
|
|
111
|
-
this.menus[1].children.push({
|
|
112
|
-
icon: '',
|
|
113
|
-
label: 'loading',
|
|
114
|
-
key: 'loading-subordinates',
|
|
115
|
-
type: _index.LOADING_NODE,
|
|
116
|
-
href: '',
|
|
117
|
-
data: {}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}, {
|
|
122
|
-
key: "insertSubordinates",
|
|
123
|
-
value: function insertSubordinates(users) {
|
|
124
|
-
if (!users || !users.length) {
|
|
125
|
-
this.menus[2].children = [{
|
|
126
|
-
icon: '',
|
|
127
|
-
label: 'empty-subordinates',
|
|
128
|
-
key: 'empty-subordinates',
|
|
129
|
-
type: _index.NO_SUBORDINATES_NODE,
|
|
130
|
-
href: '',
|
|
131
|
-
data: {}
|
|
132
|
-
}];
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
var treeNodeUsers = [];
|
|
137
|
-
|
|
138
|
-
for (var i = 0; i < users.length; i++) {
|
|
139
|
-
var user = users[i];
|
|
140
|
-
treeNodeUsers.push({
|
|
141
|
-
icon: '',
|
|
142
|
-
label: user.name,
|
|
143
|
-
key: "".concat(user.userId),
|
|
144
|
-
type: _index.USER_NODE,
|
|
145
|
-
href: '',
|
|
146
|
-
data: user
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
this.menus[2].children = treeNodeUsers;
|
|
151
|
-
}
|
|
152
|
-
}, {
|
|
153
|
-
key: "getMenus",
|
|
154
|
-
value: function getMenus() {
|
|
155
|
-
var menus = this.formateToTreeNodeData(this.menus.filter(function (it) {
|
|
156
|
-
return it.isShow == true;
|
|
157
|
-
}));
|
|
158
|
-
return menus;
|
|
159
|
-
}
|
|
160
|
-
}, {
|
|
161
|
-
key: "formateToTreeNodeData",
|
|
162
|
-
value: function formateToTreeNodeData(menus) {
|
|
163
|
-
var pid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
164
|
-
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
165
|
-
var treeNodes = [];
|
|
166
|
-
|
|
167
|
-
for (var i = 0; i < menus.length; i++) {
|
|
168
|
-
var menu = menus[i];
|
|
169
|
-
var hasChildren = !!(menu.children && menu.children.length);
|
|
170
|
-
var isLeaf = menu.isLeaf !== undefined ? menu.isLeaf : !hasChildren;
|
|
171
|
-
var nodeType = menu.type;
|
|
172
|
-
if (!nodeType) nodeType = !isLeaf ? _index.PARENT_MENU_NODE : _index.SUB_MENU_ITEM_NOE;
|
|
173
|
-
treeNodes.push({
|
|
174
|
-
key: "".concat(menu.key),
|
|
175
|
-
title: (0, _getLocale.getLocale)(menu.label) ? (0, _getLocale.getLocale)(menu.label) : menu.label,
|
|
176
|
-
data: menu.data || menu,
|
|
177
|
-
isLeaf: isLeaf,
|
|
178
|
-
children: this.formateToTreeNodeData(menu.children || [], level + 1, menu.key),
|
|
179
|
-
nodeType: nodeType
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
return treeNodes;
|
|
184
|
-
}
|
|
185
|
-
}]);
|
|
186
|
-
|
|
187
|
-
return summaryMenus;
|
|
188
|
-
}();
|
|
189
|
-
|
|
190
|
-
exports["default"] = summaryMenus;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getShareStatus = void 0;
|
|
7
|
-
|
|
8
|
-
var _request = require("@titaui/request");
|
|
9
|
-
|
|
10
|
-
var _helpers = require("../../../../utils/helpers");
|
|
11
|
-
|
|
12
|
-
var getShareStatus = function getShareStatus() {
|
|
13
|
-
var loginUser = (0, _helpers.getLoginUserInfo)();
|
|
14
|
-
return (0, _request.rget)('v1')("summary/getShareUsers?toUserId=".concat(loginUser.Id));
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
exports.getShareStatus = getShareStatus;
|
|
@@ -1,242 +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["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _resizeObserverPolyfill = _interopRequireDefault(require("resize-observer-polyfill"));
|
|
13
|
-
|
|
14
|
-
var _scrollbar = _interopRequireDefault(require("../../../scrollbar"));
|
|
15
|
-
|
|
16
|
-
var _menuTree = _interopRequireDefault(require("../../components/menu-tree"));
|
|
17
|
-
|
|
18
|
-
var _index = require("../../components/menu-tree/tree-node/index");
|
|
19
|
-
|
|
20
|
-
var _menus = _interopRequireWildcard(require("./menus"));
|
|
21
|
-
|
|
22
|
-
var _menuHighlight = _interopRequireDefault(require("./menu-highlight"));
|
|
23
|
-
|
|
24
|
-
var _requestApis = require("../../request-apis");
|
|
25
|
-
|
|
26
|
-
var _requestApi = require("./request-api");
|
|
27
|
-
|
|
28
|
-
var _auth = require("../../../../utils/auth");
|
|
29
|
-
|
|
30
|
-
require("../../index.css");
|
|
31
|
-
|
|
32
|
-
require("./index.css");
|
|
33
|
-
|
|
34
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
41
|
-
|
|
42
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
43
|
-
|
|
44
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
45
|
-
|
|
46
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
47
|
-
|
|
48
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
49
|
-
|
|
50
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
51
|
-
|
|
52
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
|
-
|
|
54
|
-
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
55
|
-
var _props$onSelect = props.onSelect,
|
|
56
|
-
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
|
|
57
|
-
history = props.history;
|
|
58
|
-
|
|
59
|
-
var _useState = (0, _react.useState)(function () {
|
|
60
|
-
return document.body.offsetHeight - 198;
|
|
61
|
-
}),
|
|
62
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
63
|
-
maxHeight = _useState2[0],
|
|
64
|
-
setMaxHeight = _useState2[1];
|
|
65
|
-
|
|
66
|
-
var _useState3 = (0, _react.useState)(['myokr']),
|
|
67
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
68
|
-
expandedKeys = _useState4[0],
|
|
69
|
-
setExpandedKeys = _useState4[1];
|
|
70
|
-
|
|
71
|
-
var _useState5 = (0, _react.useState)([]),
|
|
72
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
73
|
-
selectedMenuKeys = _useState6[0],
|
|
74
|
-
setSelectedMenuKeys = _useState6[1];
|
|
75
|
-
|
|
76
|
-
var _useState7 = (0, _react.useState)(false),
|
|
77
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
78
|
-
isShowShare = _useState8[0],
|
|
79
|
-
setIsShowShare = _useState8[1];
|
|
80
|
-
|
|
81
|
-
var _useState9 = (0, _react.useState)(new _auth.BaseAuth().isBoss()),
|
|
82
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
83
|
-
isShowDepartment = _useState10[0],
|
|
84
|
-
setIsShowDepartment = _useState10[1];
|
|
85
|
-
|
|
86
|
-
var flipRef = (0, _react.useRef)({
|
|
87
|
-
next: function next() {},
|
|
88
|
-
goback: function goback() {}
|
|
89
|
-
});
|
|
90
|
-
var summaryMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
91
|
-
|
|
92
|
-
var _useState11 = (0, _react.useState)(function () {
|
|
93
|
-
summaryMenusData.current = new _menus["default"]({
|
|
94
|
-
isShowShare: false,
|
|
95
|
-
isShowDept: true
|
|
96
|
-
});
|
|
97
|
-
return summaryMenusData.current.getMenus();
|
|
98
|
-
}),
|
|
99
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
100
|
-
menus = _useState12[0],
|
|
101
|
-
setMenus = _useState12[1]; // 判断路由高亮菜单
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
(0, _react.useEffect)(function () {
|
|
105
|
-
var menuHighlight = new _menuHighlight["default"](history);
|
|
106
|
-
menuHighlight.highlight(function (menu) {
|
|
107
|
-
return changeHighlightMenu([menu]);
|
|
108
|
-
});
|
|
109
|
-
}, [history.location.pathname, history.location.search]);
|
|
110
|
-
|
|
111
|
-
var changeHighlightMenu = function changeHighlightMenu(menuKeys) {
|
|
112
|
-
setSelectedMenuKeys(menuKeys);
|
|
113
|
-
flipRef.current.goback();
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
|
|
117
|
-
var node = _ref.node;
|
|
118
|
-
var nodeType = node.nodeType,
|
|
119
|
-
data = node.data;
|
|
120
|
-
|
|
121
|
-
if (nodeType == _index.USER_NODE || nodeType == _index.FOLLOWER_NODE) {
|
|
122
|
-
location.href = "#/summary/manage?toUserId=".concat(data.userId);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
onSelect(node); // 处理菜单选中
|
|
126
|
-
|
|
127
|
-
if (!selectedKyes.length) return;
|
|
128
|
-
setSelectedMenuKeys(selectedKyes);
|
|
129
|
-
}; // 获取下属数据列表
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
var getSubordinaters = function getSubordinaters() {
|
|
133
|
-
return new Promise(function (resolve, reject) {
|
|
134
|
-
var mdata = summaryMenusData.current; // 初始化 Loading
|
|
135
|
-
|
|
136
|
-
mdata.setSubordinatesLoading(true);
|
|
137
|
-
setMenus(mdata.getMenus());
|
|
138
|
-
resolve(true); // 获取数据
|
|
139
|
-
|
|
140
|
-
(0, _requestApis.getSubordinates)({
|
|
141
|
-
relationIds: '1,2'
|
|
142
|
-
}, {
|
|
143
|
-
disabledDottedSubordinatesDig: true
|
|
144
|
-
}).then(function (users) {
|
|
145
|
-
mdata.setSubordinatesLoading(false);
|
|
146
|
-
mdata.insertSubordinates(users);
|
|
147
|
-
setMenus(mdata.getMenus());
|
|
148
|
-
resolve(true);
|
|
149
|
-
})["catch"](reject);
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
var onLoadTreeNodeDataHandler = function onLoadTreeNodeDataHandler(treeNode) {
|
|
154
|
-
return new Promise(function (resolve) {
|
|
155
|
-
if (treeNode.key != summaryMenusData.current.SUBORDINATES) {
|
|
156
|
-
resolve(true);
|
|
157
|
-
} else if (treeNode.key == summaryMenusData.current.SUBORDINATES) {
|
|
158
|
-
getSubordinaters().then(function () {
|
|
159
|
-
return resolve(true);
|
|
160
|
-
})["catch"](function () {
|
|
161
|
-
return resolve(true);
|
|
162
|
-
});
|
|
163
|
-
} else {
|
|
164
|
-
resolve(true);
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
var onExpandHandler = function onExpandHandler(expandKeys, _ref2) {
|
|
170
|
-
var expanded = _ref2.expanded,
|
|
171
|
-
node = _ref2.node;
|
|
172
|
-
setExpandedKeys(expandKeys);
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
(0, _react.useImperativeHandle)(ref, function () {
|
|
176
|
-
return {
|
|
177
|
-
setSelectedMenuKeys: setSelectedMenuKeys
|
|
178
|
-
};
|
|
179
|
-
});
|
|
180
|
-
(0, _react.useEffect)(function () {
|
|
181
|
-
var newMenu = new _menus["default"]({
|
|
182
|
-
isShowShare: isShowShare,
|
|
183
|
-
isShowDept: isShowDepartment
|
|
184
|
-
});
|
|
185
|
-
summaryMenusData.current = newMenu;
|
|
186
|
-
setMenus(newMenu.getMenus());
|
|
187
|
-
}, [isShowShare, isShowDepartment]);
|
|
188
|
-
(0, _react.useEffect)(function () {
|
|
189
|
-
(0, _requestApi.getShareStatus)().then(function (resp) {
|
|
190
|
-
if (resp.Code === 1) {
|
|
191
|
-
if (resp.Data.length > 0) {
|
|
192
|
-
setIsShowShare(true);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
if (!isShowDepartment) {
|
|
198
|
-
(0, _requestApis.getMyDepartMent)().then(function (resp) {
|
|
199
|
-
if (resp.Code === 1) {
|
|
200
|
-
if (resp.Data.length > 0) {
|
|
201
|
-
setIsShowDepartment(true);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
208
|
-
var _iterator = _createForOfIteratorHelper(entries),
|
|
209
|
-
_step;
|
|
210
|
-
|
|
211
|
-
try {
|
|
212
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
213
|
-
var entry = _step.value;
|
|
214
|
-
var cr = entry.contentRect;
|
|
215
|
-
setMaxHeight(cr.height - 198);
|
|
216
|
-
}
|
|
217
|
-
} catch (err) {
|
|
218
|
-
_iterator.e(err);
|
|
219
|
-
} finally {
|
|
220
|
-
_iterator.f();
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
obs.observe(document.body);
|
|
224
|
-
return function () {
|
|
225
|
-
obs.unobserve(document.body);
|
|
226
|
-
};
|
|
227
|
-
}, []);
|
|
228
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
229
|
-
style: {
|
|
230
|
-
maxHeight: maxHeight
|
|
231
|
-
}
|
|
232
|
-
}, /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|
|
233
|
-
data: menus,
|
|
234
|
-
selectedKeys: selectedMenuKeys,
|
|
235
|
-
expandedKeys: expandedKeys,
|
|
236
|
-
onSelect: onSelectHandler,
|
|
237
|
-
onExpand: onExpandHandler,
|
|
238
|
-
loadData: onLoadTreeNodeDataHandler
|
|
239
|
-
})));
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
exports["default"] = _default;
|