@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.
Files changed (270) hide show
  1. package/lib/components/avatar/name-avatar/index.css +0 -1
  2. package/lib/components/avatar/name-avatar/index.js +13 -22
  3. package/lib/components/avatar/text-avatar/index.css +7 -0
  4. package/lib/components/avatar/text-avatar/index.js +32 -7
  5. package/lib/components/button/icon-btn/index.js +17 -8
  6. package/lib/components/button/rect-btn/index.css +11 -45
  7. package/lib/components/button/rect-btn/index.js +13 -19
  8. package/lib/components/change-okr-modal/Item.js +14 -14
  9. package/lib/components/change-okr-modal/index.js +1 -2
  10. package/lib/components/create-okr-modal/index.js +1 -3
  11. package/lib/components/create-okr-modal/request-api.js +1 -1
  12. package/lib/components/dialog-confirm/index.css +2 -2
  13. package/lib/components/drawer/headerAction.js +1 -5
  14. package/lib/components/drawer/headerDrop.js +4 -42
  15. package/lib/components/drawer/index.css +0 -33
  16. package/lib/components/drawer/index.js +3 -26
  17. package/lib/components/drop-selector/index.js +25 -10
  18. package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
  19. package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
  20. package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
  21. package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
  22. package/lib/components/dynamic/advertise/index.css +21 -0
  23. package/lib/components/dynamic/advertise/index.js +126 -0
  24. package/lib/components/dynamic/advertise/interface.js +5 -0
  25. package/lib/components/dynamic/advertise/util.js +28 -0
  26. package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
  27. package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
  28. package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
  29. package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
  30. package/lib/components/dynamic/constant.js +33 -32
  31. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
  32. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
  33. package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
  34. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
  35. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
  36. package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
  37. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
  38. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
  39. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
  40. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
  41. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
  42. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
  43. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
  44. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
  45. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
  46. package/lib/components/dynamic/dynamic-item/index.js +50 -32
  47. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
  48. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  49. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  50. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  51. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  52. package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
  53. package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
  54. package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
  55. package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
  56. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
  57. package/lib/components/dynamic/dynamic-liking/index.css +81 -0
  58. package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
  59. package/lib/components/dynamic/dynamic-liking/item.js +75 -0
  60. package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
  61. package/lib/components/dynamic/dynamic-list/index.js +7 -15
  62. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
  63. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
  64. package/lib/components/dynamic/dynamic-topping/index.css +141 -0
  65. package/lib/components/dynamic/dynamic-topping/index.js +82 -0
  66. package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
  67. package/lib/components/dynamic/dynamic-topping/item.js +153 -0
  68. package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
  69. package/lib/components/dynamic/dynamic.css +173 -0
  70. package/lib/components/dynamic/dynamic.js +428 -0
  71. package/lib/components/dynamic/export-module/index.js +37 -0
  72. package/lib/components/dynamic/img/dynamic-top.svg +14 -0
  73. package/lib/components/dynamic/index.js +12 -9
  74. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  75. package/lib/components/dynamic/my-team/img/line.png +0 -0
  76. package/lib/components/dynamic/my-team/img/team.png +0 -0
  77. package/lib/components/dynamic/my-team/index.css +184 -0
  78. package/lib/components/dynamic/my-team/index.js +263 -0
  79. package/lib/components/dynamic/my-team/request-api.js +52 -0
  80. package/lib/components/dynamic/my-team/util.js +20 -0
  81. package/lib/components/dynamic/new-ui.css +192 -0
  82. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
  83. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
  84. package/lib/components/dynamic/online-broadcast/data.js +77 -0
  85. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
  86. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  87. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  88. package/lib/components/dynamic/online-broadcast/index.css +46 -0
  89. package/lib/components/dynamic/online-broadcast/index.js +61 -0
  90. package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
  91. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
  92. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
  93. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
  94. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
  95. package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
  96. package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
  97. package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
  98. package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
  99. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  100. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  101. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  102. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  103. package/lib/components/dynamic/quick-operation/index.css +51 -0
  104. package/lib/components/dynamic/quick-operation/index.js +120 -0
  105. package/lib/components/dynamic/request-api.js +68 -7
  106. package/lib/components/e-priority/index.js +8 -8
  107. package/lib/components/eReport/eReportShare/index.js +11 -11
  108. package/lib/components/form/form-fields/date/index.css +24 -0
  109. package/lib/components/form/form-fields/date/index.js +102 -0
  110. package/lib/components/form/form-fields/input/index.js +10 -10
  111. package/lib/components/form/form-fields/user/index.css +23 -3
  112. package/lib/components/form/form-fields/user/index.js +18 -8
  113. package/lib/components/form/form-fields/user/user-input.js +15 -6
  114. package/lib/components/form/index.js +10 -3
  115. package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
  116. package/lib/components/icon-button-list/index.js +3 -3
  117. package/lib/components/img-viewer/index.css +3 -3
  118. package/lib/components/img-viewer/index.js +11 -11
  119. package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
  120. package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
  121. package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
  122. package/lib/components/menus/components/menu-tree/index.css +4 -2
  123. package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
  124. package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
  125. package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
  126. package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
  127. package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
  128. package/lib/components/menus/index.js +11 -5
  129. package/lib/components/nav-top/components/menu/index.js +14 -14
  130. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
  131. package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
  132. package/lib/components/nav-top/components/user-message/constant.js +1 -0
  133. package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
  134. package/lib/components/nav-top/components/user-message/index.js +23 -20
  135. package/lib/components/nav-top/index.js +4 -8
  136. package/lib/components/nav-top/request.apis.js +3 -1
  137. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
  138. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
  139. package/lib/components/okr-detail/components/header/index.js +3 -10
  140. package/lib/components/okr-detail/components/header/o-name.js +3 -10
  141. package/lib/components/okr-detail/components/o-classify.js +1 -5
  142. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
  143. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
  144. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
  145. package/lib/components/okr-detail/detail-header/actions.js +23 -23
  146. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
  147. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
  148. package/lib/components/okr-detail/detail-header/index.css +0 -11
  149. package/lib/components/okr-detail/detail-header/index.js +234 -228
  150. package/lib/components/okr-detail/index.js +21 -40
  151. package/lib/components/okr-detail/okr-list/index.js +8 -11
  152. package/lib/components/okr-detail/request-apis.js +4 -10
  153. package/lib/components/okr-flow/child-node/index.css +6 -6
  154. package/lib/components/okr-flow/child-node/work-node.js +21 -21
  155. package/lib/components/okr-flow/export-modal/index.js +33 -19
  156. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
  157. package/lib/components/okr-flow/okr-map/index.js +5 -5
  158. package/lib/components/okr-flow/request-apis.js +4 -4
  159. package/lib/components/okr-flow/root-node/index.js +25 -24
  160. package/lib/components/okr-flow/utils/index.js +5 -5
  161. package/lib/components/okr-flow/utils/tree-handler.js +17 -17
  162. package/lib/components/okr-period-selector/index.js +5 -9
  163. package/lib/components/okr-period-selector/select-cycle.js +19 -23
  164. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
  165. package/lib/components/operation-records/index.js +1 -1
  166. package/lib/components/operation-records/style.js +1 -1
  167. package/lib/components/pagination/index.css +3 -3
  168. package/lib/components/pagination/select.css +58 -23
  169. package/lib/components/period-selector/index.css +3 -3
  170. package/lib/components/period-selector/index.js +11 -11
  171. package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
  172. package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
  173. package/lib/components/picker/components/panels/date-panel/index.css +14 -0
  174. package/lib/components/picker/components/panels/date-panel/index.js +49 -0
  175. package/lib/components/picker/components/panels/month-panel/index.css +27 -0
  176. package/lib/components/picker/components/panels/month-panel/index.js +63 -0
  177. package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
  178. package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
  179. package/lib/components/picker/components/panels/panel-body/index.js +53 -0
  180. package/lib/components/picker/components/panels/panel-head/index.js +48 -0
  181. package/lib/components/picker/components/panels/year-panel/index.css +23 -0
  182. package/lib/components/picker/components/panels/year-panel/index.js +65 -0
  183. package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
  184. package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
  185. package/lib/components/picker/components/picker-trigger/index.css +57 -0
  186. package/lib/components/picker/components/picker-trigger/index.js +94 -0
  187. package/lib/components/picker/context.js +15 -0
  188. package/lib/components/picker/index.css +121 -0
  189. package/lib/components/picker/index.js +13 -0
  190. package/lib/components/picker/picker-panels.js +182 -0
  191. package/lib/components/picker/picker.js +132 -0
  192. package/lib/components/picker/type.js +5 -0
  193. package/lib/components/picker/utils.js +28 -0
  194. package/lib/components/popup/index.js +4 -4
  195. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
  196. package/lib/components/radio/index.css +9 -9
  197. package/lib/components/scrollbar/scroll-mask/index.js +1 -1
  198. package/lib/components/superset-charts/utils/axios.js +5 -5
  199. package/lib/components/survey-model/index.css +18 -18
  200. package/lib/components/survey-model/instance.js +1 -1
  201. package/lib/components/task-relation-modal/request-api.js +1 -2
  202. package/lib/components/task-tree/helper.js +61 -0
  203. package/lib/components/task-tree/images/P1.svg +15 -0
  204. package/lib/components/task-tree/images/P2.svg +15 -0
  205. package/lib/components/task-tree/images/P3.svg +15 -0
  206. package/lib/components/task-tree/images/P4.svg +15 -0
  207. package/lib/components/task-tree/images/P5.svg +15 -0
  208. package/lib/components/task-tree/images/arrow.svg +9 -0
  209. package/lib/components/task-tree/images/empty-131.png +0 -0
  210. package/lib/components/task-tree/images/followed.svg +33 -0
  211. package/lib/components/task-tree/images/nice.svg +108 -0
  212. package/lib/components/task-tree/images/struc12.png +0 -0
  213. package/lib/components/task-tree/images/struc2.png +0 -0
  214. package/lib/components/task-tree/images/xialat-s.svg +13 -0
  215. package/lib/components/task-tree/index.js +22 -0
  216. package/lib/components/task-tree/mock.js +944 -0
  217. package/lib/components/task-tree/precls.js +8 -0
  218. package/lib/components/task-tree/request-apis.js +88 -0
  219. package/lib/components/task-tree/task-item-node/constant.js +45 -0
  220. package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
  221. package/lib/components/task-tree/task-item-node/e-project.js +212 -0
  222. package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
  223. package/lib/components/task-tree/task-item-node/e-task.js +426 -0
  224. package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
  225. package/lib/components/task-tree/task-item-node/index.css +289 -0
  226. package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
  227. package/lib/components/task-tree/task-tree.css +16 -0
  228. package/lib/components/task-tree/task-tree.js +49 -0
  229. package/lib/components/time-picker/index.css +123 -0
  230. package/lib/components/time-picker/index.js +13 -0
  231. package/lib/components/time-picker/time-picker-selector.js +138 -0
  232. package/lib/components/time-picker/time-picker.js +336 -0
  233. package/lib/components/time-picker/timer-picker-input.js +96 -0
  234. package/lib/components/time-picker/utils.js +52 -0
  235. package/lib/components/toast/index.js +3 -5
  236. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
  237. package/lib/components-v1/radio/radio.js +3 -3
  238. package/lib/components-v1/radio/style/index.css +8 -8
  239. package/lib/index.js +0 -40
  240. package/lib/pages/aha2021/index.js +5 -1
  241. package/lib/pages/new-okr-list/header/index.css +0 -45
  242. package/lib/pages/new-okr-list/header/index.js +16 -38
  243. package/lib/pages/new-okr-list/index.js +1 -3
  244. package/lib/pages/new-okr-list/list/index.js +2 -19
  245. package/lib/pages/new-okr-list/request-api.js +2 -8
  246. package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
  247. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
  248. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
  249. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
  250. package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
  251. package/lib/pages/okr-map/number-select/index.js +2 -2
  252. package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
  253. package/lib/utils/auth.js +6 -6
  254. package/lib/utils/bs-global.js +12 -12
  255. package/lib/utils/format-time.js +1 -8
  256. package/lib/utils/hooks.js +72 -0
  257. package/lib/utils/open-data.js +27 -31
  258. package/package.json +6 -3
  259. package/.eslintignore +0 -3
  260. package/.eslintrc.js +0 -223
  261. package/.husky/pre-commit +0 -4
  262. package/.prettierignore +0 -31
  263. package/.prettierrc.js +0 -90
  264. package/.vscode/settings.json +0 -5
  265. package/lib/components/okr-detail/detail-header/constant.js +0 -53
  266. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
  267. package/lib/components/okr-detail/helper.js +0 -108
  268. package/lib/components/textarea/index.css +0 -142
  269. package/lib/components/textarea/index.js +0 -259
  270. package/lib/pages/new-okr-list/header/common.js +0 -52
