@titaui/pc 1.15.89 → 1.15.90-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/avatar/name-avatar/index.css +1 -1
- package/lib/components/avatar/text-avatar/index.css +1 -1
- package/lib/components/book-demo/components/pc/components/content/index.js +8 -6
- package/lib/components/book-demo/components/pc/index.js +22 -18
- package/lib/components/book-demo/constant.js +115 -0
- package/lib/components/book-demo/interface.js +1 -0
- package/lib/components/change-okr-modal/Filter.js +3 -1
- package/lib/components/change-okr-modal/Item.js +3 -1
- package/lib/components/common-share/publishMblog.js +3 -1
- package/lib/components/common-share/request-apis.js +4 -2
- package/lib/components/communication/style.js +1 -1
- package/lib/components/confidence/index.css +4 -4
- package/lib/components/create-okr-modal/fields/index.css +6 -6
- package/lib/components/create-okr-modal/fields/okr-classify.js +3 -1
- package/lib/components/create-okr-modal/fields/okr-new-user-selector.js +4 -1
- package/lib/components/create-okr-modal/fields/okr-type.js +3 -1
- package/lib/components/create-okr-modal/index.css +6 -6
- package/lib/components/create-okr-modal/index.js +3 -1
- package/lib/components/create-okr-modal/kr-items/index.css +3 -3
- package/lib/components/create-okr-modal/request-api.js +4 -2
- package/lib/components/create-okr-modal/utils/helper.js +3 -1
- package/lib/components/dialog/index.css +2 -2
- package/lib/components/dialog-confirm/index.css +5 -5
- package/lib/components/dialog-confirm/index.js +3 -1
- package/lib/components/dynamic/components/comments-dialog/api.js +4 -2
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +11 -6
- package/lib/components/dynamic/dynamic-item/components/schedule/index.css +8 -0
- package/lib/components/dynamic/dynamic-item/components/schedule/index.js +34 -7
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +0 -1
- package/lib/components/dynamic/dynamic-item/components/table-row-okr/utils.js +2 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +8 -2
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-discovery/dynamic-footer.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-learning/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +1 -1
- package/lib/components/dynamic/dynamic-item/index.css +2 -2
- package/lib/components/dynamic/dynamic-item/index.js +4 -2
- package/lib/components/dynamic/dynamic-list/index.css +1 -1
- package/lib/components/dynamic/request-api.js +3 -1
- package/lib/components/e-priority/index.css +4 -4
- package/lib/components/eReport/eReportListEmpty.js +1 -1
- package/lib/components/eReport/eReportLists/style.js +2 -2
- package/lib/components/eReport/eReportShare/index.js +3 -1
- package/lib/components/edit-kr-wight/style/index.js +5 -5
- package/lib/components/emotions-selector/style.js +1 -1
- package/lib/components/ereport-list/style.js +2 -2
- package/lib/components/file-list/index.css +1 -1
- package/lib/components/form/form-fields/cycle/index.css +1 -1
- package/lib/components/form/form-fields/department/index.css +2 -2
- package/lib/components/form/form-fields/dropdown/index.js +2 -2
- package/lib/components/form/form-fields/duties/index.css +2 -2
- package/lib/components/form/form-fields/input/index.css +6 -2
- package/lib/components/form/form-fields/input/index.js +9 -7
- package/lib/components/form/form-fields/input-verification-code/index.css +2 -2
- package/lib/components/form/form-fields/password/index.css +2 -2
- package/lib/components/form/form-fields/textarea/index.css +2 -2
- package/lib/components/form/form-fields/user/index.css +2 -2
- package/lib/components/grid-layout/commen-components/index.css +1 -1
- package/lib/components/grid-layout/personal-info/index.js +4 -4
- package/lib/components/grid-layout/sub-employee-okr/index.js +3 -1
- package/lib/components/grid-layout/util/network.js +4 -2
- package/lib/components/grid-page/personal-info/index.js +4 -4
- package/lib/components/guide-tip/index.js +4 -1
- package/lib/components/help-card/index.js +3 -1
- package/lib/components/help-card/request-api.js +4 -2
- package/lib/components/hr-header/index.js +4 -2
- package/lib/components/img-viewer/index.css +1 -1
- package/lib/components/import-modal/helper.js +1 -1
- package/lib/components/import-modal/request-api.js +6 -2
- package/lib/components/import-modal/search/search-dropdown/index.css +1 -1
- package/lib/components/import-modal/tree/okr-tree/search-form.js +2 -2
- package/lib/components/import-modal/tree/task-work-tree/index.js +3 -1
- package/lib/components/import-modal/tree-node/kr-node/index.css +1 -1
- package/lib/components/import-modal/tree-node/milestone-node/index.css +1 -1
- package/lib/components/import-modal/tree-node/work-node/index.js +3 -1
- package/lib/components/magnet/index.js +5 -0
- package/lib/components/mblog/index.js +3 -1
- package/lib/components/menus/components/menu-card/index.js +3 -1
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +7 -5
- package/lib/components/menus/export-modules/okr-menus/menus.js +3 -1
- package/lib/components/menus/export-modules/okr-menus/subordinate-menus/index.js +3 -1
- package/lib/components/menus/export-modules/research-menu/index.css +9 -0
- package/lib/components/menus/export-modules/research-menu/index.js +120 -0
- package/lib/components/menus/export-modules/research-menu/menu-highlight.js +44 -0
- package/lib/components/menus/export-modules/research-menu/menus.js +78 -0
- package/lib/components/menus/export-modules/research-menu/research-front-menus.js +158 -0
- package/lib/components/menus/export-modules/skynet-dashboard-menu/index.css +9 -0
- package/lib/components/menus/export-modules/skynet-dashboard-menu/index.js +120 -0
- package/lib/components/menus/export-modules/skynet-dashboard-menu/menu-highlight.js +52 -0
- package/lib/components/menus/export-modules/skynet-dashboard-menu/menus.js +80 -0
- package/lib/components/menus/export-modules/skynet-dashboard-menu/request-api.js +5 -0
- package/lib/components/menus/export-modules/skynet-dashboard-menu/survey-front-menus.js +178 -0
- package/lib/components/menus/export-modules/summary-menus/menu-highlight.js +8 -0
- package/lib/components/menus/export-modules/summary-menus/menus.js +13 -2
- package/lib/components/menus/export-modules/summary-menus/request-api.js +8 -2
- package/lib/components/menus/export-modules/summary-menus/subordinate-menus/index.js +3 -1
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +30 -8
- package/lib/components/menus/i18n.js +1 -0
- package/lib/components/menus/index.js +12 -0
- package/lib/components/menus/request-apis.js +4 -2
- package/lib/components/nav-top/components/app-center/images/research.png +0 -0
- package/lib/components/nav-top/components/app-center/index.css +11 -3
- package/lib/components/nav-top/components/app-center/index.js +13 -5
- package/lib/components/nav-top/components/menu/index.css +1 -1
- package/lib/components/nav-top/index.css +1 -1
- package/lib/components/nav-top/index.js +21 -11
- package/lib/components/nav-top/request.apis.js +6 -5
- package/lib/components/nav-top/utils.js +1 -1
- package/lib/components/okr-detail/base-info/base-info.css +1 -1
- package/lib/components/okr-detail/base-info/base-info.js +11 -15
- package/lib/components/okr-detail/base-info/other-infos/classify/index.css +1 -1
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.css +2 -2
- package/lib/components/okr-detail/base-info/other-infos/okr-type/index.css +1 -1
- package/lib/components/okr-detail/base-info/other-infos/principal/index.css +1 -1
- package/lib/components/okr-detail/base-info/other-infos/visibility/index.css +1 -1
- package/lib/components/okr-detail/components/ao-nice/index.css +1 -1
- package/lib/components/okr-detail/components/editable-input/index.css +1 -1
- package/lib/components/okr-detail/components/header/index.css +7 -7
- package/lib/components/okr-detail/components/icon-text/index.css +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.css +4 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/index.css +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.css +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.css +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.css +1 -1
- package/lib/components/okr-detail/components/score/index.css +1 -1
- package/lib/components/okr-detail/detail-footer/index.js +3 -1
- package/lib/components/okr-detail/detail-header/actions.js +3 -3
- package/lib/components/okr-detail/detail-header/index.js +3 -1
- package/lib/components/okr-detail/e-list/search-form/index.css +2 -2
- package/lib/components/okr-detail/index.js +6 -2
- package/lib/components/okr-detail/okr-list/empty/index.css +2 -2
- package/lib/components/okr-detail/okr-list/index.css +4 -4
- package/lib/components/okr-detail/request-apis.js +3 -1
- package/lib/components/okr-detail/schedule/components/detail-title/index.css +1 -1
- package/lib/components/okr-detail/schedule/components/kr-progress/index.css +2 -2
- package/lib/components/okr-detail/schedule/components/o-progress/index.css +7 -7
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +6 -2
- package/lib/components/okr-detail/schedule/components/sub-o-progress/index.css +1 -1
- package/lib/components/okr-detail/schedule/components/title/index.css +1 -1
- package/lib/components/okr-detail/schedule/util.js +3 -1
- package/lib/components/okr-excel/setting.js +6 -4
- package/lib/components/okr-filter-drawer/filter-form.js +3 -1
- package/lib/components/okr-flow/child-node/index.css +2 -2
- package/lib/components/okr-flow/empty/index.css +1 -1
- package/lib/components/okr-flow/open-data/index.js +3 -1
- package/lib/components/okr-flow/request-apis.js +4 -2
- package/lib/components/okr-flow/utils/config.js +7 -3
- package/lib/components/okr-guide/index.css +15 -17
- package/lib/components/okr-guide/index.js +3 -1
- package/lib/components/okr-progress/components/detail-title/index.css +1 -1
- package/lib/components/okr-progress/components/kr-progress/index.css +2 -2
- package/lib/components/okr-progress/components/o-progress/index.css +7 -7
- package/lib/components/okr-progress/components/o-progress/index.js +6 -2
- package/lib/components/okr-progress/components/sub-o-progress/index.css +1 -1
- package/lib/components/okr-progress/components/title/index.css +1 -1
- package/lib/components/okr-progress/util.js +3 -1
- package/lib/components/okr-progress-detail/index.css +1 -1
- package/lib/components/okr-progress-modal/index.css +2 -2
- package/lib/components/okr-progress-modal/request-apis.js +4 -2
- package/lib/components/okr-review/common.js +1 -1
- package/lib/components/okr-share/publishMblog.js +3 -1
- package/lib/components/okr-share/request-apis.js +4 -2
- package/lib/components/okrcase-library/index.css +1 -1
- package/lib/components/okrcase-library/index.js +3 -1
- package/lib/components/operation-records/index.js +56 -8
- package/lib/components/order-have-award/index.js +6 -2
- package/lib/components/part-notice/index.js +5 -1
- package/lib/components/password-input/index.css +1 -1
- package/lib/components/period-selector/helper/index.js +3 -1
- package/lib/components/photo-card/components/card/index.css +3 -3
- package/lib/components/photo-card/index.css +1 -1
- package/lib/components/point-demo/index.js +9 -7
- package/lib/components/point-demo/point-demo.js +5 -3
- package/lib/components/promise-confirm/index.js +3 -2
- package/lib/components/search-dropdown/index.css +1 -1
- package/lib/components/select-layer/index.css +1 -1
- package/lib/components/select-tags/index.js +5 -3
- package/lib/components/status-time/index.css +1 -1
- package/lib/components/stop-taking-modal/index.js +3 -1
- package/lib/components/superset-charts/utils/axios.js +4 -2
- package/lib/components/survey-model/index.js +7 -7
- package/lib/components/survey-model/instance.js +4 -2
- package/lib/components/switch/index.css +1 -1
- package/lib/components/tabs/index.css +1 -1
- package/lib/components/task-relation-modal/helper.js +1 -1
- package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +2 -2
- package/lib/components/task-relation-modal/okr-relation/request-api.js +3 -1
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +3 -1
- package/lib/components/task-relation-modal/request-api.js +3 -1
- package/lib/components/task-relation-modal/search/search-dropdown/index.css +1 -1
- package/lib/components/task-relation-modal/tree/category-tree/index.css +3 -3
- package/lib/components/task-relation-modal/tree/okr-tree/index.css +2 -2
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +3 -1
- package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +2 -2
- package/lib/components/task-relation-modal/tree/work-list/search-form.js +2 -2
- package/lib/components/task-relation-modal/tree/work-tree/index.css +2 -2
- package/lib/components/task-relation-modal/tree/work-tree/search-form.js +2 -2
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/kr-node/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +1 -1
- package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
- package/lib/components/task-tree/task-item-node/index.css +5 -5
- package/lib/components/textarea/index.js +4 -2
- package/lib/components/tooltip/index.css +1 -1
- package/lib/components/upload/index.js +4 -2
- package/lib/components/upvote/request-apis.js +4 -2
- package/lib/components/user-selector/empty/group.js +4 -2
- package/lib/components/user-selector/request-apis.js +4 -2
- package/lib/components/version-change-modal/index.css +2 -2
- package/lib/components/version-change-modal/index.js +6 -2
- package/lib/components/video-modal/index.js +3 -1
- package/lib/components/weekly-report/card.js +9 -9
- package/lib/components/word-cloud/request-apis.js +4 -2
- package/lib/index.js +8 -0
- package/lib/pages/aha2021/index.js +9 -9
- package/lib/pages/appointment-demo/drop-down-box/index.css +1 -1
- package/lib/pages/appointment-demo/input/index.css +1 -1
- package/lib/pages/group-management/components/input-form/index.css +1 -1
- package/lib/pages/group-management/components/openData/index.js +9 -3
- package/lib/pages/group-management/groupInterface.js +10 -4
- package/lib/pages/group-management/page-view/importGroupStaff/index.js +5 -3
- package/lib/pages/group-management/page-view/index.css +1 -1
- package/lib/pages/like-ranking/index.js +3 -1
- package/lib/pages/new-okr-list/header/index.js +10 -4
- package/lib/pages/new-okr-list/index.js +2 -41
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +3 -3
- package/lib/pages/okr-map/export-modules/okr-map/index.css +1 -1
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/index.css +1 -1
- package/lib/pages/okr-map/hooks/useStorage.js +3 -1
- package/lib/pages/okr-map/level2-search/index.css +1 -1
- package/lib/pages/okr-map/no-okr/index.css +1 -1
- package/lib/pages/okr-map/number-select/index.css +1 -1
- package/lib/pages/okr-map/open-data/index.js +3 -1
- package/lib/pages/okr-map/request-apis.js +4 -2
- package/lib/pages/okr-map/share-dialog/index.css +3 -3
- package/lib/pages/okr-map/unsupport-ie/index.css +1 -1
- package/lib/pages/okr-map/utils.js +10 -7
- package/lib/pages/personal-info/components/base-info/index.css +1 -1
- package/lib/pages/personal-info/components/person-photo/index.css +1 -1
- package/lib/utils/auth.js +22 -14
- package/lib/utils/bs-global.js +21 -8
- package/lib/utils/helpers.js +15 -5
- package/lib/utils/open-data.js +14 -6
- package/lib/utils/platform.js +15 -5
- package/lib/utils/request-v1.js +9 -3
- package/lib/utils/request.js +3 -3
- package/package.json +2 -3
|
@@ -0,0 +1,120 @@
|
|
|
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 _flipMenuCard = _interopRequireDefault(require("../../components/flip-menu-card"));
|
|
17
|
+
|
|
18
|
+
var _surveyFrontMenus = _interopRequireDefault(require("./survey-front-menus"));
|
|
19
|
+
|
|
20
|
+
var _context = require("../../context");
|
|
21
|
+
|
|
22
|
+
var _precls = _interopRequireDefault(require("../../precls"));
|
|
23
|
+
|
|
24
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
25
|
+
|
|
26
|
+
require("../../index.css");
|
|
27
|
+
|
|
28
|
+
require("./index.css");
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39
|
+
|
|
40
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
41
|
+
|
|
42
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
43
|
+
|
|
44
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
function SurveyMenus(props) {
|
|
49
|
+
var _props$onSelect = props.onSelect,
|
|
50
|
+
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
|
|
51
|
+
history = props.history;
|
|
52
|
+
|
|
53
|
+
var _useState = (0, _react.useState)({}),
|
|
54
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
55
|
+
flipOptions = _useState2[0],
|
|
56
|
+
setFlipOptions = _useState2[1];
|
|
57
|
+
|
|
58
|
+
var _useState3 = (0, _react.useState)(""),
|
|
59
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
60
|
+
flipBackType = _useState4[0],
|
|
61
|
+
setFlipBackType = _useState4[1];
|
|
62
|
+
|
|
63
|
+
var surveyFrontMenu = (0, _react.useRef)();
|
|
64
|
+
var menuRef = (0, _react.useRef)();
|
|
65
|
+
var flipRef = (0, _react.useRef)({
|
|
66
|
+
next: function next() {},
|
|
67
|
+
goback: function goback() {}
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
var flipGoNext = function flipGoNext(opt) {
|
|
71
|
+
setFlipBackType(opt.type);
|
|
72
|
+
setFlipOptions(opt.options);
|
|
73
|
+
flipRef.current.next();
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var collapseMenu = function collapseMenu(isHide) {
|
|
77
|
+
if (isHide) {
|
|
78
|
+
menuRef.current.style.width = "0px";
|
|
79
|
+
} else {
|
|
80
|
+
menuRef.current.style.width = "";
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
var onFlipChangeHandler = function onFlipChangeHandler(isBack) {
|
|
85
|
+
if (!isBack) {
|
|
86
|
+
// 返回,取消菜单的高亮
|
|
87
|
+
surveyFrontMenu.current.setSelectedMenuKeys([]);
|
|
88
|
+
setTimeout(function () {
|
|
89
|
+
return (// 正面时销毁背面
|
|
90
|
+
setFlipBackType("")
|
|
91
|
+
);
|
|
92
|
+
}, 600);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return /*#__PURE__*/_react["default"].createElement(_context.FlipContext.Provider, {
|
|
97
|
+
value: {
|
|
98
|
+
flipGoNext: flipGoNext
|
|
99
|
+
}
|
|
100
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
101
|
+
ref: menuRef,
|
|
102
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "-survey-menus"))
|
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement(_flipMenuCard["default"], {
|
|
104
|
+
ref: flipRef,
|
|
105
|
+
collapseMenu: collapseMenu,
|
|
106
|
+
defaultWidth: _getLocale.isEn ? 210 : 180,
|
|
107
|
+
onChange: onFlipChangeHandler
|
|
108
|
+
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_surveyFrontMenus["default"], {
|
|
109
|
+
ref: surveyFrontMenu,
|
|
110
|
+
onSelect: onSelect,
|
|
111
|
+
history: history
|
|
112
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
113
|
+
className: (0, _classnames["default"])("tita-bootstrap__scrollbar")
|
|
114
|
+
}))));
|
|
115
|
+
} // @ts-ignore
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
var _default = (0, _reactRouter.withRouter)(SurveyMenus);
|
|
119
|
+
|
|
120
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.isEvaluationManage()) {
|
|
28
|
+
cb(_menus.PAGE_SURVEY_MANAGE);
|
|
29
|
+
} else if (this.isMyInvolved()) {
|
|
30
|
+
cb(_menus.PAGE_SURVEY_MY_INVOLVED);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
key: "isMyInvolved",
|
|
37
|
+
value: function isMyInvolved() {
|
|
38
|
+
var pathname = this.history.location.pathname;
|
|
39
|
+
return pathname.match(/survey\/my-involved/);
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "isEvaluationManage",
|
|
43
|
+
value: function isEvaluationManage() {
|
|
44
|
+
var pathname = this.history.location.pathname;
|
|
45
|
+
return pathname.match(/survey\/manage/);
|
|
46
|
+
}
|
|
47
|
+
}]);
|
|
48
|
+
|
|
49
|
+
return _default;
|
|
50
|
+
}();
|
|
51
|
+
|
|
52
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultRefObject = exports["default"] = exports.PAGE_SURVEY_MY_INVOLVED = exports.PAGE_SURVEY_MANAGE = void 0;
|
|
7
|
+
|
|
8
|
+
var _index = require("../../components/menu-tree/tree-node/index");
|
|
9
|
+
|
|
10
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
11
|
+
|
|
12
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
+
|
|
14
|
+
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); } }
|
|
15
|
+
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
|
|
18
|
+
var defaultRefObject = {
|
|
19
|
+
menus: [],
|
|
20
|
+
getMenus: function getMenus() {}
|
|
21
|
+
};
|
|
22
|
+
exports.defaultRefObject = defaultRefObject;
|
|
23
|
+
var PAGE_SURVEY_MANAGE = 'surveymanage';
|
|
24
|
+
exports.PAGE_SURVEY_MANAGE = PAGE_SURVEY_MANAGE;
|
|
25
|
+
var PAGE_SURVEY_MY_INVOLVED = 'surveymyinvolved';
|
|
26
|
+
exports.PAGE_SURVEY_MY_INVOLVED = PAGE_SURVEY_MY_INVOLVED;
|
|
27
|
+
|
|
28
|
+
var surveyMenus = /*#__PURE__*/function () {
|
|
29
|
+
function surveyMenus(props) {
|
|
30
|
+
_classCallCheck(this, surveyMenus);
|
|
31
|
+
|
|
32
|
+
this.menus = [{
|
|
33
|
+
icon: 'survey-involved',
|
|
34
|
+
label: '活跃度统计',
|
|
35
|
+
key: PAGE_SURVEY_MY_INVOLVED,
|
|
36
|
+
type: _index.MENU_ITEM_NOE,
|
|
37
|
+
href: '#/skynet-dashboard',
|
|
38
|
+
isShow: true
|
|
39
|
+
}];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
_createClass(surveyMenus, [{
|
|
43
|
+
key: "getMenus",
|
|
44
|
+
value: function getMenus() {
|
|
45
|
+
var menus = this.formateToTreeNodeData(this.menus.filter(function (it) {
|
|
46
|
+
return it.isShow == true;
|
|
47
|
+
}));
|
|
48
|
+
return menus;
|
|
49
|
+
}
|
|
50
|
+
}, {
|
|
51
|
+
key: "formateToTreeNodeData",
|
|
52
|
+
value: function formateToTreeNodeData(menus) {
|
|
53
|
+
var pid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
54
|
+
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
55
|
+
var treeNodes = [];
|
|
56
|
+
|
|
57
|
+
for (var i = 0; i < menus.length; i++) {
|
|
58
|
+
var menu = menus[i];
|
|
59
|
+
var hasChildren = !!(menu.children && menu.children.length);
|
|
60
|
+
var isLeaf = menu.isLeaf !== undefined ? menu.isLeaf : !hasChildren;
|
|
61
|
+
var nodeType = menu.type;
|
|
62
|
+
if (!nodeType) nodeType = !isLeaf ? _index.PARENT_MENU_NODE : _index.SUB_MENU_ITEM_NOE;
|
|
63
|
+
treeNodes.push({
|
|
64
|
+
key: "".concat(menu.key),
|
|
65
|
+
title: (0, _getLocale.getLocale)(menu.label) ? (0, _getLocale.getLocale)(menu.label) : menu.label,
|
|
66
|
+
data: menu.data || menu,
|
|
67
|
+
isLeaf: isLeaf,
|
|
68
|
+
children: this.formateToTreeNodeData(menu.children || [], level + 1, menu.key),
|
|
69
|
+
nodeType: nodeType
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return treeNodes;
|
|
74
|
+
}
|
|
75
|
+
}]);
|
|
76
|
+
|
|
77
|
+
return surveyMenus;
|
|
78
|
+
}();
|
|
79
|
+
|
|
80
|
+
exports["default"] = surveyMenus;
|
|
@@ -0,0 +1,178 @@
|
|
|
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 _menus = _interopRequireWildcard(require("./menus"));
|
|
19
|
+
|
|
20
|
+
var _menuHighlight = _interopRequireDefault(require("./menu-highlight"));
|
|
21
|
+
|
|
22
|
+
var _auth = require("../../../../utils/auth");
|
|
23
|
+
|
|
24
|
+
require("../../index.css");
|
|
25
|
+
|
|
26
|
+
require("./index.css");
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
|
+
|
|
30
|
+
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); }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; } } }; }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39
|
+
|
|
40
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
41
|
+
|
|
42
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
43
|
+
|
|
44
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
49
|
+
var _props$onSelect = props.onSelect,
|
|
50
|
+
onSelect = _props$onSelect === void 0 ? function () {} : _props$onSelect,
|
|
51
|
+
history = props.history;
|
|
52
|
+
var baseAuth = new _auth.BaseAuth();
|
|
53
|
+
var isShowSurveyManage = baseAuth.isBoss() || baseAuth.isSurveyManager();
|
|
54
|
+
|
|
55
|
+
var _useState = (0, _react.useState)(function () {
|
|
56
|
+
return document.body.offsetHeight - 198;
|
|
57
|
+
}),
|
|
58
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
+
maxHeight = _useState2[0],
|
|
60
|
+
setMaxHeight = _useState2[1];
|
|
61
|
+
|
|
62
|
+
var _useState3 = (0, _react.useState)(['myokr']),
|
|
63
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
64
|
+
expandedKeys = _useState4[0],
|
|
65
|
+
setExpandedKeys = _useState4[1];
|
|
66
|
+
|
|
67
|
+
var _useState5 = (0, _react.useState)([]),
|
|
68
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
69
|
+
selectedMenuKeys = _useState6[0],
|
|
70
|
+
setSelectedMenuKeys = _useState6[1];
|
|
71
|
+
|
|
72
|
+
var flipRef = (0, _react.useRef)({
|
|
73
|
+
next: function next() {},
|
|
74
|
+
goback: function goback() {}
|
|
75
|
+
});
|
|
76
|
+
var surveyMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
77
|
+
|
|
78
|
+
var _useState7 = (0, _react.useState)(function () {
|
|
79
|
+
surveyMenusData.current = new _menus["default"]({
|
|
80
|
+
isShowSurveyManage: isShowSurveyManage
|
|
81
|
+
});
|
|
82
|
+
return surveyMenusData.current.getMenus();
|
|
83
|
+
}),
|
|
84
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
85
|
+
menus = _useState8[0],
|
|
86
|
+
setMenus = _useState8[1]; // 判断路由高亮菜单
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
(0, _react.useEffect)(function () {
|
|
90
|
+
var menuHighlight = new _menuHighlight["default"](history);
|
|
91
|
+
menuHighlight.highlight(function (menu) {
|
|
92
|
+
return changeHighlightMenu([menu]);
|
|
93
|
+
});
|
|
94
|
+
var pathname = history.location.pathname;
|
|
95
|
+
var firstMenuHref = menus[0].data.href;
|
|
96
|
+
if (firstMenuHref.split('#')[1] === pathname) return; //当前路由与二级菜单第一项相同时直接return
|
|
97
|
+
|
|
98
|
+
var menusHrefArr = ['/survey/manage', '/survey/my-involved'];
|
|
99
|
+
var isIncludeMenu = menusHrefArr.find(function (item) {
|
|
100
|
+
//表示当前路由是否是左侧二级菜单的选项
|
|
101
|
+
return item.includes(pathname);
|
|
102
|
+
});
|
|
103
|
+
if (!isIncludeMenu) return; //如果不是二级菜单选项直接return
|
|
104
|
+
|
|
105
|
+
var isShowMenuItem = menus.find(function (item) {
|
|
106
|
+
//判断当前路由是否有权限被展示
|
|
107
|
+
return item.data.href.split('#')[1].includes(pathname);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
if (!isShowMenuItem) {
|
|
111
|
+
//如果当前路由没有权限展示的话,则跳转到有权限二级路由的第一项
|
|
112
|
+
window.location.href = firstMenuHref;
|
|
113
|
+
}
|
|
114
|
+
}, [history.location.pathname, history.location.search]);
|
|
115
|
+
|
|
116
|
+
var changeHighlightMenu = function changeHighlightMenu(menuKeys) {
|
|
117
|
+
setSelectedMenuKeys(menuKeys);
|
|
118
|
+
flipRef.current.goback();
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
|
|
122
|
+
var node = _ref.node;
|
|
123
|
+
onSelect(node); // 处理菜单选中
|
|
124
|
+
|
|
125
|
+
if (!selectedKyes.length) {
|
|
126
|
+
return;
|
|
127
|
+
} else {
|
|
128
|
+
setSelectedMenuKeys(selectedKyes);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
var onExpandHandler = function onExpandHandler(expandKeys, _ref2) {
|
|
133
|
+
var expanded = _ref2.expanded,
|
|
134
|
+
node = _ref2.node;
|
|
135
|
+
setExpandedKeys(expandKeys);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
139
|
+
return {
|
|
140
|
+
setSelectedMenuKeys: setSelectedMenuKeys
|
|
141
|
+
};
|
|
142
|
+
});
|
|
143
|
+
(0, _react.useEffect)(function () {
|
|
144
|
+
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
145
|
+
var _iterator = _createForOfIteratorHelper(entries),
|
|
146
|
+
_step;
|
|
147
|
+
|
|
148
|
+
try {
|
|
149
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
150
|
+
var entry = _step.value;
|
|
151
|
+
var cr = entry.contentRect;
|
|
152
|
+
setMaxHeight(cr.height - 198);
|
|
153
|
+
}
|
|
154
|
+
} catch (err) {
|
|
155
|
+
_iterator.e(err);
|
|
156
|
+
} finally {
|
|
157
|
+
_iterator.f();
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
obs.observe(document.body);
|
|
161
|
+
return function () {
|
|
162
|
+
obs.unobserve(document.body);
|
|
163
|
+
};
|
|
164
|
+
}, []);
|
|
165
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
166
|
+
style: {
|
|
167
|
+
maxHeight: maxHeight
|
|
168
|
+
}
|
|
169
|
+
}, /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|
|
170
|
+
data: menus,
|
|
171
|
+
selectedKeys: selectedMenuKeys,
|
|
172
|
+
expandedKeys: expandedKeys,
|
|
173
|
+
onSelect: onSelectHandler,
|
|
174
|
+
onExpand: onExpandHandler
|
|
175
|
+
})));
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
exports["default"] = _default;
|
|
@@ -38,6 +38,8 @@ var _default = /*#__PURE__*/function () {
|
|
|
38
38
|
cb(_menus.PAGE_SUMMARY_SUBORDINATE);
|
|
39
39
|
} else if (this.isSummaryDashboard()) {
|
|
40
40
|
cb(_menus.PAGE_SUMMARY_DASHBOARD);
|
|
41
|
+
} else if (this.isSummaryTemplate()) {
|
|
42
|
+
cb(_menus.PAGE_SUMMARY_TEMPLATE);
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
return null;
|
|
@@ -84,6 +86,12 @@ var _default = /*#__PURE__*/function () {
|
|
|
84
86
|
var pathname = this.history.location.pathname;
|
|
85
87
|
return pathname.match(/summary\/dashboard/);
|
|
86
88
|
}
|
|
89
|
+
}, {
|
|
90
|
+
key: "isSummaryTemplate",
|
|
91
|
+
value: function isSummaryTemplate() {
|
|
92
|
+
var pathname = this.history.location.pathname;
|
|
93
|
+
return pathname.match(/summary\/template\/page/);
|
|
94
|
+
}
|
|
87
95
|
}]);
|
|
88
96
|
|
|
89
97
|
return _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.defaultRefObject = exports["default"] = exports.PAGE_SUMMARY_TONGJI = exports.PAGE_SUMMARY_SUBORDINATE = exports.PAGE_SUMMARY_SHARE = exports.PAGE_SUMMARY_ROLE = exports.PAGE_SUMMARY_MY = exports.PAGE_SUMMARY_DEPART = exports.PAGE_SUMMARY_DASHBOARD = exports.PAGE_SUMMARY_CHART = exports.PAGE_SUMMARY_ALl = void 0;
|
|
6
|
+
exports.defaultRefObject = exports["default"] = exports.PAGE_SUMMARY_TONGJI = exports.PAGE_SUMMARY_TEMPLATE = exports.PAGE_SUMMARY_SUBORDINATE = exports.PAGE_SUMMARY_SHARE = exports.PAGE_SUMMARY_ROLE = exports.PAGE_SUMMARY_MY = exports.PAGE_SUMMARY_DEPART = exports.PAGE_SUMMARY_DASHBOARD = exports.PAGE_SUMMARY_CHART = exports.PAGE_SUMMARY_ALl = void 0;
|
|
7
7
|
|
|
8
8
|
var _i18n = require("../../i18n");
|
|
9
9
|
|
|
@@ -57,6 +57,8 @@ var PAGE_SUMMARY_DASHBOARD = 'dashboard';
|
|
|
57
57
|
exports.PAGE_SUMMARY_DASHBOARD = PAGE_SUMMARY_DASHBOARD;
|
|
58
58
|
var PAGE_SUMMARY_TONGJI = 'tongji';
|
|
59
59
|
exports.PAGE_SUMMARY_TONGJI = PAGE_SUMMARY_TONGJI;
|
|
60
|
+
var PAGE_SUMMARY_TEMPLATE = 'template';
|
|
61
|
+
exports.PAGE_SUMMARY_TEMPLATE = PAGE_SUMMARY_TEMPLATE;
|
|
60
62
|
|
|
61
63
|
var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
62
64
|
IsLeader = _getUserInfo.IsLeader,
|
|
@@ -70,6 +72,8 @@ var isShowManage = IsPlanDailyManager || IsBoss || HasSub || IsRoot && Role !==
|
|
|
70
72
|
|
|
71
73
|
var summaryMenus = /*#__PURE__*/function () {
|
|
72
74
|
function summaryMenus(props) {
|
|
75
|
+
var _window$BSGlobal$logi;
|
|
76
|
+
|
|
73
77
|
_classCallCheck(this, summaryMenus);
|
|
74
78
|
|
|
75
79
|
this.COMPANYALL = _index.COMPANY_ALL_NODE;
|
|
@@ -99,7 +103,7 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
99
103
|
isLeaf: false,
|
|
100
104
|
children: [],
|
|
101
105
|
href: "#/summary/subordinates",
|
|
102
|
-
isShow: window.BSGlobal.loginUserInfo.HasSub
|
|
106
|
+
isShow: (_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.HasSub
|
|
103
107
|
}, {
|
|
104
108
|
icon: "caidan-tongji",
|
|
105
109
|
label: _i18n.locale.menu_summary_tongji,
|
|
@@ -146,6 +150,13 @@ var summaryMenus = /*#__PURE__*/function () {
|
|
|
146
150
|
type: _index.MENU_ITEM_NOE,
|
|
147
151
|
href: '#/summary/dashboard',
|
|
148
152
|
isShow: props.isShowDashboard
|
|
153
|
+
}, {
|
|
154
|
+
icon: 'template',
|
|
155
|
+
label: _i18n.locale.menu_summary_template,
|
|
156
|
+
key: PAGE_SUMMARY_TEMPLATE,
|
|
157
|
+
type: _index.MENU_ITEM_NOE,
|
|
158
|
+
href: '#/summary/template/page',
|
|
159
|
+
isShow: props.isShowTemplate
|
|
149
160
|
}, {
|
|
150
161
|
icon: "my-setup",
|
|
151
162
|
label: _i18n.locale.menu_summary_role,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getShareStatus = void 0;
|
|
6
|
+
exports.getTemplateUserRole = exports.getShareStatus = void 0;
|
|
7
7
|
|
|
8
8
|
var _request = require("@titaui/request");
|
|
9
9
|
|
|
@@ -14,4 +14,10 @@ var getShareStatus = function getShareStatus() {
|
|
|
14
14
|
return (0, _request.rget)('v1')("summary/getShareUsers?toUserId=".concat(loginUser.Id));
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
exports.getShareStatus = getShareStatus;
|
|
17
|
+
exports.getShareStatus = getShareStatus;
|
|
18
|
+
|
|
19
|
+
var getTemplateUserRole = function getTemplateUserRole() {
|
|
20
|
+
return (0, _request.rget)('v1')('summaryTemplate/userRole');
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.getTemplateUserRole = getTemplateUserRole;
|
|
@@ -50,6 +50,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
50
50
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
51
|
|
|
52
52
|
function _default(props) {
|
|
53
|
+
var _window$BSGlobal$logi;
|
|
54
|
+
|
|
53
55
|
var toUserId = props.toUserId;
|
|
54
56
|
var loadedNode = (0, _react.useRef)([]);
|
|
55
57
|
|
|
@@ -77,7 +79,7 @@ function _default(props) {
|
|
|
77
79
|
selectedMenuKeys = _useState10[0],
|
|
78
80
|
setSelectedMenuKeys = _useState10[1];
|
|
79
81
|
|
|
80
|
-
var _useState11 = (0, _react.useState)(window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0),
|
|
82
|
+
var _useState11 = (0, _react.useState)(window.BSGlobal && ((_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id) || 0),
|
|
81
83
|
_useState12 = _slicedToArray(_useState11, 1),
|
|
82
84
|
loginUserId = _useState12[0];
|
|
83
85
|
|
|
@@ -29,6 +29,8 @@ var _context = require("../../context");
|
|
|
29
29
|
|
|
30
30
|
var _auth = require("../../../../utils/auth");
|
|
31
31
|
|
|
32
|
+
var _helpers = require("../../../../utils/helpers");
|
|
33
|
+
|
|
32
34
|
require("../../index.css");
|
|
33
35
|
|
|
34
36
|
require("./index.css");
|
|
@@ -86,25 +88,32 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
86
88
|
isShowTongji = _useState10[0],
|
|
87
89
|
setIsShowTongji = _useState10[1];
|
|
88
90
|
|
|
91
|
+
var _useState11 = (0, _react.useState)(false),
|
|
92
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
93
|
+
isShowTemplate = _useState12[0],
|
|
94
|
+
setIsShowTemplate = _useState12[1];
|
|
95
|
+
|
|
89
96
|
var isShowDepartment = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isDepartmentLeader() || baseAuth.isHrbp();
|
|
90
|
-
var isShowDashboard = baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isHrbp();
|
|
97
|
+
var isShowDashboard = (baseAuth.isBoss() || baseAuth.isAssistant() || baseAuth.isPlanDailyManager() || baseAuth.isDepartmentLeader() || baseAuth.isHrbp()) && !(0, _helpers.getTenantInfo)().isLocal; // isLocal = 本地化部署,不展示仪表盘
|
|
98
|
+
|
|
91
99
|
var flipRef = (0, _react.useRef)({
|
|
92
100
|
next: function next() {},
|
|
93
101
|
goback: function goback() {}
|
|
94
102
|
});
|
|
95
103
|
var summaryMenusData = (0, _react.useRef)(_menus.defaultRefObject);
|
|
96
104
|
|
|
97
|
-
var
|
|
105
|
+
var _useState13 = (0, _react.useState)(function () {
|
|
98
106
|
summaryMenusData.current = new _menus["default"]({
|
|
99
107
|
isShowShare: false,
|
|
100
108
|
isShowTongji: false,
|
|
101
|
-
isShowDept: true
|
|
109
|
+
isShowDept: true,
|
|
110
|
+
isShowTemplate: false
|
|
102
111
|
});
|
|
103
112
|
return summaryMenusData.current.getMenus();
|
|
104
113
|
}),
|
|
105
|
-
|
|
106
|
-
menus =
|
|
107
|
-
setMenus =
|
|
114
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
115
|
+
menus = _useState14[0],
|
|
116
|
+
setMenus = _useState14[1]; // 判断路由高亮菜单
|
|
108
117
|
|
|
109
118
|
|
|
110
119
|
(0, _react.useEffect)(function () {
|
|
@@ -281,11 +290,12 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
281
290
|
isShowShare: isShowShare,
|
|
282
291
|
isShowTongji: isShowTongji,
|
|
283
292
|
isShowDept: isShowDepartment,
|
|
284
|
-
isShowDashboard: isShowDashboard
|
|
293
|
+
isShowDashboard: isShowDashboard,
|
|
294
|
+
isShowTemplate: isShowTemplate
|
|
285
295
|
});
|
|
286
296
|
summaryMenusData.current = newMenu;
|
|
287
297
|
setMenus(newMenu.getMenus());
|
|
288
|
-
}, [isShowShare, isShowDepartment, isShowDashboard, isShowTongji]);
|
|
298
|
+
}, [isShowShare, isShowDepartment, isShowDashboard, isShowTongji, isShowTemplate]);
|
|
289
299
|
(0, _react.useEffect)(function () {
|
|
290
300
|
(0, _requestApi.getShareStatus)().then(function (resp) {
|
|
291
301
|
if (resp.Code === 1) {
|
|
@@ -299,6 +309,18 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
299
309
|
setIsShowTongji(true);
|
|
300
310
|
}
|
|
301
311
|
});
|
|
312
|
+
(0, _requestApi.getTemplateUserRole)().then(function (res) {
|
|
313
|
+
//0普通人不可以查看,1超管老板助理,2总结管理员,3模板管理员
|
|
314
|
+
console.log(res);
|
|
315
|
+
|
|
316
|
+
if (res.Code === 1) {
|
|
317
|
+
if (res.Data.userTempRoles[0] === 0) {
|
|
318
|
+
setIsShowTemplate(false);
|
|
319
|
+
} else {
|
|
320
|
+
setIsShowTemplate(true);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
});
|
|
302
324
|
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
303
325
|
var _iterator = _createForOfIteratorHelper(entries),
|
|
304
326
|
_step;
|
|
@@ -60,6 +60,7 @@ var I18N = /*#__PURE__*/_createClass(function I18N() {
|
|
|
60
60
|
this.menu_summary = 'Rep_NewS_Management';
|
|
61
61
|
this.menu_summary_dashboard = 'Rep_Das_Dashboard';
|
|
62
62
|
this.menu_summary_tongji = 'HP_MyPeer';
|
|
63
|
+
this.menu_summary_template = 'Rep_Tab_SummTemplates';
|
|
63
64
|
});
|
|
64
65
|
|
|
65
66
|
var locale = new I18N();
|
|
@@ -25,6 +25,10 @@ var _summaryMenus = _interopRequireDefault(require("./export-modules/summary-men
|
|
|
25
25
|
|
|
26
26
|
var _surveyMenu = _interopRequireDefault(require("./export-modules/survey-menu"));
|
|
27
27
|
|
|
28
|
+
var _skynetDashboardMenu = _interopRequireDefault(require("./export-modules/skynet-dashboard-menu"));
|
|
29
|
+
|
|
30
|
+
var _researchMenu = _interopRequireDefault(require("./export-modules/research-menu"));
|
|
31
|
+
|
|
28
32
|
var _excluded = ["type"];
|
|
29
33
|
|
|
30
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -68,6 +72,14 @@ var Menus = function Menus(props) {
|
|
|
68
72
|
return /*#__PURE__*/_react["default"].createElement(_surveyMenu["default"], restProps);
|
|
69
73
|
}
|
|
70
74
|
|
|
75
|
+
if (type === 'skynet-dashboard') {
|
|
76
|
+
return /*#__PURE__*/_react["default"].createElement(_skynetDashboardMenu["default"], restProps);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (type === 'research') {
|
|
80
|
+
return /*#__PURE__*/_react["default"].createElement(_researchMenu["default"], restProps);
|
|
81
|
+
}
|
|
82
|
+
|
|
71
83
|
return undefined;
|
|
72
84
|
};
|
|
73
85
|
|