@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
|
@@ -9,6 +9,8 @@ var _request = require("@titaui/request");
|
|
|
9
9
|
|
|
10
10
|
var _helpers = require("../../utils/helpers");
|
|
11
11
|
|
|
12
|
+
var _getLoginUserInfo2;
|
|
13
|
+
|
|
12
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
15
|
|
|
14
16
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -84,6 +86,8 @@ var getUserById = function getUserById(userId) {
|
|
|
84
86
|
exports.getUserById = getUserById;
|
|
85
87
|
|
|
86
88
|
var workData = function workData(params, pageNum, pageSize) {
|
|
89
|
+
var _getLoginUserInfo;
|
|
90
|
+
|
|
87
91
|
var _params$keyWords2 = params.keyWords,
|
|
88
92
|
keyWords = _params$keyWords2 === void 0 ? "" : _params$keyWords2,
|
|
89
93
|
_params$status = params.status,
|
|
@@ -91,7 +95,7 @@ var workData = function workData(params, pageNum, pageSize) {
|
|
|
91
95
|
_params$relation = params.relation,
|
|
92
96
|
relation = _params$relation === void 0 ? 0 : _params$relation,
|
|
93
97
|
userIds = params.userIds;
|
|
94
|
-
var url = "work/list?toUserId=".concat(userIds || (0, _helpers.getLoginUserInfo)().Id);
|
|
98
|
+
var url = "work/list?toUserId=".concat(userIds || ((_getLoginUserInfo = (0, _helpers.getLoginUserInfo)()) === null || _getLoginUserInfo === void 0 ? void 0 : _getLoginUserInfo.Id));
|
|
95
99
|
return (0, _request.rpost)("v1")(url, {
|
|
96
100
|
keyWords: keyWords,
|
|
97
101
|
orderType: 1,
|
|
@@ -118,7 +122,7 @@ var dealMessage = function dealMessage(res) {
|
|
|
118
122
|
}
|
|
119
123
|
};
|
|
120
124
|
|
|
121
|
-
var id = (0, _helpers.getLoginUserInfo)().Id;
|
|
125
|
+
var id = (_getLoginUserInfo2 = (0, _helpers.getLoginUserInfo)()) === null || _getLoginUserInfo2 === void 0 ? void 0 : _getLoginUserInfo2.Id;
|
|
122
126
|
|
|
123
127
|
var planTableTask = function planTableTask(params, pageNum, pageSize) {
|
|
124
128
|
var url = "task/search";
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
.titaui-search-dropdown__text {
|
|
24
24
|
display: inline-block;
|
|
25
|
-
font-family:
|
|
25
|
+
font-family: OPPOSans, Arial, Verdana, Helvetica Neue, Helvetica, PingFang SC, Microsoft YaHei, sans-serif;
|
|
26
26
|
font-size: 14px;
|
|
27
27
|
line-height: 16px;
|
|
28
28
|
color: #3f4755;
|
|
@@ -61,8 +61,8 @@ function SearchForm(props) {
|
|
|
61
61
|
var loginUser = (0, _helpers.getLoginUserInfo)();
|
|
62
62
|
var KRSettings = (0, _bsGlobal.getOkrAdvancedSetting)().KRSetting;
|
|
63
63
|
var user = {
|
|
64
|
-
userId: loginUser.Id,
|
|
65
|
-
name: loginUser.Name,
|
|
64
|
+
userId: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Id,
|
|
65
|
+
name: loginUser === null || loginUser === void 0 ? void 0 : loginUser.Name,
|
|
66
66
|
avatar: {
|
|
67
67
|
original: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar = loginUser.UserAvatar) === null || _loginUser$UserAvatar === void 0 ? void 0 : _loginUser$UserAvatar.Original,
|
|
68
68
|
color: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar2 = loginUser.UserAvatar) === null || _loginUser$UserAvatar2 === void 0 ? void 0 : _loginUser$UserAvatar2.Color,
|
|
@@ -59,7 +59,9 @@ var TaskWorkTree = function TaskWorkTree(_ref) {
|
|
|
59
59
|
|
|
60
60
|
var handleName = function handleName(id) {
|
|
61
61
|
if (isWork) {
|
|
62
|
-
|
|
62
|
+
var _getLoginUserInfo;
|
|
63
|
+
|
|
64
|
+
window.open("#work?work_id=".concat(id, "&to_user_id=").concat((_getLoginUserInfo = (0, _helpers.getLoginUserInfo)()) === null || _getLoginUserInfo === void 0 ? void 0 : _getLoginUserInfo.Id, "&status=1"));
|
|
63
65
|
} else {
|
|
64
66
|
window.Talent.app.vent.trigger('global-pull-screen', id, 'task');
|
|
65
67
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
color: #6f7886;
|
|
3
3
|
font-size: 13px;
|
|
4
4
|
line-height: 18px;
|
|
5
|
-
font-family:
|
|
5
|
+
font-family: OPPOSans, Arial, Verdana, Helvetica Neue, Helvetica, PingFang SC, Microsoft YaHei, sans-serif;
|
|
6
6
|
display: flex;
|
|
7
7
|
position: relative;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
color: #6f7886;
|
|
3
3
|
font-size: 13px;
|
|
4
4
|
line-height: 18px;
|
|
5
|
-
font-family:
|
|
5
|
+
font-family: OPPOSans, Arial, Verdana, Helvetica Neue, Helvetica, PingFang SC, Microsoft YaHei, sans-serif;
|
|
6
6
|
display: flex;
|
|
7
7
|
position: relative;
|
|
8
8
|
}
|
|
@@ -44,7 +44,9 @@ function WorkNode(props) {
|
|
|
44
44
|
var PrincipalUser = data.PrincipalUser;
|
|
45
45
|
|
|
46
46
|
var gotoWorkDetail = function gotoWorkDetail() {
|
|
47
|
-
|
|
47
|
+
var _getLoginUserInfo;
|
|
48
|
+
|
|
49
|
+
window.open("#work?work_id=".concat(data.WorkId, "&to_user_id=").concat((_getLoginUserInfo = (0, _helpers.getLoginUserInfo)()) === null || _getLoginUserInfo === void 0 ? void 0 : _getLoginUserInfo.Id, "&status=1"));
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
var onCheckHandler = function onCheckHandler(checked) {
|
|
@@ -126,8 +126,13 @@ var Magnet = function Magnet(_ref) {
|
|
|
126
126
|
y: newY
|
|
127
127
|
});
|
|
128
128
|
});
|
|
129
|
+
var stopPop = (0, _react.useCallback)(function (e) {
|
|
130
|
+
e.stopPropagation();
|
|
131
|
+
e.preventDefault();
|
|
132
|
+
}, []);
|
|
129
133
|
return /*#__PURE__*/_react["default"].createElement(_web.animated.div, _extends({
|
|
130
134
|
ref: dragItemRef,
|
|
135
|
+
onDragStart: stopPop,
|
|
131
136
|
className: "".concat(preCls, " ").concat(className),
|
|
132
137
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
133
138
|
x: x,
|
|
@@ -63,12 +63,14 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
|
|
|
63
63
|
var _super = _createSuper(MBlog);
|
|
64
64
|
|
|
65
65
|
function MBlog(props) {
|
|
66
|
+
var _BSGlobal$loginUserIn, _BSGlobal$loginUserIn2, _BSGlobal$loginUserIn3;
|
|
67
|
+
|
|
66
68
|
var _this;
|
|
67
69
|
|
|
68
70
|
_classCallCheck(this, MBlog);
|
|
69
71
|
|
|
70
72
|
_this = _super.call(this, props);
|
|
71
|
-
_this.isManager = BSGlobal.loginUserInfo.IsRoot || BSGlobal.loginUserInfo.IsBoss || BSGlobal.loginUserInfo.IsOkrManager;
|
|
73
|
+
_this.isManager = ((_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.IsRoot) || ((_BSGlobal$loginUserIn2 = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn2 === void 0 ? void 0 : _BSGlobal$loginUserIn2.IsBoss) || ((_BSGlobal$loginUserIn3 = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn3 === void 0 ? void 0 : _BSGlobal$loginUserIn3.IsOkrManager);
|
|
72
74
|
_this.previewid = (0, _uuid["default"])();
|
|
73
75
|
|
|
74
76
|
_this.getTextareaValue = function () {
|
|
@@ -40,10 +40,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
40
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
41
|
|
|
42
42
|
function _default(props) {
|
|
43
|
+
var _window$BSGlobal$tena;
|
|
44
|
+
|
|
43
45
|
var children = props.children,
|
|
44
46
|
style = props.style;
|
|
45
47
|
|
|
46
|
-
var _useState = (0, _react.useState)(window.BSGlobal.tenantAuthentication.Version == 1),
|
|
48
|
+
var _useState = (0, _react.useState)(((_window$BSGlobal$tena = window.BSGlobal.tenantAuthentication) === null || _window$BSGlobal$tena === void 0 ? void 0 : _window$BSGlobal$tena.Version) == 1),
|
|
47
49
|
_useState2 = _slicedToArray(_useState, 1),
|
|
48
50
|
isTrial = _useState2[0];
|
|
49
51
|
|
|
@@ -25,11 +25,13 @@ var defaultRefObject = {
|
|
|
25
25
|
};
|
|
26
26
|
exports.defaultRefObject = defaultRefObject;
|
|
27
27
|
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
var _ref = (0, _bsGlobal.getBSGlobal)('AssessAdvancedSetting') || {},
|
|
29
|
+
_ref$AssessFunctionSe = _ref.AssessFunctionSetting;
|
|
30
|
+
|
|
31
|
+
_ref$AssessFunctionSe = _ref$AssessFunctionSe === void 0 ? {} : _ref$AssessFunctionSe;
|
|
32
|
+
var StartAssessByDepartmentLeader = _ref$AssessFunctionSe.StartAssessByDepartmentLeader,
|
|
33
|
+
StartAssessByUser = _ref$AssessFunctionSe.StartAssessByUser,
|
|
34
|
+
StartAssessByHrbp = _ref$AssessFunctionSe.StartAssessByHrbp;
|
|
33
35
|
|
|
34
36
|
var _getUserInfo = (0, _bsGlobal.getUserInfo)(),
|
|
35
37
|
HasSub = _getUserInfo.HasSub,
|
|
@@ -65,6 +65,8 @@ exports.PAGE_OKR_CASES = PAGE_OKR_CASES;
|
|
|
65
65
|
|
|
66
66
|
var okrMenus = /*#__PURE__*/function () {
|
|
67
67
|
function okrMenus() {
|
|
68
|
+
var _window$BSGlobal$logi;
|
|
69
|
+
|
|
68
70
|
_classCallCheck(this, okrMenus);
|
|
69
71
|
|
|
70
72
|
this.COMPANYALL = _index.COMPANY_ALL_NODE;
|
|
@@ -109,7 +111,7 @@ var okrMenus = /*#__PURE__*/function () {
|
|
|
109
111
|
isLeaf: false,
|
|
110
112
|
children: [],
|
|
111
113
|
href: '',
|
|
112
|
-
isShow: window.BSGlobal.loginUserInfo.HasSub
|
|
114
|
+
isShow: (_window$BSGlobal$logi = window.BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.HasSub
|
|
113
115
|
}, {
|
|
114
116
|
icon: 'guanzhu',
|
|
115
117
|
label: _i18n.locale.menu_concerned_user,
|
|
@@ -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
|
|
|
@@ -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 _researchFrontMenus = _interopRequireDefault(require("./research-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 ResearchMenus(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 researchFrontMenu = (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
|
+
researchFrontMenu.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"], "-research-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(_researchFrontMenus["default"], {
|
|
109
|
+
ref: researchFrontMenu,
|
|
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)(ResearchMenus);
|
|
119
|
+
|
|
120
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
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.isResearchManage()) {
|
|
28
|
+
cb(_menus.PAGE_RESEARCH_MANAGE);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
key: "isResearchManage",
|
|
35
|
+
value: function isResearchManage() {
|
|
36
|
+
var pathname = this.history.location.pathname;
|
|
37
|
+
return pathname.match(/research\/manage/);
|
|
38
|
+
}
|
|
39
|
+
}]);
|
|
40
|
+
|
|
41
|
+
return _default;
|
|
42
|
+
}();
|
|
43
|
+
|
|
44
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.defaultRefObject = exports["default"] = exports.PAGE_RESEARCH_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_RESEARCH_MANAGE = 'researchmanage';
|
|
24
|
+
exports.PAGE_RESEARCH_MANAGE = PAGE_RESEARCH_MANAGE;
|
|
25
|
+
|
|
26
|
+
var researchMenus = /*#__PURE__*/function () {
|
|
27
|
+
function researchMenus(props) {
|
|
28
|
+
_classCallCheck(this, researchMenus);
|
|
29
|
+
|
|
30
|
+
this.menus = [{
|
|
31
|
+
icon: 'survey-manage',
|
|
32
|
+
label: '调查管理',
|
|
33
|
+
key: PAGE_RESEARCH_MANAGE,
|
|
34
|
+
type: _index.MENU_ITEM_NOE,
|
|
35
|
+
href: '#/research/manage',
|
|
36
|
+
isShow: true
|
|
37
|
+
}];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
_createClass(researchMenus, [{
|
|
41
|
+
key: "getMenus",
|
|
42
|
+
value: function getMenus() {
|
|
43
|
+
var menus = this.formateToTreeNodeData(this.menus.filter(function (it) {
|
|
44
|
+
return it.isShow == true;
|
|
45
|
+
}));
|
|
46
|
+
return menus;
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
key: "formateToTreeNodeData",
|
|
50
|
+
value: function formateToTreeNodeData(menus) {
|
|
51
|
+
var pid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
52
|
+
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
53
|
+
var treeNodes = [];
|
|
54
|
+
|
|
55
|
+
for (var i = 0; i < menus.length; i++) {
|
|
56
|
+
var menu = menus[i];
|
|
57
|
+
var hasChildren = !!(menu.children && menu.children.length);
|
|
58
|
+
var isLeaf = menu.isLeaf !== undefined ? menu.isLeaf : !hasChildren;
|
|
59
|
+
var nodeType = menu.type;
|
|
60
|
+
if (!nodeType) nodeType = !isLeaf ? _index.PARENT_MENU_NODE : _index.SUB_MENU_ITEM_NOE;
|
|
61
|
+
treeNodes.push({
|
|
62
|
+
key: "".concat(menu.key),
|
|
63
|
+
title: (0, _getLocale.getLocale)(menu.label) ? (0, _getLocale.getLocale)(menu.label) : menu.label,
|
|
64
|
+
data: menu.data || menu,
|
|
65
|
+
isLeaf: isLeaf,
|
|
66
|
+
children: this.formateToTreeNodeData(menu.children || [], level + 1, menu.key),
|
|
67
|
+
nodeType: nodeType
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return treeNodes;
|
|
72
|
+
}
|
|
73
|
+
}]);
|
|
74
|
+
|
|
75
|
+
return researchMenus;
|
|
76
|
+
}();
|
|
77
|
+
|
|
78
|
+
exports["default"] = researchMenus;
|
|
@@ -0,0 +1,158 @@
|
|
|
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
|
+
}, [history.location.pathname, history.location.search]);
|
|
95
|
+
|
|
96
|
+
var changeHighlightMenu = function changeHighlightMenu(menuKeys) {
|
|
97
|
+
setSelectedMenuKeys(menuKeys);
|
|
98
|
+
flipRef.current.goback();
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var onSelectHandler = function onSelectHandler(selectedKyes, _ref) {
|
|
102
|
+
var node = _ref.node;
|
|
103
|
+
onSelect(node); // 处理菜单选中
|
|
104
|
+
|
|
105
|
+
if (!selectedKyes.length) {
|
|
106
|
+
return;
|
|
107
|
+
} else {
|
|
108
|
+
setSelectedMenuKeys(selectedKyes);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
var onExpandHandler = function onExpandHandler(expandKeys, _ref2) {
|
|
113
|
+
var expanded = _ref2.expanded,
|
|
114
|
+
node = _ref2.node;
|
|
115
|
+
setExpandedKeys(expandKeys);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
119
|
+
return {
|
|
120
|
+
setSelectedMenuKeys: setSelectedMenuKeys
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
(0, _react.useEffect)(function () {
|
|
124
|
+
var obs = new _resizeObserverPolyfill["default"](function (entries) {
|
|
125
|
+
var _iterator = _createForOfIteratorHelper(entries),
|
|
126
|
+
_step;
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
130
|
+
var entry = _step.value;
|
|
131
|
+
var cr = entry.contentRect;
|
|
132
|
+
setMaxHeight(cr.height - 198);
|
|
133
|
+
}
|
|
134
|
+
} catch (err) {
|
|
135
|
+
_iterator.e(err);
|
|
136
|
+
} finally {
|
|
137
|
+
_iterator.f();
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
obs.observe(document.body);
|
|
141
|
+
return function () {
|
|
142
|
+
obs.unobserve(document.body);
|
|
143
|
+
};
|
|
144
|
+
}, []);
|
|
145
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], {
|
|
146
|
+
style: {
|
|
147
|
+
maxHeight: maxHeight
|
|
148
|
+
}
|
|
149
|
+
}, /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
|
|
150
|
+
data: menus,
|
|
151
|
+
selectedKeys: selectedMenuKeys,
|
|
152
|
+
expandedKeys: expandedKeys,
|
|
153
|
+
onSelect: onSelectHandler,
|
|
154
|
+
onExpand: onExpandHandler
|
|
155
|
+
})));
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
exports["default"] = _default;
|