@titaui/pc 1.6.8 → 1.6.12

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 (330) hide show
  1. package/lib/components/avatar/index.js +1 -1
  2. package/lib/components/button/icon-btn/index.css +38 -0
  3. package/lib/components/button/icon-btn/index.js +62 -0
  4. package/lib/components/button/index.css +3 -0
  5. package/lib/components/button/index.js +16 -9
  6. package/lib/components/button/rect-btn/index.css +82 -0
  7. package/lib/components/button/rect-btn/index.js +62 -0
  8. package/lib/components/button/text-btn/index.css +0 -0
  9. package/lib/components/button/text-btn/index.js +15 -0
  10. package/lib/components/button/types.js +5 -0
  11. package/lib/components/change-okr/index.js +1 -1
  12. package/lib/components/change-okr/styledComponents.js +1 -1
  13. package/lib/components/communication/style.js +1 -1
  14. package/lib/components/condition-render/index.js +20 -0
  15. package/lib/components/create-okr/constant.js +1 -1
  16. package/lib/components/create-okr/fields/index.js +1 -1
  17. package/lib/components/create-okr/request-api.js +1 -1
  18. package/lib/components/create-okr/style.js +1 -1
  19. package/lib/components/create-okr/utils/helper.js +1 -1
  20. package/lib/components/delete-confirm-pop/style.js +1 -1
  21. package/lib/components/drawer/index.css +3 -1
  22. package/lib/components/drawer/index.js +2 -1
  23. package/lib/components/dropdown-layer/index.js +1 -1
  24. package/lib/components/dynamic/constant.js +1 -1
  25. package/lib/components/dynamic/dynamic-item/components/header/index.css +0 -5
  26. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -0
  27. package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +1 -1
  28. package/lib/components/dynamic/dynamic-like-ranking/index.css +1 -0
  29. package/lib/components/dynamic/dynamic-topping/request-api.js +1 -1
  30. package/lib/components/dynamic/export-module/index.js +1 -1
  31. package/lib/components/dynamic/index.js +1 -1
  32. package/lib/components/dynamic/request-api.js +1 -1
  33. package/lib/components/dynamic/util.js +1 -1
  34. package/lib/components/eReport/eReportLists/style.js +1 -1
  35. package/lib/components/eReport/eReportShare/style.js +1 -1
  36. package/lib/components/eReport/eReportShare/toast/style.js +1 -1
  37. package/lib/components/edit-kr-wight/style/index.js +1 -1
  38. package/lib/components/emotionsSelector/style.js +1 -1
  39. package/lib/components/file-list/index.js +1 -1
  40. package/lib/components/follower-visitor/img/follower-visitor-follower.png +0 -0
  41. package/lib/components/follower-visitor/img/follower-visitor-visitor.png +0 -0
  42. package/lib/components/follower-visitor/index.css +35 -0
  43. package/lib/components/follower-visitor/index.js +152 -0
  44. package/lib/components/follower-visitor/request-api.js +14 -0
  45. package/lib/components/form/form-fields/radios/index.css +25 -0
  46. package/lib/components/form/form-fields/radios/index.js +53 -0
  47. package/lib/components/form/index.js +5 -2
  48. package/lib/components/grid-page/commen-components/index.js +4 -4
  49. package/lib/components/grid-page/commen-components/scroll-tips.js +1 -1
  50. package/lib/components/grid-page/util/network.js +1 -1
  51. package/lib/components/help-card/image/canceled.svg +13 -0
  52. package/lib/components/help-card/image/helpzx.svg +8 -0
  53. package/lib/components/help-card/image/kefu.svg +18 -0
  54. package/lib/components/help-card/image/kefu1.svg +8 -0
  55. package/lib/components/help-card/image/okr-shequ.svg +14 -0
  56. package/lib/components/help-card/image/question.svg +20 -0
  57. package/lib/components/help-card/image/yuyueyanshi.svg +8 -0
  58. package/lib/components/help-card/index.css +219 -0
  59. package/lib/components/help-card/index.js +282 -0
  60. package/lib/components/help-card/request-api.js +34 -0
  61. package/lib/components/invite-people/img/invite-people.png +0 -0
  62. package/lib/components/invite-people/index.css +9 -0
  63. package/lib/components/invite-people/index.js +28 -0
  64. package/lib/components/mblog/common/index.js +3 -3
  65. package/lib/components/mblog/style.js +1 -1
  66. package/lib/components/menus/components/drag-resize/index.css +18 -0
  67. package/lib/components/menus/components/drag-resize/index.js +77 -0
  68. package/lib/components/menus/components/flip-menu-card/back-icon.svg +25 -0
  69. package/lib/components/menus/components/flip-menu-card/flip-back-header.js +28 -0
  70. package/lib/components/menus/components/flip-menu-card/index.css +89 -0
  71. package/lib/components/menus/components/flip-menu-card/index.js +193 -0
  72. package/lib/components/menus/components/flip-menu-card/precls.js +8 -0
  73. package/lib/components/menus/components/menu-card/index.css +29 -0
  74. package/lib/components/menus/components/menu-card/index.js +53 -0
  75. package/lib/components/menus/components/menu-close-btn/index.css +42 -0
  76. package/lib/components/menus/components/menu-close-btn/index.js +40 -0
  77. package/lib/components/menus/components/menu-tree/images/appraisal-menu/PF-shezhi.svg +8 -0
  78. package/lib/components/menus/components/menu-tree/images/appraisal-menu/ZBmuban.svg +8 -0
  79. package/lib/components/menus/components/menu-tree/images/appraisal-menu/bumen.svg +9 -0
  80. package/lib/components/menus/components/menu-tree/images/appraisal-menu/kaohe.svg +10 -0
  81. package/lib/components/menus/components/menu-tree/images/appraisal-menu/uniEA10.svg +8 -0
  82. package/lib/components/menus/components/menu-tree/images/appraisal-menu/untitled.svg +10 -0
  83. package/lib/components/menus/components/menu-tree/images/arrow.svg +9 -0
  84. package/lib/components/menus/components/menu-tree/images/caidan-xiashu.svg +16 -0
  85. package/lib/components/menus/components/menu-tree/images/okr-menu/ditu.svg +18 -0
  86. package/lib/components/menus/components/menu-tree/images/okr-menu/guanzhu.svg +14 -0
  87. package/lib/components/menus/components/menu-tree/images/okr-menu/okr-gongsi.svg +18 -0
  88. package/lib/components/menus/components/menu-tree/images/okr-menu/okr.svg +19 -0
  89. package/lib/components/menus/components/menu-tree/images/okr-menu/rw-zx.svg +16 -0
  90. package/lib/components/menus/components/menu-tree/images/user-concern-add.svg +29 -0
  91. package/lib/components/menus/components/menu-tree/images/yibiao.svg +14 -0
  92. package/lib/components/menus/components/menu-tree/index.css +33 -0
  93. package/lib/components/menus/components/menu-tree/index.js +66 -0
  94. package/lib/components/menus/components/menu-tree/precls.js +8 -0
  95. package/lib/components/menus/components/menu-tree/tree-node/company-all-node.js +48 -0
  96. package/lib/components/menus/components/menu-tree/tree-node/compony-node/index.css +17 -0
  97. package/lib/components/menus/components/menu-tree/tree-node/compony-node/index.js +41 -0
  98. package/lib/components/menus/components/menu-tree/tree-node/depart-node/index.css +24 -0
  99. package/lib/components/menus/components/menu-tree/tree-node/depart-node/index.js +73 -0
  100. package/lib/components/{button/admin-button/primary.js → menus/components/menu-tree/tree-node/group-name-node.js} +7 -14
  101. package/lib/components/menus/components/menu-tree/tree-node/index.css +360 -0
  102. package/lib/components/menus/components/menu-tree/tree-node/index.js +91 -0
  103. package/lib/components/menus/components/menu-tree/tree-node/menu-item-node.js +40 -0
  104. package/lib/components/menus/components/menu-tree/tree-node/menu-node.js +36 -0
  105. package/lib/components/menus/components/menu-tree/tree-node/user-concern-node.js +86 -0
  106. package/lib/components/menus/components/menu-tree/tree-node/user-node/index.css +56 -0
  107. package/lib/components/menus/components/menu-tree/tree-node/user-node/index.js +111 -0
  108. package/lib/components/menus/components/search-colleague/index.css +53 -0
  109. package/lib/components/menus/components/search-colleague/index.js +88 -0
  110. package/lib/components/menus/context.js +14 -0
  111. package/lib/components/menus/export-modules/appraisal-menus/datas.js +109 -0
  112. package/lib/components/menus/export-modules/appraisal-menus/index.css +0 -0
  113. package/lib/components/menus/export-modules/appraisal-menus/index.js +89 -0
  114. package/lib/components/menus/export-modules/depart-menus/helper.js +54 -0
  115. package/lib/components/menus/export-modules/depart-menus/index.css +0 -0
  116. package/lib/components/menus/export-modules/depart-menus/index.js +99 -0
  117. package/lib/components/menus/export-modules/okr-menus/datas.js +189 -0
  118. package/lib/components/menus/export-modules/okr-menus/index.css +33 -0
  119. package/lib/components/menus/export-modules/okr-menus/index.js +166 -0
  120. package/lib/components/menus/export-modules/subordinate-menus/helper.js +25 -0
  121. package/lib/components/menus/export-modules/subordinate-menus/index.js +108 -0
  122. package/lib/components/menus/index.css +20 -0
  123. package/lib/components/menus/index.js +51 -0
  124. package/lib/components/menus/precls.js +8 -0
  125. package/lib/components/menus/request-apis.js +97 -0
  126. package/lib/components/menus/types.js +5 -0
  127. package/lib/components/menus/utils.js +33 -0
  128. package/lib/components/nav-top/components/menu/index.css +90 -0
  129. package/lib/components/nav-top/components/menu/index.js +115 -0
  130. package/lib/components/nav-top/components/user-message/components/empty/index.css +30 -0
  131. package/lib/components/nav-top/components/user-message/components/empty/index.js +36 -0
  132. package/lib/components/nav-top/components/user-message/components/inform/index.css +114 -0
  133. package/lib/components/nav-top/components/user-message/components/inform/index.js +152 -0
  134. package/lib/components/nav-top/components/user-message/components/remind/index.css +159 -0
  135. package/lib/components/nav-top/components/user-message/components/remind/index.js +120 -0
  136. package/lib/components/nav-top/components/user-message/components/reply/index.css +132 -0
  137. package/lib/components/nav-top/components/user-message/components/reply/index.js +100 -0
  138. package/lib/components/nav-top/components/user-message/components/tab-title/index.js +31 -0
  139. package/lib/components/nav-top/components/user-message/components/todos/index.css +129 -0
  140. package/lib/components/nav-top/components/user-message/components/todos/index.js +98 -0
  141. package/lib/components/nav-top/components/user-message/constant.js +39 -0
  142. package/lib/components/nav-top/components/user-message/images/app-tixing.svg +30 -0
  143. package/lib/components/nav-top/components/user-message/images/bell.svg +18 -0
  144. package/lib/components/nav-top/components/user-message/images/empty-img.svg +130 -0
  145. package/lib/components/nav-top/components/user-message/images/user-photo.png +0 -0
  146. package/lib/components/nav-top/components/user-message/index.css +77 -0
  147. package/lib/components/nav-top/components/user-message/index.js +180 -0
  148. package/lib/components/nav-top/components/user-message/msg/index.css +122 -0
  149. package/lib/components/nav-top/components/user-message/msg/index.js +102 -0
  150. package/lib/components/nav-top/components/user-own-menu/index.css +61 -0
  151. package/lib/components/{button/admin-button/drop-down-arrow.js → nav-top/components/user-own-menu/index.js} +29 -54
  152. package/lib/components/nav-top/components/version/index.css +22 -0
  153. package/lib/components/{button/export-button → nav-top/components/version}/index.js +31 -40
  154. package/lib/components/nav-top/constant.js +42 -0
  155. package/lib/components/nav-top/images/app-tixing.svg +30 -0
  156. package/lib/components/nav-top/images/bell.svg +18 -0
  157. package/lib/components/nav-top/images/empty-img.svg +130 -0
  158. package/lib/components/nav-top/images/exit.svg +21 -0
  159. package/lib/components/nav-top/images/home.png +0 -0
  160. package/lib/components/nav-top/images/manage.png +0 -0
  161. package/lib/components/nav-top/images/manage.svg +21 -0
  162. package/lib/components/nav-top/images/open.svg +21 -0
  163. package/lib/components/nav-top/images/own-home.svg +19 -0
  164. package/lib/components/nav-top/images/qiye-o.svg +25 -0
  165. package/lib/components/nav-top/images/set.svg +19 -0
  166. package/lib/components/nav-top/images/user-photo.png +0 -0
  167. package/lib/components/nav-top/images/version.png +0 -0
  168. package/lib/components/nav-top/index.css +89 -0
  169. package/lib/components/nav-top/index.js +137 -0
  170. package/lib/components/nav-top/interface.js +5 -0
  171. package/lib/components/nav-top/mock.js +36 -0
  172. package/lib/components/nav-top/utils.js +77 -0
  173. package/lib/components/okr-detail/auth.js +1 -1
  174. package/lib/components/okr-detail/base-info/util.js +1 -1
  175. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/constant.js +1 -1
  176. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +1 -1
  177. package/lib/components/okr-detail/context.js +1 -1
  178. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +1 -1
  179. package/lib/components/okr-detail/detail-header/enums.js +1 -1
  180. package/lib/components/okr-detail/e-list/constant.js +1 -1
  181. package/lib/components/okr-detail/e-list/util.js +1 -1
  182. package/lib/components/okr-detail/okr-list/create-kr-item/style.js +1 -1
  183. package/lib/components/okr-detail/okr-list/drag-order-kr.js +1 -1
  184. package/lib/components/okr-detail/okr-list/index.js +1 -2
  185. package/lib/components/okr-detail/request-apis.js +1 -1
  186. package/lib/components/okr-detail/schedule/util.js +1 -1
  187. package/lib/components/okr-flow/index.js +1 -1
  188. package/lib/components/okr-flow/mini-map/utils.js +1 -1
  189. package/lib/components/okr-flow/open-data/index.js +1 -1
  190. package/lib/components/okr-flow/request-apis.js +1 -1
  191. package/lib/components/okr-flow/utils/config.js +1 -1
  192. package/lib/components/okr-flow/utils/index.js +1 -1
  193. package/lib/components/okr-flow/utils/tree-handler.js +1 -1
  194. package/lib/components/okr-progress/request-apis.js +1 -1
  195. package/lib/components/okr-progress/util.js +1 -1
  196. package/lib/components/okr-progress-detail/utils.js +1 -1
  197. package/lib/components/okr-progress-modal/helper.js +1 -1
  198. package/lib/components/okr-progress-modal/style.js +1 -1
  199. package/lib/components/okr-progress-modal/textarea/style.js +1 -1
  200. package/lib/components/okr-review/ReviewPop/components/ReviewBody/style.js +1 -1
  201. package/lib/components/okr-review/ReviewPop/style.js +1 -1
  202. package/lib/components/okr-review/components/ReviewItem/style.js +1 -1
  203. package/lib/components/okr-review/components/confirm-pop/style.js +1 -1
  204. package/lib/components/okr-review/style.js +1 -1
  205. package/lib/components/okr-share/common-painter/utils.js +1 -1
  206. package/lib/components/okr-share/pink-card/images.js +1 -1
  207. package/lib/components/okr-share/request-apis.js +1 -1
  208. package/lib/components/okrcase-library/index.css +0 -1
  209. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +1 -1
  210. package/lib/components/okrcase-library/server/network.js +1 -1
  211. package/lib/components/open-data-painter/index.js +1 -1
  212. package/lib/components/operation-records/style.js +1 -1
  213. package/lib/components/period-selector/common.js +2 -2
  214. package/lib/components/period-selector/components/button/style.js +1 -1
  215. package/lib/components/period-selector/components/selector/style.js +1 -1
  216. package/lib/components/period-selector/helper/index.js +1 -1
  217. package/lib/components/period-selector/mockData.js +1 -1
  218. package/lib/components/period-selector/style.js +1 -1
  219. package/lib/components/photo-card/components/card/index.css +196 -0
  220. package/lib/components/photo-card/components/card/index.js +106 -0
  221. package/lib/components/photo-card/data.js +19 -0
  222. package/lib/components/photo-card/images/user-add.svg +19 -0
  223. package/lib/components/photo-card/images/user-photo.png +0 -0
  224. package/lib/components/photo-card/images/user-role.svg +38 -0
  225. package/lib/components/photo-card/index.css +29 -0
  226. package/lib/components/photo-card/index.js +51 -0
  227. package/lib/components/photo-card/types/image.d.js +1 -0
  228. package/lib/components/photo-card/types/react-app-env.d.js +2 -0
  229. package/lib/components/point-demo/drop-down-box/index.css +98 -0
  230. package/lib/components/point-demo/drop-down-box/index.js +159 -0
  231. package/lib/components/point-demo/image/demo-bcg.png +0 -0
  232. package/lib/components/point-demo/image/down.svg +14 -0
  233. package/lib/components/point-demo/image/icon-canceled.svg +7 -0
  234. package/lib/components/point-demo/image/logo.svg +64 -0
  235. package/lib/components/point-demo/index.css +348 -0
  236. package/lib/components/point-demo/index.js +657 -0
  237. package/lib/components/point-demo/input/index.css +74 -0
  238. package/lib/components/point-demo/input/index.js +176 -0
  239. package/lib/components/point-demo/point-demo.js +93 -0
  240. package/lib/components/point-demo/popup/index.css +7 -0
  241. package/lib/components/point-demo/popup/index.js +113 -0
  242. package/lib/components/point-demo/popup/placement.js +44 -0
  243. package/lib/components/point-demo/popup/rc-trigger.css +127 -0
  244. package/lib/components/pop-down-notification/components/SuccessRender.js +1 -1
  245. package/lib/components/pop-down-notification/style/index.js +1 -1
  246. package/lib/components/praise-record/style.js +1 -1
  247. package/lib/components/progress/index.js +1 -1
  248. package/lib/components/publish-dynamic-modal/requist-api.js +1 -1
  249. package/lib/components/radio/radio.js +1 -1
  250. package/lib/components/tabs/index.js +1 -1
  251. package/lib/components/task-relation/helper.js +1 -1
  252. package/lib/components/task-relation/request-api.js +1 -1
  253. package/lib/components/tita-chart/index.js +4 -4
  254. package/lib/components/tita-chart/util/index.js +12 -12
  255. package/lib/components/tita-chart/util/utils.js +1 -1
  256. package/lib/components/tooltip/index.js +1 -1
  257. package/lib/components/tooltip/tooltip-text/index.js +10 -4
  258. package/lib/components/tree/index.js +1 -1
  259. package/lib/components/upload/style.js +1 -1
  260. package/lib/components/upload/util.js +1 -1
  261. package/lib/components/upvote/request-apis.js +1 -1
  262. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +2 -2
  263. package/lib/components/user-selector/export-modules/field-tree-selector/multiple-selector/index.js +2 -2
  264. package/lib/components/user-selector/export-modules/field-tree-selector/single-selector/index.js +4 -1
  265. package/lib/components/user-selector/export-modules/field-tree-selector/single-selector/user-list.js +1 -1
  266. package/lib/components/user-selector/index.js +1 -1
  267. package/lib/components/user-selector/layout/index.css +1 -1
  268. package/lib/components/user-selector/layout/index.js +4 -1
  269. package/lib/components/user-selector/request-apis.js +1 -1
  270. package/lib/components/user-selector/utils.js +1 -1
  271. package/lib/components/version-change-modal/constant.js +45 -0
  272. package/lib/components/version-change-modal/images/header-b.png +0 -0
  273. package/lib/components/version-change-modal/images/header-g.png +0 -0
  274. package/lib/components/version-change-modal/images/header-y.png +0 -0
  275. package/lib/components/version-change-modal/images/okr.png +0 -0
  276. package/lib/components/version-change-modal/images/okre.png +0 -0
  277. package/lib/components/version-change-modal/images/performance.png +0 -0
  278. package/lib/components/version-change-modal/images/performancePlus.png +0 -0
  279. package/lib/components/version-change-modal/images/project.png +0 -0
  280. package/lib/components/version-change-modal/images/title.png +0 -0
  281. package/lib/components/version-change-modal/index.css +150 -0
  282. package/lib/components/version-change-modal/index.js +175 -0
  283. package/lib/components/version-change-modal/interface.js +5 -0
  284. package/lib/components/version-change-modal/request-api.js +41 -0
  285. package/lib/components/viewer/index.js +1 -1
  286. package/lib/components-v1/avatar/styles.js +1 -1
  287. package/lib/components-v1/buttonv2/style/style.js +1 -1
  288. package/lib/components-v1/input/Input.js +1 -1
  289. package/lib/components-v1/input/InputNumber.js +1 -1
  290. package/lib/components-v1/input/style/index.js +1 -1
  291. package/lib/components-v1/popConfirm/style.js +1 -1
  292. package/lib/components-v1/radio/style/index.css +3 -3
  293. package/lib/components-v1/tabs/style.js +1 -1
  294. package/lib/components-v1/textarea/style.js +1 -1
  295. package/lib/components-v1/userSelector/UserSelectorPop.js +1 -1
  296. package/lib/components-v1/userSelector/style.js +1 -1
  297. package/lib/index.js +56 -6
  298. package/lib/pages/aha2021/index.css +42 -0
  299. package/lib/pages/aha2021/index.js +62 -0
  300. package/lib/pages/group-management/components/PopDownNotification/components/SuccessRender.js +1 -1
  301. package/lib/pages/group-management/components/PopDownNotification/style/index.js +1 -1
  302. package/lib/pages/group-management/components/openData/index.js +1 -1
  303. package/lib/pages/group-management/groupInterface.js +10 -10
  304. package/lib/pages/home-page/components/data-list/table/columns/index.js +1 -1
  305. package/lib/pages/okr-map/hooks/useStorage.js +2 -2
  306. package/lib/pages/okr-map/open-data/index.js +1 -1
  307. package/lib/pages/okr-map/request-apis.js +1 -1
  308. package/lib/pages/okr-map/utils.js +12 -9
  309. package/lib/pages/personal-info/components/base-info/index.css +36 -0
  310. package/lib/pages/personal-info/components/base-info/index.js +179 -0
  311. package/lib/pages/personal-info/index.css +3 -0
  312. package/lib/pages/personal-info/index.js +27 -0
  313. package/lib/pages/personal-info/request-api.js +32 -0
  314. package/lib/utils/auth.js +1 -1
  315. package/lib/utils/bs-global.js +16 -1
  316. package/lib/utils/format-time.js +1 -1
  317. package/lib/utils/helpers.js +1 -1
  318. package/lib/utils/mblog.js +1 -1
  319. package/lib/utils/open-data.js +1 -1
  320. package/lib/utils/platform.js +1 -1
  321. package/lib/utils/request-v1.js +2 -2
  322. package/lib/utils/request.js +1 -1
  323. package/lib/utils/roundWeight.js +2 -2
  324. package/lib/utils/tools.js +3 -4
  325. package/package.json +2 -1
  326. package/lib/components/button/admin-button/default.js +0 -35
  327. package/lib/components/button/admin-button/index.css +0 -86
  328. package/lib/components/button/admin-button/index.js +0 -40
  329. package/lib/components/button/admin-button/secondary.js +0 -35
  330. package/lib/components/button/export-button/index.css +0 -51
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getDepsAndUsers = exports.addFollower = exports.getSubordinates = exports.getFollowerList = void 0;
7
+
8
+ var _request = require("../../utils/request");
9
+
10
+ var _helper = require("./export-modules/depart-menus/helper");
11
+
12
+ var _axios = _interopRequireDefault(require("axios"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
17
+
18
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
+
20
+ 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); }
21
+
22
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
23
+
24
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
25
+
26
+ 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; }
27
+
28
+ var tenantId = window.BSGlobal && window.BSGlobal.tenantInfo.Id || 0;
29
+ var userId = window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0;
30
+
31
+ var requestDomain = function requestDomain() {
32
+ if (!window.location.hostname.match(/dev/)) return '';
33
+ return "".concat(location.protocol, "//www.tita.gift");
34
+ };
35
+
36
+ var getFollowerList = function getFollowerList() {
37
+ return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/follow/followerList")).then(function (res) {
38
+ return res.data.Data;
39
+ });
40
+ };
41
+
42
+ exports.getFollowerList = getFollowerList;
43
+
44
+ var getSubordinates = function getSubordinates(_ref) {
45
+ var _ref$toUserId = _ref.toUserId,
46
+ toUserId = _ref$toUserId === void 0 ? 0 : _ref$toUserId,
47
+ _ref$relationIds = _ref.relationIds,
48
+ relationIds = _ref$relationIds === void 0 ? '3' : _ref$relationIds;
49
+ return _axios["default"].get("".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/user/getRelationUsers"), {
50
+ 'headers': {
51
+ 'Content-Type': 'application/json; charset=utf-8'
52
+ },
53
+ 'params': {
54
+ relationIds: relationIds,
55
+ 'toUserId': toUserId || userId
56
+ }
57
+ }).then(function (res) {
58
+ var relationUsers = res.data.Data.relationUsers;
59
+ var _relationUsers$subord = relationUsers.subordinate,
60
+ subordinate = _relationUsers$subord === void 0 ? [] : _relationUsers$subord,
61
+ _relationUsers$sameLe = relationUsers.sameLevelUser,
62
+ sameLevelUser = _relationUsers$sameLe === void 0 ? [] : _relationUsers$sameLe,
63
+ _relationUsers$mySelf = relationUsers.mySelf,
64
+ mySelf = _relationUsers$mySelf === void 0 ? [] : _relationUsers$mySelf;
65
+ var users = [].concat(_toConsumableArray(subordinate), _toConsumableArray(sameLevelUser), _toConsumableArray(mySelf));
66
+ return users;
67
+ });
68
+ };
69
+
70
+ exports.getSubordinates = getSubordinates;
71
+
72
+ var addFollower = function addFollower(userId) {
73
+ return _axios["default"].post("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/follow/addFollower?followerId=").concat(userId), null, {// 'headers': {
74
+ // 'Content-Type': 'application/json; charset=utf-8'
75
+ // }
76
+ }).then(function (res) {
77
+ return res.data;
78
+ });
79
+ };
80
+
81
+ exports.addFollower = addFollower;
82
+
83
+ var getDepsAndUsers = function getDepsAndUsers() {
84
+ var departmentId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
85
+ var isGetUser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
86
+ return (0, _request.rget)('v2')("department/sub/depsAndUsers?departmentId=".concat(departmentId, "&isGetUser=true")).then(function (res) {
87
+ var _res$Data = res.Data,
88
+ departments = _res$Data.departments,
89
+ users = _res$Data.users;
90
+ var transDeparts = (0, _helper.translateDepartsToTreeNode)(departments || []);
91
+ var transUsers = (0, _helper.translateUsersToTreeNode)(users || [], departmentId); // resolve && resolve([...transUsers, ...transDeparts])
92
+
93
+ return [].concat(_toConsumableArray(transUsers), _toConsumableArray(transDeparts));
94
+ });
95
+ };
96
+
97
+ exports.getDepsAndUsers = getDepsAndUsers;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toTree = void 0;
7
+
8
+ var _cloneDeep = _interopRequireDefault(require("clone-deep"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ // 扁平数据转换为树
13
+ var toTree = function toTree(data) {
14
+ var cloneData = (0, _cloneDeep["default"])(data);
15
+ var map = {},
16
+ res = [];
17
+ cloneData.forEach(function (item) {
18
+ return map[item.id] = item;
19
+ });
20
+ cloneData.forEach(function (item) {
21
+ var parent = map[item.pid];
22
+
23
+ if (parent) {
24
+ if (!parent.children) parent.children = [];
25
+ parent.children.push(item);
26
+ } else {
27
+ res.push(item);
28
+ }
29
+ });
30
+ return res;
31
+ };
32
+
33
+ exports.toTree = toTree;
@@ -0,0 +1,90 @@
1
+ .titaui-nav-top-menu {
2
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
3
+ font-size: 16px;
4
+ color: #ffffff;
5
+ line-height: 24px;
6
+ }
7
+
8
+ .titaui-nav-top-menu__menu-show {
9
+ padding: 12px 16px;
10
+ font-weight: 500;
11
+ cursor: pointer;
12
+ color: #ffffff;
13
+ }
14
+
15
+ .titaui-nav-top-menu__menu-show:hover {
16
+ color: #ffffff;
17
+ }
18
+
19
+ .titaui-nav-top-menu__menu-show--active {
20
+ font-size: 18px;
21
+ font-weight: 600;
22
+ position: relative;
23
+ }
24
+
25
+ .titaui-nav-top-menu__menu-show--active::after {
26
+ position: absolute;
27
+ display: inline-block;
28
+ content: "";
29
+ width: 24px;
30
+ height: 8px;
31
+ background: linear-gradient(180deg, #ffffff 0%, rgba(40, 121, 255, 0) 100%);
32
+ opacity: 0.8;
33
+ filter: blur(4px);
34
+ left: 50%;
35
+ top: 50%;
36
+ transform: translate(-50%, 0);
37
+ }
38
+
39
+ .titaui-nav-top-menu__hide-menus {
40
+ display: flex;
41
+ flex-direction: column;
42
+ background: #FFFFFF;
43
+ box-shadow: 0px 4px 24px 0px rgba(127, 145, 180, 0.2);
44
+ border-radius: 12px;
45
+ padding: 16px 0;
46
+ color: #ffffff;
47
+ }
48
+
49
+ .titaui-nav-top-menu__hide-menus:hover {
50
+ color: #ffffff;
51
+ }
52
+
53
+ .titaui-nav-top-menu__menu-hide {
54
+ padding: 5px 20px;
55
+ font-size: 14px;
56
+ font-weight: 400;
57
+ color: #3F4755;
58
+ line-height: 22px;
59
+ }
60
+
61
+ .titaui-nav-top-menu__menu-hide--active {
62
+ color: #2879ff;
63
+ }
64
+
65
+ .titaui-nav-top-menu__menu-hide:hover {
66
+ cursor: pointer;
67
+ background: #F7F8FA;
68
+ color: #2879ff;
69
+ }
70
+
71
+ .titaui-nav-top-menu__more-icon {
72
+ display: inline-flex;
73
+ align-items: center;
74
+ margin: 8px 12px;
75
+ font-weight: 500;
76
+ padding: 4px;
77
+ cursor: pointer;
78
+ border-radius: 4px;
79
+ }
80
+
81
+ .titaui-nav-top-menu__more-icon--active {
82
+ background: #5C8EFF;
83
+ }
84
+
85
+ .titaui-nav-top-menu .rc-overflow {
86
+ display: flex;
87
+ align-items: center;
88
+ max-width: 100%;
89
+ position: relative;
90
+ }
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _popup = _interopRequireDefault(require("../../../popup"));
15
+
16
+ var _rcOverflow = _interopRequireDefault(require("rc-overflow"));
17
+
18
+ require("./index.css");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ 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); }
23
+
24
+ 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; }
25
+
26
+ 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; }
27
+
28
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
29
+
30
+ 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."); }
31
+
32
+ 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); }
33
+
34
+ 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; }
35
+
36
+ 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; }
37
+
38
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
+
40
+ var prefix = "titaui-nav-top-menu";
41
+ var popupAlign = {
42
+ offset: [0, 5],
43
+ overflow: {
44
+ adjustX: true,
45
+ adjustY: true
46
+ },
47
+ targetOffset: [0, 0]
48
+ };
49
+
50
+ var Menu = function Menu(_ref) {
51
+ var menus = _ref.menus,
52
+ activeMenuId = _ref.activeMenuId;
53
+
54
+ var _useState = (0, _react.useState)(false),
55
+ _useState2 = _slicedToArray(_useState, 2),
56
+ popupVisible = _useState2[0],
57
+ setPopupVisible = _useState2[1];
58
+
59
+ var containerRef = (0, _react.useRef)(); // @ts-ignore
60
+
61
+ var apiPath = BSGlobal.apiPath;
62
+
63
+ var handlePopupVisibleChange = function handlePopupVisibleChange(visible) {
64
+ setPopupVisible(visible);
65
+ };
66
+
67
+ var renderRawItem = function renderRawItem(menu) {
68
+ return /*#__PURE__*/_react["default"].createElement(_rcOverflow["default"].Item, {
69
+ component: "span"
70
+ }, /*#__PURE__*/_react["default"].createElement("a", {
71
+ className: (0, _classnames["default"])("".concat(prefix, "__menu-show"), _defineProperty({}, "".concat(prefix, "__menu-show--active"), activeMenuId == menu.id)),
72
+ href: "#".concat(menu.hash)
73
+ }, menu.name));
74
+ };
75
+
76
+ var renderRest = function renderRest(items) {
77
+ if (items.length === 0) return null;
78
+ var isActiveHideMeun = items.filter(function (item) {
79
+ return item.id == activeMenuId;
80
+ }).length > 0;
81
+
82
+ var popContent = /*#__PURE__*/_react["default"].createElement("div", {
83
+ className: "".concat(prefix, "__hide-menus")
84
+ }, items.map(function (menu) {
85
+ return /*#__PURE__*/_react["default"].createElement("a", {
86
+ className: (0, _classnames["default"])("".concat(prefix, "__menu-hide"), _defineProperty({}, "".concat(prefix, "__menu-hide--active"), activeMenuId == menu.id)),
87
+ href: "#".concat(menu.hash),
88
+ key: menu.id
89
+ }, menu.name);
90
+ }));
91
+
92
+ return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
93
+ popup: popContent,
94
+ onPopupVisibleChange: handlePopupVisibleChange,
95
+ popupVisible: popupVisible,
96
+ popupPlacement: "bottomLeft",
97
+ popupAlign: popupAlign
98
+ }, /*#__PURE__*/_react["default"].createElement("span", {
99
+ className: (0, _classnames["default"])("tu-icon-diot", "".concat(prefix, "__more-icon"), _defineProperty({}, "".concat(prefix, "__more-icon--active"), isActiveHideMeun))
100
+ }));
101
+ };
102
+
103
+ return /*#__PURE__*/_react["default"].createElement("div", {
104
+ className: prefix,
105
+ ref: containerRef
106
+ }, /*#__PURE__*/_react["default"].createElement(_rcOverflow["default"], {
107
+ data: menus,
108
+ renderRawItem: renderRawItem,
109
+ renderRest: renderRest,
110
+ maxCount: "responsive"
111
+ }));
112
+ };
113
+
114
+ var _default = Menu;
115
+ exports["default"] = _default;
@@ -0,0 +1,30 @@
1
+ .titaui-user-message-msg-remind__empty {
2
+ width: 160px;
3
+ height: 106px;
4
+ margin: 120px 130px 216px;
5
+ }
6
+
7
+ .titaui-user-message-msg-remind__empty-text {
8
+ width: 182px;
9
+ height: 22px;
10
+ font-size: 14px;
11
+ font-family: PingFangSC-Regular, PingFang SC;
12
+ font-weight: 400;
13
+ color: #6f7886;
14
+ line-height: 22px;
15
+ margin-top: -26px;
16
+ margin-left: -10px;
17
+ }
18
+
19
+ .titaui-user-message-msg-remind__empty-all {
20
+ width: 336px;
21
+ height: 22px;
22
+ font-size: 14px;
23
+ font-family: Resource-Han-Rounded-CN-Normal, Resource-Han-Rounded-CN;
24
+ font-weight: 400;
25
+ color: #2879ff;
26
+ line-height: 22px;
27
+ text-align: center;
28
+ margin-left: -88px;
29
+ cursor: pointer;
30
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ var _emptyImg = _interopRequireDefault(require("../../images/empty-img.svg"));
13
+
14
+ var _constant = require("../../constant");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ var preCls = "titaui-user-message-msg-remind";
19
+
20
+ var Empty = function Empty() {
21
+ return /*#__PURE__*/_react["default"].createElement("div", {
22
+ className: (0, _classnames["default"])("".concat(preCls, "__empty"))
23
+ }, /*#__PURE__*/_react["default"].createElement("img", {
24
+ src: _emptyImg["default"]
25
+ }), /*#__PURE__*/_react["default"].createElement("div", {
26
+ className: (0, _classnames["default"])("".concat(preCls, "__empty-text"))
27
+ }, "\u6682\u65F6\u6CA1\u6709\u9700\u8981\u5904\u7406\u7684\u6D88\u606F\u54E6\uFF5E"), /*#__PURE__*/_react["default"].createElement("a", {
28
+ target: "_blank",
29
+ href: "".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more%2Fmessages%3FmessageType%3D2%26isRead%3D2%26messageSubNav%3D1")
30
+ }, /*#__PURE__*/_react["default"].createElement("div", {
31
+ className: (0, _classnames["default"])("".concat(preCls, "__empty-all"))
32
+ }, "\u67E5\u770B\u5168\u90E8\u6D88\u606F")));
33
+ };
34
+
35
+ var _default = Empty;
36
+ exports["default"] = _default;
@@ -0,0 +1,114 @@
1
+ .titaui-user-message-msg-inform__items {
2
+ width: 420px;
3
+ margin-top: 8px;
4
+ }
5
+
6
+ .titaui-user-message-msg-inform__item {
7
+ display: flex;
8
+ box-sizing: border-box;
9
+ height: 82px;
10
+ border-radius: 12px;
11
+ margin-bottom: 4px;
12
+ margin: 0 12px;
13
+ }
14
+
15
+ .titaui-user-message-msg-inform__item-photo {
16
+ width: 32px;
17
+ height: 32px;
18
+ background-color: gray;
19
+ border-radius: 50%;
20
+ margin-top: 15px;
21
+ margin-left: 8px;
22
+ }
23
+
24
+ .titaui-user-message-msg-inform__item-photo .titaui-pc-avatar--text {
25
+ width: 32px !important;
26
+ height: 32px !important;
27
+ }
28
+
29
+ .titaui-user-message-msg-inform__item-photo img {
30
+ width: 32px !important;
31
+ height: 32px !important;
32
+ }
33
+
34
+ .titaui-user-message-msg-inform__item-right {
35
+ flex: 1;
36
+ box-sizing: border-box;
37
+ width: 334px;
38
+ height: 82px;
39
+ margin-left: 12px;
40
+ padding-top: 8px;
41
+ }
42
+
43
+ .titaui-user-message-msg-inform__item-right-name {
44
+ position: relative;
45
+ height: 22px;
46
+ font-size: 14px;
47
+ font-family: Resource-Han-Rounded-CN-Medium, Resource-Han-Rounded-CN;
48
+ font-weight: 500;
49
+ color: #3f4755;
50
+ line-height: 22px;
51
+ }
52
+
53
+ .titaui-user-message-msg-inform__item-right-name-tooltip {
54
+ z-index: 2001;
55
+ }
56
+
57
+ .titaui-user-message-msg-inform__item-right-name-status {
58
+ margin-left: 8px;
59
+ color: #89919f;
60
+ }
61
+
62
+ .titaui-user-message-msg-inform__item-right-content {
63
+ position: relative;
64
+ height: 22px;
65
+ margin-top: 2px;
66
+ font-size: 14px;
67
+ font-family: Resource-Han-Rounded-CN-Normal, Resource-Han-Rounded-CN;
68
+ font-weight: 400;
69
+ color: #3f4755;
70
+ line-height: 22px;
71
+ overflow: hidden;
72
+ white-space: nowrap;
73
+ cursor: pointer;
74
+ }
75
+
76
+ .titaui-user-message-msg-inform__item-right-content-tooltip {
77
+ z-index: 2001;
78
+ }
79
+
80
+ .titaui-user-message-msg-inform__item-right-time {
81
+ height: 18px;
82
+ margin-top: 2px;
83
+ font-size: 12px;
84
+ font-family: Resource-Han-Rounded-CN-Normal, Resource-Han-Rounded-CN;
85
+ font-weight: 400;
86
+ color: #89919f;
87
+ line-height: 18px;
88
+ }
89
+
90
+ .titaui-user-message-msg-inform__item:hover {
91
+ background: #f7f8fa;
92
+ }
93
+
94
+ .titaui-user-message-msg-inform__footer {
95
+ position: absolute;
96
+ bottom: 0;
97
+ left: 0;
98
+ width: 420px;
99
+ height: 50px;
100
+ background: #ffffff;
101
+ border-radius: 0px 0px 24px 24px;
102
+ }
103
+
104
+ .titaui-user-message-msg-inform__footer-all {
105
+ display: inline-block;
106
+ margin: 16px 24px 16px 348px;
107
+ width: 48px;
108
+ height: 18px;
109
+ font-size: 12px;
110
+ font-family: Resource-Han-Rounded-CN-Regular, Resource-Han-Rounded-CN;
111
+ font-weight: 400;
112
+ color: #2879ff;
113
+ line-height: 18px;
114
+ }
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ var _reactPerfectScrollbar = _interopRequireDefault(require("react-perfect-scrollbar"));
13
+
14
+ var _default2 = _interopRequireDefault(require("../../../../../../components/avatar/default"));
15
+
16
+ var _conditionRender = _interopRequireDefault(require("../../../../../dynamic/components/condition-render"));
17
+
18
+ var _tooltipText = _interopRequireDefault(require("../../../../../tooltip/tooltip-text"));
19
+
20
+ var _empty = _interopRequireDefault(require("../empty"));
21
+
22
+ require("./index.css");
23
+
24
+ var _constant = require("../../constant");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ var preCls = "titaui-user-message-msg-inform";
29
+
30
+ var Inform = function Inform(props) {
31
+ var informs = props.informs,
32
+ userInfo = props.userInfo,
33
+ onItemClick = props.onItemClick;
34
+
35
+ var handleItemClick = function handleItemClick(e, data) {
36
+ onItemClick && onItemClick(false);
37
+ var isMessageMerging = data.messageType == 13018 || data.messageType == 30362 || data.messageType == 131;
38
+
39
+ if (!isMessageMerging) {
40
+ window.open("".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/taskinfo?Id=").concat(data.objId), "_blank");
41
+ return;
42
+ }
43
+
44
+ var type = "eReport"; // E-周报提醒消息合并
45
+
46
+ if (data.messageType == "83") {
47
+ // 项目,目标进展提醒消息合并
48
+ type = "objective";
49
+ } else if (Number(data.messageType) > 93 && Number(data.messageType) <= 100) {
50
+ // OKR 仪表盘消息提醒
51
+ type = "okrDashBoard";
52
+ } else if (data.messageType == 131) {
53
+ type = "performance";
54
+ }
55
+
56
+ var options = {
57
+ width: 680,
58
+ showScroll: true,
59
+ type: "message",
60
+ // 推屏类型
61
+ data: {
62
+ type: type,
63
+ // 消息类型
64
+ objId: data.messageId,
65
+ objType: data.messageType,
66
+ startDate: "",
67
+ endDate: ''
68
+ }
69
+ };
70
+
71
+ if (data.messageType == 83) {
72
+ options.data.objType = data.messageType;
73
+ options.data.startDate = data.createTime;
74
+ } else if (data.messageType > 93 && data.messageType <= 100) {
75
+ options.data.startDate = data.createTime;
76
+ } else if (data.messageType == 131) {
77
+ options.data.objType = data.objId.split("_")[0];
78
+ options.data.startDate = data.objId.split("_")[1];
79
+ options.data.endDate = data.objId.split("_")[2];
80
+ } else {
81
+ var regex = /\((.+?)\)/g,
82
+ content = e.target.textContent;
83
+ var date = [];
84
+ date = content.match(regex); // @ts-ignore
85
+
86
+ options.data.startDate = date[0].slice(1, date[0].length - 1).split("-")[0]; // @ts-ignore
87
+
88
+ options.data.endDate = date[0].slice(1, date[0].length - 1).split("-")[1];
89
+ } // @ts-ignore
90
+
91
+
92
+ Talent.app.vent.trigger("openReactScreenPush", options);
93
+ };
94
+
95
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
96
+ condition: informs.total !== 0
97
+ }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_reactPerfectScrollbar["default"], {
98
+ options: {
99
+ suppressScrollX: true
100
+ }
101
+ }, /*#__PURE__*/_react["default"].createElement("ul", {
102
+ className: (0, _classnames["default"])("".concat(preCls, "__items")),
103
+ key: informs.messageId
104
+ }, informs.messags.map(function (inform) {
105
+ return /*#__PURE__*/_react["default"].createElement("li", {
106
+ className: (0, _classnames["default"])("".concat(preCls, "__item")),
107
+ key: inform.messageId
108
+ }, /*#__PURE__*/_react["default"].createElement("div", {
109
+ className: (0, _classnames["default"])("".concat(preCls, "__item-photo"))
110
+ }, /*#__PURE__*/_react["default"].createElement(_default2["default"], {
111
+ userId: userInfo.Id,
112
+ name: userInfo.Name,
113
+ color: userInfo.UserAvatar.Color,
114
+ src: userInfo.Avatar
115
+ })), /*#__PURE__*/_react["default"].createElement("div", {
116
+ className: (0, _classnames["default"])("".concat(preCls, "__item-right"))
117
+ }, /*#__PURE__*/_react["default"].createElement("a", {
118
+ target: "_blank",
119
+ onClick: function onClick(e) {
120
+ handleItemClick(e, inform);
121
+ }
122
+ }, /*#__PURE__*/_react["default"].createElement("div", {
123
+ className: (0, _classnames["default"])("".concat(preCls, "__item-right-name"))
124
+ }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
125
+ overlayClassName: "".concat(preCls, "__item-right-name-tooltip"),
126
+ text: inform.user.name,
127
+ maxWidth: 100,
128
+ mouseEnterDelay: 0.8
129
+ })), /*#__PURE__*/_react["default"].createElement("div", {
130
+ className: (0, _classnames["default"])("".concat(preCls, "__item-right-content"))
131
+ }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
132
+ overlayClassName: "".concat(preCls, "__item-right-content-tooltip"),
133
+ text: (0, _constant.htmlToText)(inform.content).trim().slice(0, -4),
134
+ isPercent: true,
135
+ mouseEnterDelay: 0.8
136
+ })), /*#__PURE__*/_react["default"].createElement("div", {
137
+ className: (0, _classnames["default"])("".concat(preCls, "__item-right-time"))
138
+ }, inform.createTime))));
139
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
140
+ className: (0, _classnames["default"])("".concat(preCls, "__footer"))
141
+ }, /*#__PURE__*/_react["default"].createElement("a", {
142
+ target: "_blank",
143
+ href: "".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#more/messages?messageType=2&isRead=1")
144
+ }, /*#__PURE__*/_react["default"].createElement("span", {
145
+ className: (0, _classnames["default"])("".concat(preCls, "__footer-all"))
146
+ }, "\u67E5\u770B\u5168\u90E8"))))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
147
+ condition: informs.total === 0
148
+ }, /*#__PURE__*/_react["default"].createElement(_empty["default"], null)));
149
+ };
150
+
151
+ var _default = Inform;
152
+ exports["default"] = _default;