@@ -0,0 +1,128 @@
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 _reactRouter = require("react-router");
13
+
14
+ var _classnames = _interopRequireDefault(require("classnames"));
15
+
16
+ var _menuTree = _interopRequireDefault(require("../../components/menu-tree"));
17
+
18
+ var _index = require("../../components/menu-tree/tree-node/index");
19
+
20
+ var _constant = _interopRequireDefault(require("./constant"));
21
+
22
+ var _handleHighlight = _interopRequireDefault(require("./handle-highlight"));
23
+
24
+ var _getLocale = require("../../../../utils/getLocale");
25
+
26
+ var _flipMenuCard = _interopRequireDefault(require("../../components/flip-menu-card"));
27
+
28
+ var _scrollbar = _interopRequireDefault(require("../../../scrollbar"));
29
+
30
+ require("./index.css");
31
+
32
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
33
+
34
+ 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); }
35
+
36
+ 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; }
37
+
38
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
39
+
40
+ 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."); }
41
+
42
+ 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); }
43
+
44
+ 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; }
45
+
46
+ 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; }
47
+
48
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
49
+
50
+ var preCls = 'titaui-menus';
51
+ var expandedKeys = ['okr'];
52
+
53
+ function InterviewMenus(props) {
54
+ var history = props.history;
55
+
56
+ var _useState = (0, _react.useState)([]),
57
+ _useState2 = _slicedToArray(_useState, 2),
58
+ selectedMenuKeys = _useState2[0],
59
+ setSelectedMenuKeys = _useState2[1];
60
+
61
+ var flipRef = (0, _react.useRef)({
62
+ next: function next() {},
63
+ goback: function goback() {}
64
+ });
65
+ var menuRef = (0, _react.useRef)();
66
+
67
+ var formateToTreeNodeData = function formateToTreeNodeData(menus) {
68
+ var treeNodes = [];
69
+
70
+ for (var i = 0; i < menus.length; i = i + 1) {
71
+ var menu = menus[i];
72
+ var hasChildren = !!(menu.children && menu.children.length);
73
+ var isLeaf = menu.isLeaf !== undefined ? menu.isLeaf : !hasChildren;
74
+ var nodeType = menu.type;
75
+ if (!nodeType) nodeType = !isLeaf ? _index.PARENT_MENU_NODE : _index.SUB_MENU_ITEM_NOE;
76
+ treeNodes.push({
77
+ key: "".concat(menu.key),
78
+ title: (0, _getLocale.getLocale)(menu.label) ? (0, _getLocale.getLocale)(menu.label) : menu.label,
79
+ data: menu.data || menu,
80
+ isLeaf: isLeaf,
81
+ children: formateToTreeNodeData(menu.children || []),
82
+ nodeType: nodeType
83
+ });
84
+ }
85
+
86
+ return treeNodes;
87
+ };
88
+
89
+ var collapseMenu = function collapseMenu(isHide) {
90
+ if (isHide) {
91
+ menuRef.current.style.width = '0px';
92
+ } else {
93
+ menuRef.current.style.width = '';
94
+ }
95
+ };
96
+
97
+ (0, _react.useEffect)(function () {
98
+ var search = history.location.search;
99
+ var activeMenu = new _handleHighlight["default"](search).getHighLightMenu();
100
+ setSelectedMenuKeys([activeMenu]);
101
+ }, [history.location.pathname, history.location.search]);
102
+
103
+ var onSelectHandler = function onSelectHandler(selectedKyes) {
104
+ // 处理菜单选中
105
+ if (!selectedKyes.length) return;
106
+ setSelectedMenuKeys(selectedKyes);
107
+ };
108
+
109
+ return /*#__PURE__*/_react["default"].createElement("div", {
110
+ ref: menuRef,
111
+ className: (0, _classnames["default"])("".concat(preCls, "-interview-menus"))
112
+ }, /*#__PURE__*/_react["default"].createElement(_flipMenuCard["default"], {
113
+ collapseMenu: collapseMenu,
114
+ ref: flipRef,
115
+ defaultWidth: _getLocale.isEn ? 210 : 180
116
+ }, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
117
+ className: (0, _classnames["default"])("".concat(preCls, "-interview-menus-tree"))
118
+ }, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"], null, /*#__PURE__*/_react["default"].createElement(_menuTree["default"], {
119
+ data: formateToTreeNodeData((0, _constant["default"])()),
120
+ selectedKeys: selectedMenuKeys,
121
+ expandedKeys: expandedKeys,
122
+ onSelect: onSelectHandler
123
+ })))), /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null)));
124
+ }
125
+
126
+ var _default = (0, _reactRouter.withRouter)(InterviewMenus);
127
+
128
+ exports["default"] = _default;
@@ -15,6 +15,8 @@ var _appraisalMenus = _interopRequireDefault(require("./export-modules/appraisal
15
15
 
16
16
  var _manageMenus = _interopRequireDefault(require("./export-modules/manage-menus"));
17
17
 
18
+ var _interviewMenus = _interopRequireDefault(require("./export-modules/interview-menus"));
19
+
18
20
  require("./index.css");
19
21
 
20
22
  var _demoMenus = _interopRequireDefault(require("./export-modules/demo-menus"));
@@ -27,29 +29,33 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
27
29
 
28
30
  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; }
29
31
 
30
- var preCls = "titaui-menus";
32
+ var preCls = 'titaui-menus';
31
33
 
32
34
  var Menus = function Menus(props) {
33
35
  var type = props.type,
34
36
  restProps = _objectWithoutProperties(props, _excluded);
35
37
 
36
38
  var renderMenuByType = function renderMenuByType() {
37
- if (type === "okr") {
39
+ if (type === 'okr') {
38
40
  return /*#__PURE__*/_react["default"].createElement(_okrMenus["default"], restProps);
39
41
  }
40
42
 
41
- if (type === "appraisal") {
43
+ if (type === 'appraisal') {
42
44
  return /*#__PURE__*/_react["default"].createElement(_appraisalMenus["default"], restProps);
43
45
  }
44
46
 
45
- if (type === "manage") {
47
+ if (type === 'manage') {
46
48
  return /*#__PURE__*/_react["default"].createElement(_manageMenus["default"], restProps);
47
49
  }
48
50
 
49
- if (type === "demofree") {
51
+ if (type === 'demofree') {
50
52
  return /*#__PURE__*/_react["default"].createElement(_demoMenus["default"], restProps);
51
53
  }
52
54
 
55
+ if (type === 'interview') {
56
+ return /*#__PURE__*/_react["default"].createElement(_interviewMenus["default"], restProps);
57
+ }
58
+
53
59
  return undefined;
54
60
  };
55
61
 
@@ -43,7 +43,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
43
43
 
44
44
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
45
 
46
- var prefix = "titaui-nav-top-menu";
46
+ var prefix = 'titaui-nav-top-menu';
47
47
  var popupAlign = {
48
48
  offset: [0, 5],
49
49
  overflow: {
@@ -67,7 +67,7 @@ var Menu = function Menu(_ref) {
67
67
  feedNum = _useGlobalValue2[0];
68
68
 
69
69
  var containerRef = (0, _react.useRef)();
70
- var apiPath = (0, _bsGlobal.getBSGlobal)("apiPath");
70
+ var apiPath = (0, _bsGlobal.getBSGlobal)('apiPath');
71
71
  var userId = (0, _bsGlobal.getUserInfo)().Id;
72
72
 
73
73
  var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
@@ -76,23 +76,23 @@ var Menu = function Menu(_ref) {
76
76
 
77
77
  var handleTracker = function handleTracker(menu) {
78
78
  if (window.titaTracker) {
79
- window.titaTracker("action").record({
79
+ window.titaTracker('action').record({
80
80
  actionName: "\u5BFC\u822A\u83DC\u5355__".concat(menu.title),
81
- actionGroup: "导航菜单",
82
- productName: "导航菜单"
81
+ actionGroup: '导航菜单',
82
+ productName: '导航菜单'
83
83
  });
84
84
  }
85
85
  };
86
86
 
87
87
  var handleClickToLearning = function handleClickToLearning() {
88
- window.open("".concat(apiPath, "/").concat(userId, "/eLearningHome#/"), "_self");
88
+ window.open("".concat(apiPath, "/").concat(userId, "/eLearningHome#/"), '_self');
89
89
  };
90
90
 
91
91
  var renderRawItem = function renderRawItem(menu) {
92
92
  return /*#__PURE__*/_react["default"].createElement(_rcOverflow["default"].Item, {
93
93
  component: "span"
94
94
  }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
95
- condition: menu.title !== "Learning"
95
+ condition: menu.title !== 'Learning'
96
96
  }, /*#__PURE__*/_react["default"].createElement("a", {
97
97
  className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
98
98
  href: "".concat(menu.href),
@@ -100,10 +100,10 @@ var Menu = function Menu(_ref) {
100
100
  onClick: function onClick() {
101
101
  return handleTracker(menu);
102
102
  }
103
- }, menu.title, menu.href === "#dynamic" && feedNum > 0 && /*#__PURE__*/_react["default"].createElement("div", {
104
- className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href === "#dynamic"))
105
- }, feedNum > 100 ? "99+" : feedNum))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
106
- condition: menu.title === "Learning"
103
+ }, menu.title, menu.href === '#dynamic' && feedNum > 0 && /*#__PURE__*/_react["default"].createElement("div", {
104
+ className: (0, _classnames["default"])("".concat(prefix, "__menu--hasNum"), _defineProperty({}, "".concat(prefix, "__menu--hasNum-active"), activeMenuId === menu.id && menu.href === '#dynamic'))
105
+ }, feedNum > 100 ? '99+' : feedNum))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
106
+ condition: menu.title === 'Learning'
107
107
  }, /*#__PURE__*/_react["default"].createElement("span", {
108
108
  className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId === menu.id)),
109
109
  onClick: function onClick() {
@@ -123,14 +123,14 @@ var Menu = function Menu(_ref) {
123
123
  className: "".concat(prefix, "__hide-menus")
124
124
  }, items.map(function (menu) {
125
125
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
126
- condition: menu.title !== "Learning"
126
+ condition: menu.title !== 'Learning'
127
127
  }, /*#__PURE__*/_react["default"].createElement("a", {
128
128
  className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId === menu.id)),
129
129
  href: "".concat(menu.href),
130
130
  key: menu.id,
131
131
  target: "_self"
132
132
  }, menu.title)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
133
- condition: menu.title === "Learning"
133
+ condition: menu.title === 'Learning'
134
134
  }, /*#__PURE__*/_react["default"].createElement("a", {
135
135
  className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId === menu.id)),
136
136
  href: "".concat(apiPath, "/").concat(userId, "/eLearningHome#/"),
@@ -146,7 +146,7 @@ var Menu = function Menu(_ref) {
146
146
  popupPlacement: "bottomLeft",
147
147
  popupAlign: popupAlign
148
148
  }, /*#__PURE__*/_react["default"].createElement("span", {
149
- className: (0, _classnames["default"])("tu-icon-diot", "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
149
+ className: (0, _classnames["default"])('tu-icon-diot', "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
150
150
  }));
151
151
  };
152
152
 
@@ -35,7 +35,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
35
35
 
36
36
  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; }
37
37
 
38
- var preCls = "titaui-user-message-msg-inform";
38
+ var preCls = 'titaui-user-message-msg-inform';
39
39
 
40
40
  function Inform(props) {
41
41
  var item = props.item,
@@ -47,10 +47,11 @@ function Inform(props) {
47
47
  onItemClick && onItemClick(false);
48
48
  var objType = item.objType,
49
49
  objId = item.objId,
50
- messageType = item.messageType;
50
+ messageType = item.messageType,
51
+ user = item.user;
51
52
 
52
53
  if (objType === _constant.EObjType.Kr) {
53
- _drawerManager["default"].open("krDetail", {
54
+ _drawerManager["default"].open('krDetail', {
54
55
  krId: objId
55
56
  });
56
57
 
@@ -58,7 +59,7 @@ function Inform(props) {
58
59
  }
59
60
 
60
61
  if (objType === _constant.EObjType.O) {
61
- _drawerManager["default"].open("okrDetail", {
62
+ _drawerManager["default"].open('okrDetail', {
62
63
  okrId: objId
63
64
  });
64
65
 
@@ -72,20 +73,25 @@ function Inform(props) {
72
73
 
73
74
  if (objType === _constant.EObjType.Task) {
74
75
  // @ts-ignore
75
- window.Talent.app.vent.trigger("global-pull-screen", objId, "task");
76
+ window.Talent.app.vent.trigger('global-pull-screen', objId, 'task');
76
77
  return;
77
78
  }
78
79
 
79
80
  if (objType === _constant.EObjType.Remind) {
80
81
  // @ts-ignore
81
- window.Talent.app.vent.trigger("global-daily-detail-pull-screen", objId);
82
+ window.Talent.app.vent.trigger('global-daily-detail-pull-screen', objId);
83
+ return;
84
+ }
85
+
86
+ if (objType === _constant.EObjType.Interview) {
87
+ (0, _tools.openPage)("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/interview?reactRouterName=detail&hideNavTop=true&recordId=").concat(objId, "&toUserId=").concat(user === null || user === void 0 ? void 0 : user.userId));
82
88
  return;
83
89
  }
84
90
 
85
91
  if (messageType == 135) {
86
92
  var redisKey = item.content.match(/redisKey=(\S*?)"/)[1]; // @ts-ignore
87
93
 
88
- Talent.app.vent.trigger("open-weekly-report-modal", redisKey);
94
+ Talent.app.vent.trigger('open-weekly-report-modal', redisKey);
89
95
  return;
90
96
  } // 处理合并的消息
91
97
 
@@ -111,13 +117,13 @@ function Inform(props) {
111
117
  if (objType === 0) {
112
118
  var str = item.content.match(/\/\/.*?[\"|\']/gi);
113
119
  if (!str) return;
114
- str = str.join("");
120
+ str = str.join('');
115
121
 
116
122
  var _url = str.slice(0, str.length - 1);
117
123
 
118
124
  if (_url) {
119
- if (item.content.indexOf("点击此处下载") !== -1) {
120
- window.open(_url, "_self");
125
+ if (item.content.indexOf('点击此处下载') !== -1) {
126
+ window.open(_url, '_self');
121
127
  }
122
128
 
123
129
  (0, _tools.openPage)(_url);
@@ -147,7 +153,7 @@ function Inform(props) {
147
153
  var _str = item.content.match(/\/\/.*?[\"|\']/gi);
148
154
 
149
155
  if (!_str) return;
150
- _str = _str.join("");
156
+ _str = _str.join('');
151
157
 
152
158
  var _url3 = _str.slice(0, _str.length - 1);
153
159
 
@@ -159,7 +165,7 @@ function Inform(props) {
159
165
  var _str2 = item.content.match(/https:.*?[\"|\']/gi);
160
166
 
161
167
  if (!_str2) return;
162
- _str2 = _str2.join("");
168
+ _str2 = _str2.join('');
163
169
 
164
170
  var _url4 = _str2.slice(0, _str2.length - 1);
165
171
 
@@ -178,7 +184,7 @@ function Inform(props) {
178
184
  }
179
185
 
180
186
  var reg = /href='.*?(?=')/g;
181
- var url = "";
187
+ var url = '';
182
188
  item.content.replace(reg, function ($0) {
183
189
  url = $0.slice(6);
184
190
  });
@@ -189,22 +195,22 @@ function Inform(props) {
189
195
  }
190
196
  }
191
197
 
192
- var notificationType = "e-report"; // E-周报提醒消息合并
198
+ var notificationType = 'e-report'; // E-周报提醒消息合并
193
199
 
194
200
  var content = domRef.current.textContent;
195
201
 
196
- if (messageType == "83") {
202
+ if (messageType == '83') {
197
203
  // 项目,目标进展提醒消息合并
198
- notificationType = "project-objective";
204
+ notificationType = 'project-objective';
199
205
  } else if (Number(messageType) > 93 && Number(messageType) <= 100) {
200
206
  // OKR 仪表盘消息提醒
201
- notificationType = "okr-dashBoard";
207
+ notificationType = 'okr-dashBoard';
202
208
  } else if (messageType == 131 || messageType == 136) {
203
- notificationType = "performance";
209
+ notificationType = 'performance';
204
210
  content = item.content;
205
211
  }
206
212
 
207
- _drawerManager["default"].open("NotificationMergeDetail", {
213
+ _drawerManager["default"].open('NotificationMergeDetail', {
208
214
  config: {
209
215
  content: content,
210
216
  messageId: item.messageId,
@@ -23,10 +23,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
23
23
 
24
24
  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; }
25
25
 
26
- var preCls = "titaui-user-message-msg-remind";
26
+ var preCls = 'titaui-user-message-msg-remind';
27
27
 
28
28
  function Remind(props) {
29
- var item = props.item,
29
+ var _props$item = props.item,
30
+ content = _props$item.content,
31
+ id = _props$item.id,
32
+ objId = _props$item.objId,
33
+ objName = _props$item.objName,
34
+ objType = _props$item.objType,
35
+ remindUser = _props$item.remindUser,
30
36
  onItemClick = props.onItemClick,
31
37
  deleteTask = props.deleteTask,
32
38
  reminds = props.reminds;
@@ -36,12 +42,44 @@ function Remind(props) {
36
42
  };
37
43
 
38
44
  var deleteOneTask = function deleteOneTask() {
39
- deleteTask(item);
45
+ deleteTask(props.item);
46
+ };
47
+
48
+ var getItemLabelName = function getItemLabelName() {
49
+ var labelName;
50
+
51
+ switch (objType) {
52
+ case _constant.EObjType.Interview:
53
+ labelName = (0, _getLocale.getLocale)('Ooo_Mo_1on1');
54
+ break;
55
+
56
+ default:
57
+ labelName = (0, _getLocale.getLocale)('Mod_Tasks');
58
+ break;
59
+ }
60
+
61
+ return labelName;
62
+ };
63
+
64
+ var getHref = function getHref() {
65
+ var href;
66
+
67
+ switch (objType) {
68
+ case _constant.EObjType.Interview:
69
+ href = "".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/interview?reactRouterName=detail&recordId=").concat(objId, "&toUserId=").concat(remindUser === null || remindUser === void 0 ? void 0 : remindUser.userId, "&hideNavTop=true");
70
+ break;
71
+
72
+ default:
73
+ href = "".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/taskinfo?Id=").concat(objId);
74
+ break;
75
+ }
76
+
77
+ return href;
40
78
  };
41
79
 
42
80
  return /*#__PURE__*/_react["default"].createElement("li", {
43
81
  className: (0, _classnames["default"])("".concat(preCls, "__item"), _defineProperty({}, "".concat(preCls, "__item--scroll"), reminds.length >= 5)),
44
- key: item.id
82
+ key: id
45
83
  }, /*#__PURE__*/_react["default"].createElement("img", {
46
84
  src: _appTixing["default"],
47
85
  className: (0, _classnames["default"])("".concat(preCls, "__item-photo"))
@@ -49,13 +87,13 @@ function Remind(props) {
49
87
  className: (0, _classnames["default"])("".concat(preCls, "__item-right"))
50
88
  }, /*#__PURE__*/_react["default"].createElement("div", {
51
89
  className: (0, _classnames["default"])("".concat(preCls, "__item-right-name"))
52
- }, /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)("Mod_Tasks")), /*#__PURE__*/_react["default"].createElement("span", {
90
+ }, /*#__PURE__*/_react["default"].createElement("span", null, getItemLabelName()), /*#__PURE__*/_react["default"].createElement("span", {
53
91
  className: (0, _classnames["default"])("".concat(preCls, "__item-right-name-status"))
54
- }, item.content)), /*#__PURE__*/_react["default"].createElement("div", {
92
+ }, content)), /*#__PURE__*/_react["default"].createElement("div", {
55
93
  className: (0, _classnames["default"])("".concat(preCls, "__item-right-content"))
56
94
  }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
57
95
  overlayClassName: "".concat(preCls, "__item-right-content-tooltip"),
58
- text: item.objName,
96
+ text: objName,
59
97
  isPercent: true,
60
98
  mouseEnterDelay: 0.8
61
99
  }))), /*#__PURE__*/_react["default"].createElement("div", {
@@ -63,15 +101,15 @@ function Remind(props) {
63
101
  }, /*#__PURE__*/_react["default"].createElement("span", {
64
102
  className: (0, _classnames["default"])("".concat(preCls, "__item-handle-ignore")),
65
103
  onClick: deleteOneTask
66
- }, (0, _getLocale.getLocale)("Tasks_Menu_Ignore")), /*#__PURE__*/_react["default"].createElement("a", {
104
+ }, (0, _getLocale.getLocale)('Tasks_Menu_Ignore')), /*#__PURE__*/_react["default"].createElement("a", {
67
105
  target: "_blank",
68
- href: "".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/taskinfo?Id=").concat(item.objId),
106
+ href: getHref(),
69
107
  onClick: handleRemindClick,
70
108
  rel: "noreferrer"
71
109
  }, /*#__PURE__*/_react["default"].createElement("span", {
72
110
  className: (0, _classnames["default"])("".concat(preCls, "__item-handle-deal")),
73
111
  onClick: deleteOneTask
74
- }, (0, _getLocale.getLocale)("Feed_Tab_ToDealWith")))));
112
+ }, (0, _getLocale.getLocale)('Feed_Tab_ToDealWith')))));
75
113
  }
76
114
 
77
115
  var _default = Remind;
@@ -50,4 +50,5 @@ exports.EObjType = EObjType;
50
50
  EObjType[EObjType["MileStone"] = 27] = "MileStone";
51
51
  EObjType[EObjType["KanBan"] = 66] = "KanBan";
52
52
  EObjType[EObjType["Remind"] = 8] = "Remind";
53
+ EObjType[EObjType["Interview"] = 81] = "Interview";
53
54
  })(EObjType || (exports.EObjType = EObjType = {}));
@@ -43,7 +43,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
43
43
 
44
44
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
45
 
46
- var prefixCls = "titaui-user-message";
46
+ var prefixCls = 'titaui-user-message';
47
47
 
48
48
  function HrMessage() {
49
49
  var _useState = (0, _react.useState)(0),
@@ -71,7 +71,7 @@ function HrMessage() {
71
71
  preData = _useState10[0],
72
72
  setPreData = _useState10[1];
73
73
 
74
- var _useState11 = (0, _react.useState)("todos"),
74
+ var _useState11 = (0, _react.useState)('todos'),
75
75
  _useState12 = _slicedToArray(_useState11, 2),
76
76
  firstTab = _useState12[0],
77
77
  setFirstTab = _useState12[1];
@@ -86,16 +86,16 @@ function HrMessage() {
86
86
  setAllData(res.Data.indicators);
87
87
  var indicators = res.Data.indicators;
88
88
  var todos = indicators.find(function (item) {
89
- return item.type === "todoIndicator";
89
+ return item.type === 'todoIndicator';
90
90
  });
91
91
  var informs = indicators.find(function (item) {
92
- return item.type === "messageIndicator";
92
+ return item.type === 'messageIndicator';
93
93
  });
94
94
  var replys = indicators.find(function (item) {
95
- return item.type === "mLeaveandComment";
95
+ return item.type === 'mLeaveandComment';
96
96
  });
97
97
  var reminds = indicators.find(function (item) {
98
- return item.type === "Tx";
98
+ return item.type === 'Tx';
99
99
  });
100
100
  var total = 0; // @与回复的数量在通知里面包含了
101
101
 
@@ -115,17 +115,17 @@ function HrMessage() {
115
115
  setInfosNum(total);
116
116
 
117
117
  if (todos && todos.value) {
118
- setFirstTab("todos");
118
+ setFirstTab('todos');
119
119
  } else if (informs && !replys && informs.value) {
120
- setFirstTab("informs");
120
+ setFirstTab('informs');
121
121
  } else if (replys && informs.value - replys.value === 0) {
122
- setFirstTab("replys");
122
+ setFirstTab('replys');
123
123
  } else if (replys && informs.value - replys.value > 0) {
124
- setFirstTab("informs");
124
+ setFirstTab('informs');
125
125
  } else if (reminds && reminds.value) {
126
- setFirstTab("reminds");
126
+ setFirstTab('reminds');
127
127
  } else {
128
- setFirstTab("todos");
128
+ setFirstTab('todos');
129
129
  } // 判断是企业勋章
130
130
 
131
131
 
@@ -135,20 +135,20 @@ function HrMessage() {
135
135
 
136
136
  enterpriseMedalMsg.length > 0 && window.util.upaasEnterpriseMedal(); // upaas 勋章
137
137
 
138
- var medalDetail = (0, _bsGlobal.getBSGlobal)("medalDetail"); // @ts-ignore
138
+ var medalDetail = (0, _bsGlobal.getBSGlobal)('medalDetail'); // @ts-ignore
139
139
 
140
140
  medalDetail && window.util.upaasMedal()(medalDetail); // 红包
141
141
 
142
142
  var mRedPackIndicator = indicators.filter(function (item) {
143
- return item.type === "mRedPackIndicator";
143
+ return item.type === 'mRedPackIndicator';
144
144
  });
145
145
  mRedPackIndicator.length > 0 && setRedPackNum(mRedPackIndicator[0].value); // 祝福,拆礼物
146
146
 
147
147
  var blessIndicator = indicators.filter(function (item) {
148
- return item.type === "mZhufu";
148
+ return item.type === 'mZhufu';
149
149
  });
150
150
  var weeklyReportIndicator = indicators.filter(function (item) {
151
- return item.type === "mWeekStatisticIndicator";
151
+ return item.type === 'mWeekStatisticIndicator';
152
152
  });
153
153
 
154
154
  if (blessIndicator.length === 1) {
@@ -165,7 +165,7 @@ function HrMessage() {
165
165
  if (weeklyReportIndicator.length) {
166
166
  var _window;
167
167
 
168
- (_window = window) === null || _window === void 0 ? void 0 : _window.Talent.app.vent.trigger("open-weekly-report-modal");
168
+ (_window = window) === null || _window === void 0 ? void 0 : _window.Talent.app.vent.trigger('open-weekly-report-modal');
169
169
  }
170
170
  }
171
171
  });
@@ -174,7 +174,10 @@ function HrMessage() {
174
174
  (0, _react.useEffect)(function () {
175
175
  setPreData(infosNum);
176
176
  handleIntervalRequestMessageInfo();
177
- setInterval(handleIntervalRequestMessageInfo, 15000);
177
+ var interval = setInterval(handleIntervalRequestMessageInfo, 15000);
178
+ return function () {
179
+ return clearInterval(interval);
180
+ };
178
181
  }, []);
179
182
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
180
183
  popup: /*#__PURE__*/_react["default"].createElement(_msg["default"], {
@@ -182,7 +185,7 @@ function HrMessage() {
182
185
  allData: allData,
183
186
  handleIntervalRequestMessageInfo: handleIntervalRequestMessageInfo,
184
187
  firstTab: firstTab,
185
- tabs: ["todos", "informs", "replys"]
188
+ tabs: ['todos', 'informs', 'replys']
186
189
  }),
187
190
  popupVisible: popupVisible,
188
191
  popupTransitionName: (0, _classnames["default"])("".concat(prefixCls, "__popup-right-bottom")),