@titaui/pc 1.11.27-beta.8 → 1.11.29
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 +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/avatar/text-avatar/index.css +7 -0
- package/lib/components/avatar/text-avatar/index.js +32 -7
- package/lib/components/button/icon-btn/index.js +17 -8
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +13 -19
- package/lib/components/change-okr-modal/Item.js +14 -14
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/index.js +1 -3
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/drop-selector/index.js +25 -10
- package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
- package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
- package/lib/components/dynamic/advertise/index.css +21 -0
- package/lib/components/dynamic/advertise/index.js +126 -0
- package/lib/components/dynamic/advertise/interface.js +5 -0
- package/lib/components/dynamic/advertise/util.js +28 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
- package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
- package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
- package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
- package/lib/components/dynamic/constant.js +33 -32
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
- package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
- package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
- package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/index.js +50 -32
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
- package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
- package/lib/components/dynamic/dynamic-liking/index.css +81 -0
- package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
- package/lib/components/dynamic/dynamic-liking/item.js +75 -0
- package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
- package/lib/components/dynamic/dynamic-list/index.js +7 -15
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
- package/lib/components/dynamic/dynamic-topping/index.css +141 -0
- package/lib/components/dynamic/dynamic-topping/index.js +82 -0
- package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
- package/lib/components/dynamic/dynamic-topping/item.js +153 -0
- package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
- package/lib/components/dynamic/dynamic.css +173 -0
- package/lib/components/dynamic/dynamic.js +428 -0
- package/lib/components/dynamic/export-module/index.js +37 -0
- package/lib/components/dynamic/img/dynamic-top.svg +14 -0
- package/lib/components/dynamic/index.js +12 -9
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +184 -0
- package/lib/components/dynamic/my-team/index.js +263 -0
- package/lib/components/dynamic/my-team/request-api.js +52 -0
- package/lib/components/dynamic/my-team/util.js +20 -0
- package/lib/components/dynamic/new-ui.css +192 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
- package/lib/components/dynamic/online-broadcast/data.js +77 -0
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +46 -0
- package/lib/components/dynamic/online-broadcast/index.js +61 -0
- package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +51 -0
- package/lib/components/dynamic/quick-operation/index.js +120 -0
- package/lib/components/dynamic/request-api.js +68 -7
- package/lib/components/e-priority/index.js +8 -8
- package/lib/components/eReport/eReportShare/index.js +11 -11
- package/lib/components/form/form-fields/date/index.css +24 -0
- package/lib/components/form/form-fields/date/index.js +102 -0
- package/lib/components/form/form-fields/input/index.js +10 -10
- package/lib/components/form/form-fields/user/index.css +23 -3
- package/lib/components/form/form-fields/user/index.js +18 -8
- package/lib/components/form/form-fields/user/user-input.js +15 -6
- package/lib/components/form/index.js +10 -3
- package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
- package/lib/components/icon-button-list/index.js +3 -3
- package/lib/components/img-viewer/index.css +3 -3
- package/lib/components/img-viewer/index.js +11 -11
- package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
- package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
- package/lib/components/menus/components/menu-tree/index.css +4 -2
- package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
- package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
- package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
- package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
- package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
- package/lib/components/menus/index.js +11 -5
- package/lib/components/nav-top/components/menu/index.js +14 -14
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
- package/lib/components/nav-top/components/user-message/constant.js +1 -0
- package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
- package/lib/components/nav-top/components/user-message/index.js +23 -20
- package/lib/components/nav-top/index.js +4 -8
- package/lib/components/nav-top/request.apis.js +3 -1
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/actions.js +23 -23
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +21 -40
- package/lib/components/okr-detail/okr-list/index.js +8 -11
- package/lib/components/okr-detail/request-apis.js +4 -10
- package/lib/components/okr-flow/child-node/index.css +6 -6
- package/lib/components/okr-flow/child-node/work-node.js +21 -21
- package/lib/components/okr-flow/export-modal/index.js +33 -19
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
- package/lib/components/okr-flow/okr-map/index.js +5 -5
- package/lib/components/okr-flow/request-apis.js +4 -4
- package/lib/components/okr-flow/root-node/index.js +25 -24
- package/lib/components/okr-flow/utils/index.js +5 -5
- package/lib/components/okr-flow/utils/tree-handler.js +17 -17
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/pagination/index.css +3 -3
- package/lib/components/pagination/select.css +58 -23
- package/lib/components/period-selector/index.css +3 -3
- package/lib/components/period-selector/index.js +11 -11
- package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
- package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
- package/lib/components/picker/components/panels/date-panel/index.css +14 -0
- package/lib/components/picker/components/panels/date-panel/index.js +49 -0
- package/lib/components/picker/components/panels/month-panel/index.css +27 -0
- package/lib/components/picker/components/panels/month-panel/index.js +63 -0
- package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
- package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
- package/lib/components/picker/components/panels/panel-body/index.js +53 -0
- package/lib/components/picker/components/panels/panel-head/index.js +48 -0
- package/lib/components/picker/components/panels/year-panel/index.css +23 -0
- package/lib/components/picker/components/panels/year-panel/index.js +65 -0
- package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
- package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
- package/lib/components/picker/components/picker-trigger/index.css +57 -0
- package/lib/components/picker/components/picker-trigger/index.js +94 -0
- package/lib/components/picker/context.js +15 -0
- package/lib/components/picker/index.css +121 -0
- package/lib/components/picker/index.js +13 -0
- package/lib/components/picker/picker-panels.js +182 -0
- package/lib/components/picker/picker.js +132 -0
- package/lib/components/picker/type.js +5 -0
- package/lib/components/picker/utils.js +28 -0
- package/lib/components/popup/index.js +4 -4
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
- package/lib/components/radio/index.css +9 -9
- package/lib/components/scrollbar/scroll-mask/index.js +1 -1
- package/lib/components/superset-charts/utils/axios.js +5 -5
- package/lib/components/survey-model/index.css +18 -18
- package/lib/components/survey-model/instance.js +1 -1
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/components/task-tree/helper.js +61 -0
- package/lib/components/task-tree/images/P1.svg +15 -0
- package/lib/components/task-tree/images/P2.svg +15 -0
- package/lib/components/task-tree/images/P3.svg +15 -0
- package/lib/components/task-tree/images/P4.svg +15 -0
- package/lib/components/task-tree/images/P5.svg +15 -0
- package/lib/components/task-tree/images/arrow.svg +9 -0
- package/lib/components/task-tree/images/empty-131.png +0 -0
- package/lib/components/task-tree/images/followed.svg +33 -0
- package/lib/components/task-tree/images/nice.svg +108 -0
- package/lib/components/task-tree/images/struc12.png +0 -0
- package/lib/components/task-tree/images/struc2.png +0 -0
- package/lib/components/task-tree/images/xialat-s.svg +13 -0
- package/lib/components/task-tree/index.js +22 -0
- package/lib/components/task-tree/mock.js +944 -0
- package/lib/components/task-tree/precls.js +8 -0
- package/lib/components/task-tree/request-apis.js +88 -0
- package/lib/components/task-tree/task-item-node/constant.js +45 -0
- package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
- package/lib/components/task-tree/task-item-node/e-project.js +212 -0
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
- package/lib/components/task-tree/task-item-node/e-task.js +426 -0
- package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
- package/lib/components/task-tree/task-item-node/index.css +289 -0
- package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
- package/lib/components/task-tree/task-tree.css +16 -0
- package/lib/components/task-tree/task-tree.js +49 -0
- package/lib/components/time-picker/index.css +123 -0
- package/lib/components/time-picker/index.js +13 -0
- package/lib/components/time-picker/time-picker-selector.js +138 -0
- package/lib/components/time-picker/time-picker.js +336 -0
- package/lib/components/time-picker/timer-picker-input.js +96 -0
- package/lib/components/time-picker/utils.js +52 -0
- package/lib/components/toast/index.js +3 -5
- package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
- package/lib/components-v1/radio/radio.js +3 -3
- package/lib/components-v1/radio/style/index.css +8 -8
- package/lib/index.js +0 -40
- package/lib/pages/aha2021/index.js +5 -1
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
- 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/header/index.js +11 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
- package/lib/pages/okr-map/number-select/index.js +2 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/auth.js +6 -6
- package/lib/utils/bs-global.js +12 -12
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/hooks.js +72 -0
- package/lib/utils/open-data.js +27 -31
- package/package.json +6 -3
- package/.eslintignore +0 -3
- package/.eslintrc.js +0 -223
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -31
- package/.prettierrc.js +0 -90
- package/.vscode/settings.json +0 -5
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
|
@@ -45,7 +45,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
45
45
|
|
|
46
46
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
47
47
|
|
|
48
|
-
var prefix =
|
|
48
|
+
var prefix = 'titaui-dynamic-task-item';
|
|
49
49
|
|
|
50
50
|
var DynamicTask = function DynamicTask(_ref) {
|
|
51
51
|
var data = _ref.data,
|
|
@@ -63,7 +63,7 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
63
63
|
searchKeyWord = _useContext.searchKeyWord;
|
|
64
64
|
|
|
65
65
|
var handleClickTaskTitle = function handleClickTaskTitle() {
|
|
66
|
-
window.Talent.app.vent.trigger(
|
|
66
|
+
window.Talent.app.vent.trigger('global-pull-screen', data.taskId, 'task');
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
var handleClickTitle = function handleClickTitle() {
|
|
@@ -71,13 +71,13 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
71
71
|
objId = obj.objId;
|
|
72
72
|
|
|
73
73
|
if (objType === _constant2.EObjType.Kr) {
|
|
74
|
-
_drawerManager["default"].open(
|
|
74
|
+
_drawerManager["default"].open('krDetail', {
|
|
75
75
|
krId: objId
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
if (objType === _constant2.EObjType.O) {
|
|
80
|
-
_drawerManager["default"].open(
|
|
80
|
+
_drawerManager["default"].open('okrDetail', {
|
|
81
81
|
okrId: objId
|
|
82
82
|
});
|
|
83
83
|
}
|
|
@@ -110,17 +110,17 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
110
110
|
var dom;
|
|
111
111
|
|
|
112
112
|
if (obj === null || !obj.objName) {
|
|
113
|
-
dom = "".concat((0, _getLocale.getLocale)(
|
|
113
|
+
dom = "".concat((0, _getLocale.getLocale)('Mod_InChargeof')).concat((0, _getLocale.getLocale)('Mod_Tasks'));
|
|
114
114
|
} else {
|
|
115
115
|
dom = /*#__PURE__*/_react["default"].createElement("span", {
|
|
116
116
|
className: "".concat(prefix, "__operate-desc-wrapper")
|
|
117
|
-
}, (0, _getLocale.getLocale)(
|
|
117
|
+
}, (0, _getLocale.getLocale)('Mod_InChargeof'), (0, _constant2.getObjTypeMapText)(obj.objType), /*#__PURE__*/_react["default"].createElement("span", {
|
|
118
118
|
className: "".concat(prefix, "__object-name"),
|
|
119
119
|
onClick: handleClickTitle
|
|
120
120
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
121
121
|
text: (0, _mblog.htmlDecodeByRegExp)(obj.objName),
|
|
122
122
|
isPercent: true
|
|
123
|
-
})), (0, _getLocale.getLocale)(
|
|
123
|
+
})), (0, _getLocale.getLocale)('Mod_stask'));
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -142,7 +142,7 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
142
142
|
className: "".concat(prefix, "__content-title")
|
|
143
143
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
144
144
|
className: "".concat(prefix, "__content-title-type")
|
|
145
|
-
}, (0, _getLocale.getLocale)(
|
|
145
|
+
}, (0, _getLocale.getLocale)('Feed_Tab_Title_Task')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
146
146
|
className: "".concat(prefix, "__content-title-text")
|
|
147
147
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
|
|
148
148
|
isPercent: true,
|
|
@@ -155,7 +155,7 @@ var DynamicTask = function DynamicTask(_ref) {
|
|
|
155
155
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
156
156
|
className: "".concat(prefix, "__content-status-text")
|
|
157
157
|
}, (0, _constant.getEStatusClass2StatusTypeText)()[status]), /*#__PURE__*/_react["default"].createElement("i", {
|
|
158
|
-
className: (0, _classnames["default"])(
|
|
158
|
+
className: (0, _classnames["default"])('tu-icon-deferred', "".concat(prefix, "__content-status-icon"))
|
|
159
159
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
160
160
|
className: "".concat(prefix, "__content-time-range")
|
|
161
161
|
}, startDate, "-", deadline)))));
|
|
@@ -71,6 +71,10 @@ var _feedOperate = _interopRequireDefault(require("./components/feed-operate"));
|
|
|
71
71
|
|
|
72
72
|
require("./index.css");
|
|
73
73
|
|
|
74
|
+
var _dynamicInterview = _interopRequireDefault(require("./dynamic-interview"));
|
|
75
|
+
|
|
76
|
+
var _dynamicInterviewShare = _interopRequireDefault(require("./dynamic-interview-share"));
|
|
77
|
+
|
|
74
78
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
75
79
|
|
|
76
80
|
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); }
|
|
@@ -103,7 +107,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
103
107
|
|
|
104
108
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
105
109
|
|
|
106
|
-
var prefix =
|
|
110
|
+
var prefix = 'titaui-dynamic-item';
|
|
107
111
|
|
|
108
112
|
var DynamicItem = function DynamicItem(_ref) {
|
|
109
113
|
var _getBSGlobal, _JSON$parse;
|
|
@@ -153,8 +157,8 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
153
157
|
searchKeyWord = _useContext.searchKeyWord;
|
|
154
158
|
|
|
155
159
|
var hasDynamicOpereateAuth = new _auth.DynamicManagerAuth().hasAuth();
|
|
156
|
-
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)(
|
|
157
|
-
return item.AppId ===
|
|
160
|
+
var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)('WebHead')) !== null && _getBSGlobal !== void 0 && _getBSGlobal.AppHead.find(function (item) {
|
|
161
|
+
return item.AppId === '950';
|
|
158
162
|
}));
|
|
159
163
|
var isBiShare = data.shareType === _constant.EShareType.BiShare && data.biId;
|
|
160
164
|
|
|
@@ -174,10 +178,10 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
174
178
|
|
|
175
179
|
var handleShowMore = function handleShowMore() {
|
|
176
180
|
if (data.feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
177
|
-
window.titaTracker(
|
|
178
|
-
actionName:
|
|
179
|
-
actionGroup:
|
|
180
|
-
productName:
|
|
181
|
+
window.titaTracker('planAction').record({
|
|
182
|
+
actionName: '查看日报',
|
|
183
|
+
actionGroup: '动态-查看更多',
|
|
184
|
+
productName: '动态',
|
|
181
185
|
feedId: feedId
|
|
182
186
|
});
|
|
183
187
|
}
|
|
@@ -186,18 +190,18 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
186
190
|
};
|
|
187
191
|
|
|
188
192
|
var onChangeParse = function onChangeParse(type) {
|
|
189
|
-
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)(
|
|
193
|
+
var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)('loginUserInfo'),
|
|
190
194
|
Id = _getBSGlobal2.Id;
|
|
191
195
|
|
|
192
196
|
var data = _toConsumableArray(praiseData).filter(function (item) {
|
|
193
197
|
return Number("".concat(item.userId)) !== Number("".concat(Id));
|
|
194
198
|
});
|
|
195
199
|
|
|
196
|
-
var actionName =
|
|
200
|
+
var actionName = '';
|
|
197
201
|
|
|
198
202
|
if (type) {
|
|
199
|
-
var avatar = (0, _bsGlobal.getBSGlobal)(
|
|
200
|
-
var name = (0, _bsGlobal.getBSGlobal)(
|
|
203
|
+
var avatar = (0, _bsGlobal.getBSGlobal)('loginUserInfo').UserAvatar;
|
|
204
|
+
var name = (0, _bsGlobal.getBSGlobal)('loginUserInfo').Name;
|
|
201
205
|
avatar.color = avatar.Color;
|
|
202
206
|
avatar.medium = avatar.Medium;
|
|
203
207
|
var parseUser = {
|
|
@@ -207,17 +211,17 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
207
211
|
praiseType: type
|
|
208
212
|
};
|
|
209
213
|
setPraiseData([parseUser].concat(_toConsumableArray(data)));
|
|
210
|
-
actionName =
|
|
214
|
+
actionName = '点赞日报';
|
|
211
215
|
} else {
|
|
212
216
|
setPraiseData(data);
|
|
213
|
-
actionName =
|
|
217
|
+
actionName = '取消日报点赞';
|
|
214
218
|
}
|
|
215
219
|
|
|
216
220
|
if (feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
217
|
-
window.titaTracker(
|
|
221
|
+
window.titaTracker('planAction').record({
|
|
218
222
|
actionName: actionName,
|
|
219
|
-
actionGroup:
|
|
220
|
-
productName:
|
|
223
|
+
actionGroup: '动态-日报',
|
|
224
|
+
productName: '动态',
|
|
221
225
|
feedId: feedId
|
|
222
226
|
});
|
|
223
227
|
}
|
|
@@ -304,6 +308,14 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
304
308
|
});
|
|
305
309
|
}
|
|
306
310
|
|
|
311
|
+
if (data.shareType === _constant.EShareType.InterviewShare) {
|
|
312
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicInterviewShare["default"], {
|
|
313
|
+
data: data,
|
|
314
|
+
onDeleteFeed: onDeleteFeed,
|
|
315
|
+
hasDynamicOpereateAuth: hasDynamicOpereateAuth
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
|
|
307
319
|
return /*#__PURE__*/_react["default"].createElement(_dynamicLearning["default"], {
|
|
308
320
|
data: data
|
|
309
321
|
});
|
|
@@ -333,6 +345,12 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
333
345
|
onDeleteFeed: onDeleteFeed
|
|
334
346
|
});
|
|
335
347
|
|
|
348
|
+
case _constant.EFeedType.Interview:
|
|
349
|
+
return /*#__PURE__*/_react["default"].createElement(_dynamicInterview["default"], {
|
|
350
|
+
data: data,
|
|
351
|
+
onDeleteFeed: onDeleteFeed
|
|
352
|
+
});
|
|
353
|
+
|
|
336
354
|
default:
|
|
337
355
|
return null;
|
|
338
356
|
}
|
|
@@ -340,7 +358,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
340
358
|
|
|
341
359
|
var renderUpvoteCount = function renderUpvoteCount(type, count) {
|
|
342
360
|
if (count === 0) {
|
|
343
|
-
return
|
|
361
|
+
return '';
|
|
344
362
|
}
|
|
345
363
|
|
|
346
364
|
return count || type;
|
|
@@ -358,10 +376,10 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
358
376
|
|
|
359
377
|
if (window.util) {
|
|
360
378
|
if (feedType === _constant.EFeedType.Report && window.titaTracker) {
|
|
361
|
-
window.titaTracker(
|
|
362
|
-
actionName:
|
|
363
|
-
actionGroup:
|
|
364
|
-
productName:
|
|
379
|
+
window.titaTracker('planAction').record({
|
|
380
|
+
actionName: '打开打赏弹层',
|
|
381
|
+
actionGroup: '动态-日报',
|
|
382
|
+
productName: '动态',
|
|
365
383
|
feedId: feedId
|
|
366
384
|
});
|
|
367
385
|
}
|
|
@@ -375,13 +393,13 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
375
393
|
var handleReply = function handleReply(_ref2) {
|
|
376
394
|
var submitType = _ref2.submitType;
|
|
377
395
|
if (feedType !== _constant.EFeedType.Report) return;
|
|
378
|
-
var actionName = submitType ===
|
|
396
|
+
var actionName = submitType === 'delete' ? '删除日报评论' : '评论日报';
|
|
379
397
|
|
|
380
398
|
if (window.titaTracker) {
|
|
381
|
-
window.titaTracker(
|
|
399
|
+
window.titaTracker('planAction').record({
|
|
382
400
|
actionName: actionName,
|
|
383
|
-
actionGroup:
|
|
384
|
-
productName:
|
|
401
|
+
actionGroup: '动态-日报',
|
|
402
|
+
productName: '动态',
|
|
385
403
|
feedId: feedId
|
|
386
404
|
});
|
|
387
405
|
}
|
|
@@ -409,15 +427,15 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
409
427
|
className: "".concat(prefix, "__content"),
|
|
410
428
|
ref: dynamicContentRef,
|
|
411
429
|
style: {
|
|
412
|
-
height: contentIsOverflow && isFold ?
|
|
430
|
+
height: contentIsOverflow && isFold ? '288px' : 'auto'
|
|
413
431
|
}
|
|
414
432
|
}, renderContent, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
415
433
|
condition: contentIsOverflow && isFold
|
|
416
434
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
417
435
|
className: "".concat(prefix, "__content-show-more"),
|
|
418
436
|
onClick: handleShowMore
|
|
419
|
-
}, (0, _getLocale.getLocale)(
|
|
420
|
-
className: (0, _classnames["default"])(
|
|
437
|
+
}, (0, _getLocale.getLocale)('Tasks_Tab_MyS_Butt_Seemoral'), /*#__PURE__*/_react["default"].createElement("i", {
|
|
438
|
+
className: (0, _classnames["default"])('tu-icon-arrow-down', "".concat(prefix, "__icon"))
|
|
421
439
|
})))), feedOperations.total > 0 && /*#__PURE__*/_react["default"].createElement(_feedOperate["default"], {
|
|
422
440
|
feedOperations: feedOperations,
|
|
423
441
|
data: data
|
|
@@ -455,12 +473,12 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
455
473
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
456
474
|
className: "".concat(prefix, "__footer-fold"),
|
|
457
475
|
onClick: handleFold
|
|
458
|
-
}, (0, _getLocale.getLocale)(
|
|
459
|
-
className: (0, _classnames["default"])(
|
|
476
|
+
}, (0, _getLocale.getLocale)('Mod_Fold'), /*#__PURE__*/_react["default"].createElement("i", {
|
|
477
|
+
className: (0, _classnames["default"])('tu-icon-arrow-down', "".concat(prefix, "__icon"), "".concat(prefix, "__icon-up"))
|
|
460
478
|
}))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
461
479
|
condition: hasRewardBtn
|
|
462
480
|
}, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
463
|
-
overlay: (0, _getLocale.getLocale)(
|
|
481
|
+
overlay: (0, _getLocale.getLocale)('Feed_Approval'),
|
|
464
482
|
align: {
|
|
465
483
|
offset: [0, 0]
|
|
466
484
|
},
|
|
@@ -470,7 +488,7 @@ var DynamicItem = function DynamicItem(_ref) {
|
|
|
470
488
|
className: (0, _classnames["default"])("".concat(prefix, "__footer-icon"), "".concat(prefix, "__footer-icon-redenvelopes"))
|
|
471
489
|
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
472
490
|
onClick: handleCommentClick,
|
|
473
|
-
className: (0, _classnames["default"])(
|
|
491
|
+
className: (0, _classnames["default"])('tu-icon-pinglun-m', "".concat(prefix, "__footer-icon"))
|
|
474
492
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
475
493
|
condition: feedComments.total > 0
|
|
476
494
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>点赞排行榜</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient x1="25.6749834%" y1="84.5410483%" x2="73.6493792%" y2="24.52131%" id="linearGradient-1">
|
|
6
|
+
<stop stop-color="#FFFFFF" offset="0%"></stop>
|
|
7
|
+
<stop stop-color="#FFA5A5" offset="100%"></stop>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
</defs>
|
|
10
|
+
<g id="页面-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
11
|
+
<g id="公告/分享" transform="translate(-1082.000000, -727.000000)">
|
|
12
|
+
<g id="置顶分享" transform="translate(1066.000000, 713.000000)">
|
|
13
|
+
<g id="点赞排行榜" transform="translate(16.000000, 14.000000)">
|
|
14
|
+
<circle id="椭圆形" fill="#F05E5E" cx="10" cy="10" r="10"></circle>
|
|
15
|
+
<path d="M4.58285466,13.3531698 L6.82522274,10 L6.82522274,10 L10,11.9877624 L7.90149916,15.2903228 C7.78302165,15.4767793 7.53582378,15.5318872 7.34936727,15.4134097 C7.29756512,15.3804938 7.25403227,15.3360987 7.22213851,15.283661 L6.42650106,13.9755248 L6.42650106,13.9755248 L4.91535766,13.9755248 C4.69444376,13.9755248 4.51535766,13.7964387 4.51535766,13.5755248 C4.51535766,13.4963603 4.53884808,13.4189759 4.58285466,13.3531698 Z" id="路径-3" fill="url(#linearGradient-1)"></path>
|
|
16
|
+
<path d="M10.416188,13.3531698 L12.6585561,10 L12.6585561,10 L15.8333333,11.9877624 L13.7348325,15.2903228 C13.616355,15.4767793 13.3691571,15.5318872 13.1827006,15.4134097 C13.1308985,15.3804938 13.0873656,15.3360987 13.0554718,15.283661 L12.2598344,13.9755248 L12.2598344,13.9755248 L10.748691,13.9755248 C10.5277771,13.9755248 10.348691,13.7964387 10.348691,13.5755248 C10.348691,13.4963603 10.3721814,13.4189759 10.416188,13.3531698 Z" id="路径-3" fill="url(#linearGradient-1)" transform="translate(12.916667, 12.916667) scale(-1, 1) translate(-12.916667, -12.916667) "></path>
|
|
17
|
+
<circle id="椭圆形" fill="#FFFFFF" cx="10" cy="9.16666667" r="4.16666667"></circle>
|
|
18
|
+
<path d="M10,10.4166667 L9.24792573,10.8120555 C9.0523879,10.9148558 8.81053703,10.8396772 8.70773671,10.6441394 C8.66680108,10.5662752 8.65267521,10.477088 8.66754595,10.3903849 L8.81117935,9.55293791 L8.81117935,9.55293791 L8.20273849,8.95985465 C8.04454506,8.80565416 8.04130814,8.55240886 8.19550862,8.39421542 C8.25691206,8.33122197 8.33736903,8.2902271 8.42442384,8.2775773 L9.26526843,8.15539542 L9.26526843,8.15539542 L9.64130557,7.39346097 C9.73907449,7.1953595 9.97892482,7.1140239 10.1770263,7.21179282 C10.2559113,7.25072492 10.3197623,7.31457592 10.3586944,7.39346097 L10.7347316,8.15539542 L10.7347316,8.15539542 L11.5755762,8.2775773 C11.7941941,8.30934434 11.9456667,8.51232148 11.9138996,8.73093943 C11.9012498,8.81799424 11.860255,8.8984512 11.7972615,8.95985465 L11.1888206,9.55293791 L11.1888206,9.55293791 L11.332454,10.3903849 C11.3697985,10.6081195 11.2235633,10.8149019 11.0058287,10.8522463 C10.9191257,10.867117 10.8299385,10.8529911 10.7520743,10.8120555 L10,10.4166667 L10,10.4166667 Z" id="星形" fill="#F05E5E"></path>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
.danamic-like-ranking {
|
|
2
|
+
margin-top: 10px;
|
|
3
|
+
width: 278px;
|
|
4
|
+
background: #ffffff;
|
|
5
|
+
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
6
|
+
border-radius: 12px;
|
|
7
|
+
padding: 12px 16px;
|
|
8
|
+
padding-top: 16px;
|
|
9
|
+
padding-bottom: 20px;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.danamic-like-ranking__header {
|
|
14
|
+
height: 24px;
|
|
15
|
+
font-size: 16px;
|
|
16
|
+
font-weight: 600;
|
|
17
|
+
color: #3f4755;
|
|
18
|
+
line-height: 24px;
|
|
19
|
+
margin-bottom: 10px;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.danamic-like-ranking__header-text {
|
|
26
|
+
margin-left: 4px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.danamic-like-ranking__header-image {
|
|
30
|
+
width: 20px;
|
|
31
|
+
height: 20px;
|
|
32
|
+
position: relative;
|
|
33
|
+
top: -2px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.danamic-like-ranking__header-right {
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
color: #2879ff;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.danamic-like-ranking__header-right:hover {
|
|
43
|
+
color: #5c8eff;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.danamic-like-ranking__content {
|
|
47
|
+
border-top: 1px solid #e9ecf0;
|
|
48
|
+
padding: 16px 0 0 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.danamic-like-ranking__content-table-empty {
|
|
52
|
+
margin: 50px auto 40px;
|
|
53
|
+
width: 160px;
|
|
54
|
+
height: 116px;
|
|
55
|
+
background: url("./image/ranking-empty.png") no-repeat;
|
|
56
|
+
background-size: 160px 116px;
|
|
57
|
+
position: relative;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.danamic-like-ranking__content-table-empty-text {
|
|
61
|
+
color: #6f7886;
|
|
62
|
+
width: 58px;
|
|
63
|
+
position: absolute;
|
|
64
|
+
bottom: 10px;
|
|
65
|
+
left: 0;
|
|
66
|
+
right: 0;
|
|
67
|
+
margin: auto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.danamic-like-ranking__content-table-items {
|
|
71
|
+
display: grid;
|
|
72
|
+
grid-template-columns: auto 28px auto auto;
|
|
73
|
+
grid-row-gap: 16px;
|
|
74
|
+
margin-left: -8px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.danamic-like-ranking__item:last-of-type {
|
|
78
|
+
margin-bottom: unset;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.danamic-like-ranking__item-pre {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.danamic-like-ranking__item-medal {
|
|
88
|
+
min-width: 21px;
|
|
89
|
+
height: 24px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.danamic-like-ranking__item-num {
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.danamic-like-ranking__item-avatar .titaui-pc-avator-container {
|
|
97
|
+
display: inline-flex !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.danamic-like-ranking__item-name {
|
|
101
|
+
margin-left: 8px;
|
|
102
|
+
display: inline-flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.danamic-like-ranking__item-like-text {
|
|
107
|
+
font-size: 13px;
|
|
108
|
+
font-weight: 400;
|
|
109
|
+
color: #89919f;
|
|
110
|
+
line-height: 22px;
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: flex-end;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.danamic-like-ranking__item-like-num {
|
|
117
|
+
font-size: 16px;
|
|
118
|
+
font-weight: 600;
|
|
119
|
+
color: #3f4755;
|
|
120
|
+
line-height: 22px;
|
|
121
|
+
margin-right: 4px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.danamic-like-ranking__tab-bar {
|
|
125
|
+
margin-bottom: 16px;
|
|
126
|
+
display: flex;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.danamic-like-ranking__tab-bar-item {
|
|
130
|
+
text-align: center;
|
|
131
|
+
width: 60px;
|
|
132
|
+
height: 28px;
|
|
133
|
+
line-height: 28px;
|
|
134
|
+
font-size: 14px;
|
|
135
|
+
font-weight: 400;
|
|
136
|
+
color: #3f4755;
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
margin-right: 6px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.danamic-like-ranking__tab-bar-item--selected {
|
|
142
|
+
border-radius: 18px;
|
|
143
|
+
background: rgba(40, 121, 255, 0.1);
|
|
144
|
+
border-radius: 15px;
|
|
145
|
+
color: #2879ff;
|
|
146
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
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 _requestApi = require("../request-api");
|
|
15
|
+
|
|
16
|
+
var _formatTime = require("../../../utils/format-time");
|
|
17
|
+
|
|
18
|
+
var _auth = require("../../../utils/auth");
|
|
19
|
+
|
|
20
|
+
var _item = _interopRequireDefault(require("./item"));
|
|
21
|
+
|
|
22
|
+
var _bsGlobal = require("../../../utils/bs-global");
|
|
23
|
+
|
|
24
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
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 _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
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 preCls = "danamic-like-ranking";
|
|
49
|
+
var Auth = new _auth.DynamicManagerAuth();
|
|
50
|
+
|
|
51
|
+
var DynamicLikeRanking = function DynamicLikeRanking() {
|
|
52
|
+
var _useState = (0, _react.useState)([]),
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
rankingData = _useState2[0],
|
|
55
|
+
setRankingData = _useState2[1];
|
|
56
|
+
|
|
57
|
+
var _useState3 = (0, _react.useState)((0, _getLocale.getLocale)("Mod_all")),
|
|
58
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
59
|
+
type = _useState4[0],
|
|
60
|
+
setType = _useState4[1];
|
|
61
|
+
|
|
62
|
+
var _useState5 = (0, _react.useState)({
|
|
63
|
+
createDate: "",
|
|
64
|
+
endDate: ""
|
|
65
|
+
}),
|
|
66
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
67
|
+
date = _useState6[0],
|
|
68
|
+
setDate = _useState6[1];
|
|
69
|
+
|
|
70
|
+
(0, _react.useEffect)(function () {
|
|
71
|
+
var createDate = date.createDate,
|
|
72
|
+
endDate = date.endDate;
|
|
73
|
+
(0, _requestApi.getRanking)({
|
|
74
|
+
ToUserIds: "",
|
|
75
|
+
ToDepIds: "",
|
|
76
|
+
ToGroupIds: "",
|
|
77
|
+
CreateDate: createDate,
|
|
78
|
+
EndDate: endDate,
|
|
79
|
+
ObjectType: 0,
|
|
80
|
+
ObjectTypeAction: 0,
|
|
81
|
+
PageNum: 1,
|
|
82
|
+
PageSize: 8,
|
|
83
|
+
ShowMySelf: true
|
|
84
|
+
}).then(function (res) {
|
|
85
|
+
if (res.Code === 1) {
|
|
86
|
+
var _res$Data = res.Data,
|
|
87
|
+
userPariseinfos = _res$Data.userPariseinfos,
|
|
88
|
+
currentUserPariseInfo = _res$Data.currentUserPariseInfo;
|
|
89
|
+
var data = userPariseinfos || [];
|
|
90
|
+
var currentUserIsInEighth = data.findIndex(function (item) {
|
|
91
|
+
return item.user.userId === (0, _bsGlobal.getUserInfo)().Id;
|
|
92
|
+
}) !== -1;
|
|
93
|
+
|
|
94
|
+
if (!currentUserIsInEighth) {
|
|
95
|
+
data = data.slice(0, 7);
|
|
96
|
+
|
|
97
|
+
if (currentUserPariseInfo && currentUserPariseInfo.user) {
|
|
98
|
+
data.push(currentUserPariseInfo);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
setRankingData(data);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}, [date]);
|
|
106
|
+
|
|
107
|
+
var handleLinkToPraiseRaking = function handleLinkToPraiseRaking() {
|
|
108
|
+
var href = window.location.href;
|
|
109
|
+
var url = "".concat(href.split("#")[0], "#praise-raking");
|
|
110
|
+
window.open(url, "self");
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
var handleChangeDate = function handleChangeDate(item) {
|
|
114
|
+
setType(item);
|
|
115
|
+
var createDate = "";
|
|
116
|
+
var endDate = "";
|
|
117
|
+
|
|
118
|
+
if (item == (0, _getLocale.getLocale)("Feed_Tab_Title_Thismonth")) {
|
|
119
|
+
createDate = (0, _formatTime.showMonthFirstDay)();
|
|
120
|
+
endDate = (0, _formatTime.showNextMonthFirstDay)();
|
|
121
|
+
} else if (item == (0, _getLocale.getLocale)("Feed_Tab_Title_Thisweek")) {
|
|
122
|
+
createDate = (0, _formatTime.showWeekFirstDay)();
|
|
123
|
+
endDate = (0, _formatTime.showNextWeekFirstDay)();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
setDate({
|
|
127
|
+
createDate: createDate,
|
|
128
|
+
endDate: endDate
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
function TabBar() {
|
|
133
|
+
var typeData = [(0, _getLocale.getLocale)("Mod_all"), (0, _getLocale.getLocale)("Feed_Tab_Title_Thisweek"), (0, _getLocale.getLocale)("Feed_Tab_Title_Thismonth")];
|
|
134
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
135
|
+
className: "".concat(preCls, "__tab-bar")
|
|
136
|
+
}, typeData.map(function (item, key) {
|
|
137
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
138
|
+
key: key,
|
|
139
|
+
className: (0, _classnames["default"])("".concat(preCls, "__tab-bar-item"), _defineProperty({}, "".concat(preCls, "__tab-bar-item--selected"), type === item)),
|
|
140
|
+
onClick: function onClick() {
|
|
141
|
+
return handleChangeDate(item);
|
|
142
|
+
}
|
|
143
|
+
}, item);
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
148
|
+
className: (0, _classnames["default"])("".concat(preCls))
|
|
149
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
150
|
+
className: (0, _classnames["default"])("".concat(preCls, "__header"))
|
|
151
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
152
|
+
className: (0, _classnames["default"])("".concat(preCls, "__header-left"))
|
|
153
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
154
|
+
className: (0, _classnames["default"])("".concat(preCls, "__header-image")),
|
|
155
|
+
src: require("./image/like-ranking.svg")
|
|
156
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
157
|
+
className: (0, _classnames["default"])("".concat(preCls, "__header-text"))
|
|
158
|
+
}, (0, _getLocale.getLocale)("Feed_Title_Likeranking"))), Auth.hasPraiseAuth() && /*#__PURE__*/_react["default"].createElement("div", {
|
|
159
|
+
className: (0, _classnames["default"])("".concat(preCls, "__header-right")),
|
|
160
|
+
onClick: handleLinkToPraiseRaking
|
|
161
|
+
}, (0, _getLocale.getLocale)("Feed_Set_Pop_Butt_More"))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
162
|
+
className: (0, _classnames["default"])("".concat(preCls, "__content"))
|
|
163
|
+
}, TabBar(), /*#__PURE__*/_react["default"].createElement("div", {
|
|
164
|
+
className: (0, _classnames["default"])("".concat(preCls, "__content-table"))
|
|
165
|
+
}, !rankingData || rankingData.length === 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
166
|
+
className: "".concat(preCls, "__content-table-empty")
|
|
167
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
168
|
+
className: "".concat(preCls, "__content-table-empty-text")
|
|
169
|
+
}, "\u6682\u65E0\u6392\u884C")), rankingData && rankingData.length > 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
170
|
+
className: (0, _classnames["default"])("".concat(preCls, "__content-table-items"))
|
|
171
|
+
}, rankingData.map(function (item, index) {
|
|
172
|
+
return /*#__PURE__*/_react["default"].createElement(_item["default"], {
|
|
173
|
+
userInfo: item,
|
|
174
|
+
key: index
|
|
175
|
+
});
|
|
176
|
+
})))));
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
var _default = DynamicLikeRanking;
|
|
180
|
+
exports["default"] = _default;
|