@titaui/pc 1.6.12 → 1.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/avatar/index.js +1 -1
- package/lib/components/button/icon-btn/index.css +2 -0
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/rect-btn/index.css +21 -0
- package/lib/components/button/rect-btn/index.js +8 -8
- package/lib/components/button/text-btn/index.css +33 -0
- package/lib/components/button/text-btn/index.js +52 -2
- package/lib/components/change-okr/styledComponents.js +1 -1
- package/lib/components/communication/style.js +1 -1
- package/lib/components/create-okr/constant.js +1 -1
- package/lib/components/create-okr/createSuccessCmp.js +6 -2
- package/lib/components/create-okr/fields/index.js +1 -1
- package/lib/components/create-okr/index.js +16 -1
- package/lib/components/create-okr/request-api.js +1 -1
- package/lib/components/create-okr/style.js +1 -1
- package/lib/components/create-okr/utils/helper.js +1 -1
- package/lib/components/delete-confirm-pop/style.js +1 -1
- package/lib/components/dialog/index.css +1 -0
- package/lib/components/dropdown-layer/index.js +1 -1
- package/lib/components/dynamic/components/title/index.css +2 -2
- package/lib/components/dynamic/constant.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +7 -1
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +4 -21
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +4 -0
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -2
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +7 -1
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +4 -7
- package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +1 -35
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/dynamic-task.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +7 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +17 -7
- package/lib/components/dynamic/dynamic-like-ranking/index.css +2 -3
- package/lib/components/dynamic/dynamic-like-ranking/index.js +11 -6
- package/lib/components/dynamic/dynamic-liking/index.css +1 -2
- package/lib/components/dynamic/dynamic-liking/item.js +2 -20
- package/lib/components/dynamic/dynamic-list/index.js +7 -1
- package/lib/components/dynamic/dynamic-topping/index.css +1 -1
- package/lib/components/dynamic/dynamic-topping/request-api.js +1 -1
- package/lib/components/dynamic/dynamic.js +7 -4
- package/lib/components/dynamic/export-module/index.js +1 -1
- package/lib/components/dynamic/index.js +1 -1
- package/lib/components/dynamic/new-ui.css +206 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +2 -2
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +2 -2
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +2 -2
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +2 -2
- package/lib/components/dynamic/quick-operation/img/okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/send-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/send-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/task.png +0 -0
- package/lib/components/dynamic/request-api.js +1 -1
- package/lib/components/dynamic/util.js +2 -2
- package/lib/components/eReport/eReportLists/style.js +1 -1
- package/lib/components/eReport/eReportShare/style.js +1 -1
- package/lib/components/eReport/eReportShare/toast/style.js +1 -1
- package/lib/components/edit-kr-wight/style/index.js +1 -1
- package/lib/components/emotionsSelector/style.js +1 -1
- package/lib/components/file-list/components/single-file/index.css +2 -2
- package/lib/components/file-list/components/single-file/index.js +1 -1
- package/lib/components/file-list/index.js +1 -1
- package/lib/components/form/form-fields/radios/index.css +5 -0
- package/lib/components/form/form-fields/radios/index.js +34 -5
- package/lib/components/form/index.js +1 -1
- package/lib/components/grid-page/commen-components/index.js +4 -4
- package/lib/components/grid-page/commen-components/scroll-tips.js +1 -1
- package/lib/components/grid-page/util/network.js +1 -1
- package/lib/components/help-card/index.css +17 -17
- package/lib/components/help-card/index.js +35 -31
- package/lib/components/help-card/request-api.js +2 -2
- package/lib/components/img-viewer/index.css +4 -0
- package/lib/components/img-viewer/index.js +2 -1
- package/lib/components/mblog/common/index.js +3 -3
- package/lib/components/mblog/style.js +1 -1
- package/lib/components/menus/components/drag-resize/index.css +4 -4
- package/lib/components/menus/components/drag-resize/index.js +35 -30
- package/lib/components/menus/components/flip-menu-card/index.css +7 -3
- package/lib/components/menus/components/flip-menu-card/index.js +42 -30
- package/lib/components/menus/components/menu-card/index.js +1 -6
- package/lib/components/menus/components/menu-close-btn/index.css +2 -1
- package/lib/components/menus/components/menu-tree/images/appraisal-menu/KH-help.svg +10 -0
- package/lib/components/menus/components/menu-tree/images/appraisal-menu/mypingjia.svg +10 -0
- package/lib/components/menus/components/menu-tree/images/loading-node.gif +0 -0
- package/lib/components/menus/components/menu-tree/images/okr-menu/cases.svg +9 -0
- package/lib/components/menus/components/menu-tree/images/okr-menu/{rw-zx.svg → panel.svg} +0 -0
- package/lib/components/menus/components/menu-tree/index.js +5 -4
- package/lib/components/menus/components/menu-tree/tree-node/avatar/index.css +49 -0
- package/lib/components/menus/components/menu-tree/tree-node/avatar/index.js +72 -0
- package/lib/components/menus/components/menu-tree/tree-node/company-all-node.js +2 -1
- package/lib/components/menus/components/menu-tree/tree-node/compony-node/index.js +5 -2
- package/lib/components/menus/components/menu-tree/tree-node/depart-node/index.js +9 -4
- package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.css +47 -0
- package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.js +67 -0
- package/lib/components/menus/components/menu-tree/tree-node/group-name-node.js +2 -1
- package/lib/components/menus/components/menu-tree/tree-node/index.css +126 -13
- package/lib/components/menus/components/menu-tree/tree-node/index.js +19 -0
- package/lib/components/menus/components/menu-tree/tree-node/loading-node.js +27 -0
- package/lib/components/menus/components/menu-tree/tree-node/menu-item-node.js +2 -1
- package/lib/components/menus/components/menu-tree/tree-node/menu-node.js +2 -1
- package/lib/components/menus/components/menu-tree/tree-node/no-follower-node.js +25 -0
- package/lib/components/menus/components/menu-tree/tree-node/user-concern-node.js +9 -4
- package/lib/components/menus/components/menu-tree/tree-node/user-node/index.css +3 -1
- package/lib/components/menus/components/menu-tree/tree-node/user-node/index.js +12 -42
- package/lib/components/menus/export-modules/appraisal-menus/datas.js +58 -19
- package/lib/components/menus/export-modules/depart-menus/index.js +34 -7
- package/lib/components/menus/export-modules/okr-menus/datas.js +109 -4
- package/lib/components/menus/export-modules/okr-menus/index.css +0 -1
- package/lib/components/menus/export-modules/okr-menus/index.js +73 -20
- package/lib/components/menus/export-modules/subordinate-menus/index.js +12 -4
- package/lib/components/menus/index.js +1 -1
- package/lib/components/menus/request-apis.js +22 -5
- package/lib/components/nav-top/components/menu/index.css +1 -0
- package/lib/components/nav-top/components/menu/index.js +7 -5
- package/lib/components/nav-top/components/user-message/components/empty/index.js +1 -1
- package/lib/components/nav-top/components/user-message/components/inform/index.css +29 -6
- package/lib/components/nav-top/components/user-message/components/inform/index.js +116 -111
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +133 -0
- package/lib/components/nav-top/components/user-message/components/red-pack/index.css +40 -0
- package/lib/components/nav-top/components/user-message/components/red-pack/index.js +105 -0
- package/lib/components/nav-top/components/user-message/components/red-pack/request-api.js +14 -0
- package/lib/components/nav-top/components/user-message/components/remind/index.css +26 -8
- package/lib/components/nav-top/components/user-message/components/remind/index.js +67 -60
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +71 -0
- package/lib/components/nav-top/components/user-message/components/reply/index.css +28 -6
- package/lib/components/nav-top/components/user-message/components/reply/index.js +118 -63
- package/lib/components/nav-top/components/user-message/components/reply/reply-item.js +75 -0
- package/lib/components/nav-top/components/user-message/components/tab-title/index.js +5 -4
- package/lib/components/nav-top/components/user-message/components/todos/index.css +26 -12
- package/lib/components/nav-top/components/user-message/components/todos/index.js +118 -59
- package/lib/components/nav-top/components/user-message/components/todos/todo-item.js +70 -0
- package/lib/components/nav-top/components/user-message/constant.js +2 -19
- package/lib/components/nav-top/components/user-message/images/loading.gif +0 -0
- package/lib/components/nav-top/components/user-message/images/msg-reward.png +0 -0
- package/lib/components/nav-top/components/user-message/index.css +41 -4
- package/lib/components/nav-top/components/user-message/index.js +89 -100
- package/lib/components/nav-top/components/user-message/msg/index.css +5 -30
- package/lib/components/nav-top/components/user-message/msg/index.js +28 -22
- package/lib/components/nav-top/components/user-message/utils.js +31 -0
- package/lib/components/nav-top/components/user-own-menu/index.css +2 -1
- package/lib/components/nav-top/components/user-own-menu/index.js +5 -7
- package/lib/components/nav-top/components/user-own-menu/utils.js +63 -0
- package/lib/components/nav-top/constant.js +2 -10
- package/lib/components/nav-top/index.css +55 -0
- package/lib/components/nav-top/index.js +14 -13
- package/lib/components/nav-top/request.apis.js +50 -0
- package/lib/components/nav-top/utils.js +10 -70
- package/lib/components/okr-detail/auth.js +1 -1
- package/lib/components/okr-detail/base-info/util.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/constant.js +1 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +1 -1
- package/lib/components/okr-detail/context.js +1 -1
- package/lib/components/okr-detail/detail-header/actions.js +2 -2
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +1 -1
- package/lib/components/okr-detail/detail-header/enums.js +1 -1
- package/lib/components/okr-detail/e-list/constant.js +1 -1
- package/lib/components/okr-detail/e-list/util.js +1 -1
- package/lib/components/okr-detail/okr-list/create-kr-item/style.js +1 -1
- package/lib/components/okr-detail/okr-list/drag-order-kr.js +1 -1
- package/lib/components/okr-detail/okr-list/index.js +2 -1
- package/lib/components/okr-detail/request-apis.js +1 -1
- package/lib/components/okr-detail/schedule/util.js +1 -1
- package/lib/components/okr-filter-drawer/filter-button.js +1 -0
- package/lib/components/okr-filter-drawer/filter-form.js +189 -0
- package/lib/components/okr-filter-drawer/index.css +45 -0
- package/lib/components/okr-filter-drawer/index.js +54 -0
- package/lib/components/okr-flow/index.js +1 -1
- package/lib/components/okr-flow/mini-map/utils.js +1 -1
- package/lib/components/okr-flow/open-data/index.js +1 -1
- package/lib/components/okr-flow/request-apis.js +1 -1
- package/lib/components/okr-flow/utils/config.js +1 -1
- package/lib/components/okr-flow/utils/index.js +1 -1
- package/lib/components/okr-flow/utils/tree-handler.js +1 -1
- package/lib/components/okr-progress/request-apis.js +1 -1
- package/lib/components/okr-progress/util.js +1 -1
- package/lib/components/okr-progress-detail/utils.js +1 -1
- package/lib/components/okr-progress-modal/helper.js +1 -1
- package/lib/components/okr-progress-modal/style.js +1 -1
- package/lib/components/okr-progress-modal/textarea/style.js +1 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/style.js +1 -1
- package/lib/components/okr-review/ReviewPop/style.js +1 -1
- package/lib/components/okr-review/components/ReviewItem/style.js +1 -1
- package/lib/components/okr-review/components/confirm-pop/style.js +1 -1
- package/lib/components/okr-review/style.js +1 -1
- package/lib/components/okr-share/common-painter/utils.js +1 -1
- package/lib/components/okr-share/pink-card/images.js +1 -1
- package/lib/components/okr-share/request-apis.js +1 -1
- package/lib/components/okrcase-library/index.css +1 -1
- package/lib/components/okrcase-library/index.js +6 -1
- package/lib/components/okrcase-library/new-ui.css +52 -0
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +1 -1
- package/lib/components/okrcase-library/server/network.js +1 -1
- package/lib/components/open-data-painter/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/pagination/index.css +6 -12
- package/lib/components/period-selector/common.js +2 -2
- package/lib/components/period-selector/components/button/style.js +1 -1
- package/lib/components/period-selector/components/selector/style.js +1 -1
- package/lib/components/period-selector/helper/index.js +1 -1
- package/lib/components/period-selector/mockData.js +1 -1
- package/lib/components/period-selector/style.js +1 -1
- package/lib/components/photo-card/components/card/index.css +83 -100
- package/lib/components/photo-card/components/card/index.js +119 -63
- package/lib/components/photo-card/data.js +5 -5
- package/lib/components/photo-card/images/assistant.svg +40 -0
- package/lib/components/photo-card/images/back-manager.svg +40 -0
- package/lib/components/photo-card/images/boss.svg +38 -0
- package/lib/components/photo-card/images/depart-leader.svg +40 -0
- package/lib/components/photo-card/images/super-manager.svg +40 -0
- package/lib/components/photo-card/index.css +15 -14
- package/lib/components/photo-card/index.js +59 -15
- package/lib/components/pop-down-notification/components/SuccessRender.js +1 -1
- package/lib/components/pop-down-notification/style/index.js +1 -1
- package/lib/components/praise-record/style.js +1 -1
- package/lib/components/progress/index.js +1 -1
- package/lib/components/publish-dynamic-modal/requist-api.js +1 -1
- package/lib/components/radio/radio.js +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/task-relation/helper.js +1 -1
- package/lib/components/task-relation/request-api.js +1 -1
- package/lib/components/tita-chart/index.js +4 -4
- package/lib/components/tita-chart/util/index.js +12 -12
- package/lib/components/tita-chart/util/utils.js +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tree/index.js +1 -3
- package/lib/components/update-modal/img/background.png +0 -0
- package/lib/components/update-modal/img/rocket.png +0 -0
- package/lib/components/update-modal/index.css +80 -0
- package/lib/components/update-modal/index.js +83 -0
- package/lib/components/update-modal/request-api.js +17 -0
- package/lib/components/upload/style.js +1 -1
- package/lib/components/upload/util.js +1 -1
- package/lib/components/upvote/request-apis.js +1 -1
- package/lib/components/user-selector/index.js +1 -1
- package/lib/components/user-selector/request-apis.js +1 -1
- package/lib/components/user-selector/utils.js +1 -1
- package/lib/components/version-change-modal/request-api.js +1 -1
- package/lib/components/viewer/index.js +1 -1
- package/lib/components-v1/avatar/styles.js +1 -1
- package/lib/components-v1/buttonv2/style/style.js +1 -1
- package/lib/components-v1/input/Input.js +1 -1
- package/lib/components-v1/input/InputNumber.js +1 -1
- package/lib/components-v1/input/style/index.js +1 -1
- package/lib/components-v1/popConfirm/style.js +1 -1
- package/lib/components-v1/tabs/style.js +1 -1
- package/lib/components-v1/textarea/style.js +1 -1
- package/lib/components-v1/userSelector/UserSelectorPop.js +1 -1
- package/lib/components-v1/userSelector/style.js +1 -1
- package/lib/hooks/useLocalStorage.js +37 -0
- package/lib/index.js +18 -4
- package/lib/pages/aha2021/index.css +25 -1
- package/lib/pages/aha2021/index.js +10 -4
- package/lib/pages/group-management/components/PopDownNotification/components/SuccessRender.js +1 -1
- package/lib/pages/group-management/components/PopDownNotification/style/index.js +1 -1
- package/lib/pages/group-management/components/openData/index.js +1 -1
- package/lib/pages/group-management/groupInterface.js +10 -10
- package/lib/pages/home-page/components/data-list/table/columns/index.js +1 -1
- package/lib/pages/new-okr-list/context.js +14 -0
- package/lib/pages/new-okr-list/header/comments.js +104 -0
- package/lib/pages/new-okr-list/header/create-okr.js +61 -0
- package/lib/pages/new-okr-list/header/depart-title.js +59 -0
- package/lib/pages/new-okr-list/header/filter.js +95 -0
- package/lib/pages/new-okr-list/header/index.css +118 -0
- package/lib/pages/new-okr-list/header/index.js +133 -0
- package/lib/pages/new-okr-list/header/relation-title.js +28 -0
- package/lib/pages/new-okr-list/header/user-title.js +26 -0
- package/lib/pages/new-okr-list/index.css +10 -0
- package/lib/pages/new-okr-list/index.js +208 -0
- package/lib/pages/new-okr-list/interface.js +5 -0
- package/lib/pages/new-okr-list/keyword-search/index.css +71 -0
- package/lib/pages/new-okr-list/keyword-search/index.js +106 -0
- package/lib/pages/new-okr-list/list/index.css +0 -0
- package/lib/pages/new-okr-list/list/index.js +47 -0
- package/lib/pages/new-okr-list/precls.js +8 -0
- package/lib/pages/new-okr-list/request-api.js +158 -0
- package/lib/pages/new-okr-list/theme.css +7 -0
- package/lib/pages/okr-map/hooks/useStorage.js +1 -1
- package/lib/pages/okr-map/open-data/index.js +1 -1
- package/lib/pages/okr-map/request-apis.js +1 -1
- package/lib/pages/okr-map/utils.js +2 -1
- package/lib/utils/auth.js +1 -1
- package/lib/utils/bs-global.js +1 -1
- package/lib/utils/format-time.js +1 -1
- package/lib/utils/helpers.js +1 -1
- package/lib/utils/local-storage.js +40 -0
- package/lib/utils/mblog.js +1 -1
- package/lib/utils/open-data.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/request-v1.js +2 -2
- package/lib/utils/request.js +1 -1
- package/lib/utils/roundWeight.js +2 -2
- package/lib/utils/tools.js +4 -3
- package/package.json +3 -2
- package/lib/components/dynamic/dynamic-item/components/icon/index.css +0 -10
- package/lib/components/dynamic/dynamic-item/components/icon/index.js +0 -35
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
- package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
- package/lib/components/nav-top/mock.js +0 -36
|
@@ -1,150 +1,155 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
13
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _default2 = _interopRequireDefault(require("../../../../../../components/avatar/default"));
|
|
14
|
+
var _rcVirtualList = _interopRequireDefault(require("rc-virtual-list"));
|
|
15
15
|
|
|
16
16
|
var _conditionRender = _interopRequireDefault(require("../../../../../dynamic/components/condition-render"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _request = require("../../../../request.apis");
|
|
19
19
|
|
|
20
20
|
var _empty = _interopRequireDefault(require("../empty"));
|
|
21
21
|
|
|
22
|
-
require("./
|
|
22
|
+
var _informItem = _interopRequireDefault(require("./inform-item"));
|
|
23
|
+
|
|
24
|
+
var _loading = _interopRequireDefault(require("../../images/loading.gif"));
|
|
23
25
|
|
|
24
26
|
var _constant = require("../../constant");
|
|
25
27
|
|
|
28
|
+
require("./index.css");
|
|
29
|
+
|
|
26
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
31
|
|
|
28
|
-
|
|
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); }
|
|
29
33
|
|
|
30
|
-
var
|
|
31
|
-
var informs = props.informs,
|
|
32
|
-
userInfo = props.userInfo,
|
|
33
|
-
onItemClick = props.onItemClick;
|
|
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; }
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
onItemClick && onItemClick(false);
|
|
37
|
-
var isMessageMerging = data.messageType == 13018 || data.messageType == 30362 || data.messageType == 131;
|
|
36
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/taskinfo?Id=").concat(data.objId), "_blank");
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
38
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
43
39
|
|
|
44
|
-
|
|
40
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
type = "performance";
|
|
54
|
-
}
|
|
42
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
43
|
+
|
|
44
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
45
|
+
|
|
46
|
+
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."); }
|
|
47
|
+
|
|
48
|
+
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); }
|
|
55
49
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
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; }
|
|
51
|
+
|
|
52
|
+
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; }
|
|
53
|
+
|
|
54
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
|
+
|
|
56
|
+
var preCls = "titaui-user-message-msg-inform";
|
|
57
|
+
|
|
58
|
+
var Inform = function Inform(props) {
|
|
59
|
+
var userInfo = props.userInfo,
|
|
60
|
+
onItemClick = props.onItemClick;
|
|
61
|
+
|
|
62
|
+
var _useState = (0, _react.useState)([]),
|
|
63
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
64
|
+
informs = _useState2[0],
|
|
65
|
+
setInforms = _useState2[1];
|
|
66
|
+
|
|
67
|
+
var _useState3 = (0, _react.useState)(true),
|
|
68
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
69
|
+
isLoading = _useState4[0],
|
|
70
|
+
setIsLoading = _useState4[1];
|
|
71
|
+
|
|
72
|
+
var _useState5 = (0, _react.useState)(2),
|
|
73
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
74
|
+
pageNum = _useState6[0],
|
|
75
|
+
setPageNum = _useState6[1];
|
|
76
|
+
|
|
77
|
+
var _useState7 = (0, _react.useState)(false),
|
|
78
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
79
|
+
isRequest = _useState8[0],
|
|
80
|
+
setIsRequest = _useState8[1];
|
|
81
|
+
|
|
82
|
+
var _useState9 = (0, _react.useState)(0),
|
|
83
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
84
|
+
replysData = _useState10[0],
|
|
85
|
+
setReplysData = _useState10[1];
|
|
86
|
+
|
|
87
|
+
var onScrollBottom = function onScrollBottom(e) {
|
|
88
|
+
var _e$target = e.target,
|
|
89
|
+
offsetHeight = _e$target.offsetHeight,
|
|
90
|
+
scrollTop = _e$target.scrollTop,
|
|
91
|
+
scrollHeight = _e$target.scrollHeight;
|
|
92
|
+
|
|
93
|
+
if (offsetHeight + scrollTop >= scrollHeight - 100) {
|
|
94
|
+
if (!isRequest) {
|
|
95
|
+
setIsRequest(true);
|
|
96
|
+
|
|
97
|
+
if (pageNum <= Math.ceil(replysData / 10)) {
|
|
98
|
+
(0, _request.getInforms)(pageNum).then(function (res) {
|
|
99
|
+
if (res.Code === 1) {
|
|
100
|
+
setInforms([].concat(_toConsumableArray(informs), _toConsumableArray(res.Data.todos)));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
setIsRequest(false);
|
|
104
|
+
setPageNum(pageNum + 1);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
68
107
|
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (data.messageType == 83) {
|
|
72
|
-
options.data.objType = data.messageType;
|
|
73
|
-
options.data.startDate = data.createTime;
|
|
74
|
-
} else if (data.messageType > 93 && data.messageType <= 100) {
|
|
75
|
-
options.data.startDate = data.createTime;
|
|
76
|
-
} else if (data.messageType == 131) {
|
|
77
|
-
options.data.objType = data.objId.split("_")[0];
|
|
78
|
-
options.data.startDate = data.objId.split("_")[1];
|
|
79
|
-
options.data.endDate = data.objId.split("_")[2];
|
|
80
|
-
} else {
|
|
81
|
-
var regex = /\((.+?)\)/g,
|
|
82
|
-
content = e.target.textContent;
|
|
83
|
-
var date = [];
|
|
84
|
-
date = content.match(regex); // @ts-ignore
|
|
85
|
-
|
|
86
|
-
options.data.startDate = date[0].slice(1, date[0].length - 1).split("-")[0]; // @ts-ignore
|
|
87
|
-
|
|
88
|
-
options.data.endDate = date[0].slice(1, date[0].length - 1).split("-")[1];
|
|
89
|
-
} // @ts-ignore
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Talent.app.vent.trigger("openReactScreenPush", options);
|
|
108
|
+
}
|
|
93
109
|
};
|
|
94
110
|
|
|
111
|
+
(0, _react.useEffect)(function () {
|
|
112
|
+
(0, _request.getInforms)(1).then(function (res) {
|
|
113
|
+
if (res.Code === 1) {
|
|
114
|
+
if (res.Data.total || res.Data.messags && res.Data.messags.length) {
|
|
115
|
+
setInforms(res.Data.messags);
|
|
116
|
+
setReplysData(res.Data.total);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
setIsLoading(false);
|
|
121
|
+
});
|
|
122
|
+
}, []);
|
|
95
123
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
96
|
-
condition:
|
|
97
|
-
}, /*#__PURE__*/_react["default"].createElement("
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
124
|
+
condition: isLoading
|
|
125
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
126
|
+
src: _loading["default"],
|
|
127
|
+
className: (0, _classnames["default"])("".concat(preCls, "__loading"))
|
|
128
|
+
})), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
129
|
+
condition: informs.length !== 0
|
|
101
130
|
}, /*#__PURE__*/_react["default"].createElement("ul", {
|
|
102
|
-
className: (0, _classnames["default"])("".concat(preCls, "__items"))
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
118
|
-
target: "_blank",
|
|
119
|
-
onClick: function onClick(e) {
|
|
120
|
-
handleItemClick(e, inform);
|
|
121
|
-
}
|
|
122
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
|
-
className: (0, _classnames["default"])("".concat(preCls, "__item-right-name"))
|
|
124
|
-
}, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
125
|
-
overlayClassName: "".concat(preCls, "__item-right-name-tooltip"),
|
|
126
|
-
text: inform.user.name,
|
|
127
|
-
maxWidth: 100,
|
|
128
|
-
mouseEnterDelay: 0.8
|
|
129
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
|
-
className: (0, _classnames["default"])("".concat(preCls, "__item-right-content"))
|
|
131
|
-
}, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
132
|
-
overlayClassName: "".concat(preCls, "__item-right-content-tooltip"),
|
|
133
|
-
text: (0, _constant.htmlToText)(inform.content).trim().slice(0, -4),
|
|
134
|
-
isPercent: true,
|
|
135
|
-
mouseEnterDelay: 0.8
|
|
136
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
137
|
-
className: (0, _classnames["default"])("".concat(preCls, "__item-right-time"))
|
|
138
|
-
}, inform.createTime))));
|
|
139
|
-
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
131
|
+
className: (0, _classnames["default"])("".concat(preCls, "__items"))
|
|
132
|
+
}, /*#__PURE__*/_react["default"].createElement(_rcVirtualList["default"], {
|
|
133
|
+
data: informs,
|
|
134
|
+
height: 386,
|
|
135
|
+
itemKey: "messageId",
|
|
136
|
+
onScroll: function onScroll(e) {
|
|
137
|
+
return onScrollBottom(e);
|
|
138
|
+
}
|
|
139
|
+
}, function (item) {
|
|
140
|
+
return /*#__PURE__*/_react["default"].createElement(_informItem["default"], {
|
|
141
|
+
item: item,
|
|
142
|
+
userInfo: userInfo,
|
|
143
|
+
onItemClick: onItemClick
|
|
144
|
+
});
|
|
145
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
140
146
|
className: (0, _classnames["default"])("".concat(preCls, "__footer"))
|
|
141
147
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
142
148
|
target: "_blank",
|
|
143
|
-
href: "".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/messages?messageType=
|
|
144
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
149
|
+
href: "".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/messages?messageType=1&isRead=1&autoApply=true"),
|
|
145
150
|
className: (0, _classnames["default"])("".concat(preCls, "__footer-all"))
|
|
146
|
-
}, "\u67E5\u770B\u5168\u90E8")))
|
|
147
|
-
condition: informs.
|
|
151
|
+
}, "\u67E5\u770B\u5168\u90E8"))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
152
|
+
condition: isLoading === false && informs.length === 0
|
|
148
153
|
}, /*#__PURE__*/_react["default"].createElement(_empty["default"], null)));
|
|
149
154
|
};
|
|
150
155
|
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _default2 = _interopRequireDefault(require("../../../../../../components/avatar/default"));
|
|
15
|
+
|
|
16
|
+
var _tooltipText = _interopRequireDefault(require("../../../../../tooltip/tooltip-text"));
|
|
17
|
+
|
|
18
|
+
var _utils = require("../../utils");
|
|
19
|
+
|
|
20
|
+
var _constant = require("../../constant");
|
|
21
|
+
|
|
22
|
+
require("./index.css");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
var preCls = "titaui-user-message-msg-inform";
|
|
31
|
+
|
|
32
|
+
var Inform = function Inform(props) {
|
|
33
|
+
var item = props.item,
|
|
34
|
+
userInfo = props.userInfo,
|
|
35
|
+
onItemClick = props.onItemClick;
|
|
36
|
+
var domRef = (0, _react.useRef)();
|
|
37
|
+
|
|
38
|
+
var handleItemClick = function handleItemClick() {
|
|
39
|
+
onItemClick && onItemClick(false);
|
|
40
|
+
var isMessageMerging = item.messageType == 13018 || item.messageType == 30362 || item.messageType == 131;
|
|
41
|
+
|
|
42
|
+
if (!isMessageMerging) {
|
|
43
|
+
window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/taskinfo?Id=").concat(item.objId), "_blank");
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
var type = "eReport"; // E-周报提醒消息合并
|
|
48
|
+
|
|
49
|
+
if (item.messageType == "83") {
|
|
50
|
+
// 项目,目标进展提醒消息合并
|
|
51
|
+
type = "objective";
|
|
52
|
+
} else if (Number(item.messageType) > 93 && Number(item.messageType) <= 100) {
|
|
53
|
+
// OKR 仪表盘消息提醒
|
|
54
|
+
type = "okrDashBoard";
|
|
55
|
+
} else if (item.messageType == 131) {
|
|
56
|
+
type = "performance";
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var options = {
|
|
60
|
+
width: 680,
|
|
61
|
+
showScroll: true,
|
|
62
|
+
type: "message",
|
|
63
|
+
// 推屏类型
|
|
64
|
+
data: {
|
|
65
|
+
type: type,
|
|
66
|
+
// 消息类型
|
|
67
|
+
objId: item.messageId,
|
|
68
|
+
objType: item.messageType,
|
|
69
|
+
startDate: "",
|
|
70
|
+
endDate: ""
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
if (item.messageType == 83) {
|
|
75
|
+
options.data.objType = item.messageType;
|
|
76
|
+
options.data.startDate = item.createTime;
|
|
77
|
+
} else if (item.messageType > 93 && item.messageType <= 100) {
|
|
78
|
+
options.data.startDate = item.createTime;
|
|
79
|
+
} else if (item.messageType == 131) {
|
|
80
|
+
options.data.objType = item.objId.split("_")[0];
|
|
81
|
+
options.data.startDate = item.objId.split("_")[1];
|
|
82
|
+
options.data.endDate = item.objId.split("_")[2];
|
|
83
|
+
} else {
|
|
84
|
+
var regex = /\((.+?)\)/g,
|
|
85
|
+
content = domRef.current.textContent;
|
|
86
|
+
var date = [];
|
|
87
|
+
date = content.match(regex); // @ts-ignore
|
|
88
|
+
|
|
89
|
+
options.data.startDate = date[0].slice(1, date[0].length - 1).split("-")[0]; // @ts-ignore
|
|
90
|
+
|
|
91
|
+
options.data.endDate = date[0].slice(1, date[0].length - 1).split("-")[1];
|
|
92
|
+
} // @ts-ignore
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
Talent.app.vent.trigger("openReactScreenPush", options);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
99
|
+
className: (0, _classnames["default"])("".concat(preCls, "__item")),
|
|
100
|
+
key: item.messageId,
|
|
101
|
+
onClick: handleItemClick
|
|
102
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
+
className: (0, _classnames["default"])("".concat(preCls, "__item-photo"))
|
|
104
|
+
}, /*#__PURE__*/_react["default"].createElement(_default2["default"], {
|
|
105
|
+
userId: userInfo.Id,
|
|
106
|
+
name: userInfo.Name,
|
|
107
|
+
color: userInfo.UserAvatar.Color,
|
|
108
|
+
src: userInfo.Avatar
|
|
109
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
110
|
+
className: (0, _classnames["default"])("".concat(preCls, "__item-right"))
|
|
111
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
112
|
+
ref: domRef
|
|
113
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
114
|
+
className: (0, _classnames["default"])("".concat(preCls, "__item-right-name"))
|
|
115
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
116
|
+
overlayClassName: "".concat(preCls, "__item-right-name-tooltip"),
|
|
117
|
+
text: item.user.name,
|
|
118
|
+
maxWidth: 100,
|
|
119
|
+
mouseEnterDelay: 0.8
|
|
120
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
121
|
+
className: (0, _classnames["default"])("".concat(preCls, "__item-right-content"))
|
|
122
|
+
}, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
123
|
+
overlayClassName: "".concat(preCls, "__item-right-content-tooltip"),
|
|
124
|
+
text: (0, _utils.deleteText)((0, _utils.htmlToText)(item.content)),
|
|
125
|
+
isPercent: true,
|
|
126
|
+
mouseEnterDelay: 0.8
|
|
127
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
128
|
+
className: (0, _classnames["default"])("".concat(preCls, "__item-right-time"))
|
|
129
|
+
}, item.createTime))));
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
var _default = Inform;
|
|
133
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.titaui-nav-top-red-pack {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 40px;
|
|
4
|
+
right: 40px;
|
|
5
|
+
height: 94px;
|
|
6
|
+
z-index: 1040;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: flex-end;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.titaui-nav-top-red-pack__item {
|
|
12
|
+
margin-left: 16px;
|
|
13
|
+
position: relative;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.titaui-nav-top-red-pack__item-img {
|
|
18
|
+
width: 48px;
|
|
19
|
+
height: 58px;
|
|
20
|
+
background-image: url(../../images/msg-reward.png);
|
|
21
|
+
background-repeat: no-repeat;
|
|
22
|
+
box-shadow: 0 0 20px rgba(204, 41, 41, 0.2);
|
|
23
|
+
transform: rotate(20deg);
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.titaui-nav-top-red-pack__item-avatar {
|
|
28
|
+
position: absolute;
|
|
29
|
+
bottom: 24px;
|
|
30
|
+
right: 0;
|
|
31
|
+
border-radius: 100%;
|
|
32
|
+
width: 30px;
|
|
33
|
+
height: 30px;
|
|
34
|
+
border: 2px solid #fff;
|
|
35
|
+
background: #ffffff;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.titaui-nav-top-red-pack__item-avatar .titaui-pc-avator-wrapper {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _requestApi = require("./request-api");
|
|
13
|
+
|
|
14
|
+
var _avatar = _interopRequireDefault(require("../../../../../../components/avatar"));
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
25
|
+
|
|
26
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
+
|
|
28
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
29
|
+
|
|
30
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
31
|
+
|
|
32
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
|
+
|
|
34
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
35
|
+
|
|
36
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
37
|
+
|
|
38
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
39
|
+
|
|
40
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
41
|
+
|
|
42
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
|
+
|
|
44
|
+
var prefix = "titaui-nav-top-red-pack";
|
|
45
|
+
|
|
46
|
+
var RedPack = function RedPack(_ref) {
|
|
47
|
+
var _ref$redPackNum = _ref.redPackNum,
|
|
48
|
+
redPackNum = _ref$redPackNum === void 0 ? 0 : _ref$redPackNum;
|
|
49
|
+
|
|
50
|
+
var _useState = (0, _react.useState)([]),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
data = _useState2[0],
|
|
53
|
+
setData = _useState2[1];
|
|
54
|
+
|
|
55
|
+
var handleOpenRedPack = function handleOpenRedPack(id) {
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
Talent.app.vent.trigger("Global-Reward-Open", {
|
|
58
|
+
data: id,
|
|
59
|
+
needMask: true,
|
|
60
|
+
onOpen: function onOpen(data) {}
|
|
61
|
+
});
|
|
62
|
+
setData(_toConsumableArray(data.filter(function (item) {
|
|
63
|
+
return item.orderId !== id;
|
|
64
|
+
})));
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
(0, _react.useEffect)(function () {
|
|
68
|
+
if (redPackNum > 0) {
|
|
69
|
+
(0, _requestApi.getUserRedPackInfo)().then(function (resp) {
|
|
70
|
+
if (resp.Code === 1) {
|
|
71
|
+
setData(resp.Data.orders);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}, [redPackNum]);
|
|
76
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
|
+
className: prefix
|
|
78
|
+
}, data.map(function (item) {
|
|
79
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
80
|
+
className: "".concat(prefix, "__item"),
|
|
81
|
+
onClick: function onClick() {
|
|
82
|
+
handleOpenRedPack(item.orderId);
|
|
83
|
+
},
|
|
84
|
+
key: item.orderId
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
+
className: "".concat(prefix, "__item-img")
|
|
87
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
88
|
+
className: "".concat(prefix, "__item-avatar")
|
|
89
|
+
}, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
|
|
90
|
+
src: item.fromUser.avatar.medium,
|
|
91
|
+
userId: item.fromUser.userId,
|
|
92
|
+
name: item.fromUser.name,
|
|
93
|
+
showNameTips: true,
|
|
94
|
+
color: item.fromUser.avatar.color,
|
|
95
|
+
size: {
|
|
96
|
+
width: 30,
|
|
97
|
+
fontSize: 12,
|
|
98
|
+
textNum: 1
|
|
99
|
+
}
|
|
100
|
+
})));
|
|
101
|
+
}));
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
var _default = RedPack;
|
|
105
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getUserRedPackInfo = void 0;
|
|
7
|
+
|
|
8
|
+
var _request = require("../../../../../../utils/request");
|
|
9
|
+
|
|
10
|
+
var getUserRedPackInfo = function getUserRedPackInfo() {
|
|
11
|
+
return (0, _request.rget)('v1')('wx/pay/order/received?page_num=1&page_size=12');
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.getUserRedPackInfo = getUserRedPackInfo;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
.titaui-user-message-msg-remind__items {
|
|
2
2
|
width: 420px;
|
|
3
|
-
height: 500px;
|
|
4
|
-
margin-top: 8px;
|
|
5
3
|
}
|
|
6
4
|
|
|
7
5
|
.titaui-user-message-msg-remind__item {
|
|
@@ -10,8 +8,17 @@
|
|
|
10
8
|
box-sizing: border-box;
|
|
11
9
|
height: 60px;
|
|
12
10
|
border-radius: 12px;
|
|
13
|
-
margin-bottom:
|
|
14
|
-
margin:
|
|
11
|
+
margin-bottom: 4px;
|
|
12
|
+
margin-left: 12px;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.titaui-user-message-msg-remind__item:first-of-type {
|
|
17
|
+
margin-top: 8px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.titaui-user-message-msg-remind__item:last-of-type {
|
|
21
|
+
margin-bottom: 0;
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
.titaui-user-message-msg-remind__item-photo {
|
|
@@ -108,6 +115,10 @@
|
|
|
108
115
|
position: absolute;
|
|
109
116
|
bottom: 0;
|
|
110
117
|
left: 0;
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
padding-right: 24px;
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
111
122
|
width: 420px;
|
|
112
123
|
height: 50px;
|
|
113
124
|
background: #ffffff;
|
|
@@ -115,10 +126,7 @@
|
|
|
115
126
|
}
|
|
116
127
|
|
|
117
128
|
.titaui-user-message-msg-remind__footer-all {
|
|
118
|
-
|
|
119
|
-
margin: 16px 24px 16px 348px;
|
|
120
|
-
width: 48px;
|
|
121
|
-
height: 18px;
|
|
129
|
+
margin-left: auto;
|
|
122
130
|
font-size: 12px;
|
|
123
131
|
font-family: Resource-Han-Rounded-CN-Regular, Resource-Han-Rounded-CN;
|
|
124
132
|
font-weight: 400;
|
|
@@ -157,3 +165,13 @@
|
|
|
157
165
|
margin-left: -88px;
|
|
158
166
|
cursor: pointer;
|
|
159
167
|
}
|
|
168
|
+
|
|
169
|
+
.titaui-user-message-msg-remind__loading {
|
|
170
|
+
width: 80px;
|
|
171
|
+
position: absolute;
|
|
172
|
+
top: 0;
|
|
173
|
+
bottom: 0;
|
|
174
|
+
left: 0;
|
|
175
|
+
right: 0;
|
|
176
|
+
margin: auto;
|
|
177
|
+
}
|