@titaui/pc 1.5.82 → 1.5.83

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 (319) hide show
  1. package/lib/components/avatar/icon-avatar/index.css +15 -0
  2. package/lib/components/avatar/icon-avatar/index.js +50 -0
  3. package/lib/components/avatar/index.js +9 -1
  4. package/lib/components/avatar/num-avatar/index.css +12 -0
  5. package/lib/components/avatar/num-avatar/index.js +34 -0
  6. package/lib/components/button/admin-button/default.js +35 -0
  7. package/lib/components/button/admin-button/drop-down-arrow.js +93 -0
  8. package/lib/components/button/admin-button/index.css +86 -0
  9. package/lib/components/button/admin-button/index.js +40 -0
  10. package/lib/components/button/admin-button/primary.js +33 -0
  11. package/lib/components/button/admin-button/secondary.js +35 -0
  12. package/lib/components/button/default-button/index.css +49 -0
  13. package/lib/components/button/default-button/index.js +51 -0
  14. package/lib/components/button/export-button/index.css +51 -0
  15. package/lib/components/button/export-button/index.js +81 -0
  16. package/lib/components/button/images/daoru.svg +18 -0
  17. package/lib/components/button/index.js +23 -0
  18. package/lib/components/button/interface.js +5 -0
  19. package/lib/components/change-okr/Filter.js +133 -65
  20. package/lib/components/change-okr/Item.js +6 -0
  21. package/lib/components/change-okr/filterTab.js +2 -0
  22. package/lib/components/change-okr/index.js +2 -2
  23. package/lib/components/checkbox/index.js +4 -3
  24. package/lib/components/communication/CommunicationRecord.js +116 -161
  25. package/lib/components/communication/ConvertUserName.js +1 -1
  26. package/lib/components/communication/index.css +63 -0
  27. package/lib/components/communication/index.js +53 -28
  28. package/lib/components/communication/style.js +21 -25
  29. package/lib/components/create-okr/animation/check-animation.js +2746 -0
  30. package/lib/components/create-okr/constant.js +27 -0
  31. package/lib/components/create-okr/createCycle.js +193 -0
  32. package/lib/components/create-okr/createSuccessCmp.js +233 -0
  33. package/lib/components/create-okr/createSuccessCmpWrapper.js +20 -0
  34. package/lib/components/create-okr/fields/date-cycle.js +98 -0
  35. package/lib/components/create-okr/fields/index.css +346 -0
  36. package/lib/components/create-okr/fields/index.js +17 -0
  37. package/lib/components/create-okr/fields/input-with-err-popup.js +57 -0
  38. package/lib/components/create-okr/fields/o-new-name.js +197 -0
  39. package/lib/components/create-okr/fields/okr-case.js +98 -0
  40. package/lib/components/create-okr/fields/okr-classify.js +51 -0
  41. package/lib/components/create-okr/fields/okr-create-suggest.js +147 -0
  42. package/lib/components/create-okr/fields/okr-new-user-selector.js +106 -0
  43. package/lib/components/create-okr/fields/okr-parent.js +157 -0
  44. package/lib/components/create-okr/fields/okr-type-detail.js +196 -0
  45. package/lib/components/create-okr/fields/okr-type.js +131 -0
  46. package/lib/components/create-okr/fields/okr-visibility-detail.js +224 -0
  47. package/lib/components/create-okr/fields/okr-visibility.js +169 -0
  48. package/lib/components/create-okr/img/check-normal.svg +29 -0
  49. package/lib/components/create-okr/img/check-right.svg +16 -0
  50. package/lib/components/create-okr/img/check-wrong.svg +29 -0
  51. package/lib/components/create-okr/img/create-success-head.png +0 -0
  52. package/lib/components/create-okr/img/create-success-left-quotation.svg +14 -0
  53. package/lib/components/create-okr/img/create-success-message.svg +1 -0
  54. package/lib/components/create-okr/img/create-success-right-quotation.svg +14 -0
  55. package/lib/components/create-okr/img/create-success-shadow.svg +23 -0
  56. package/lib/components/create-okr/img/example.svg +11 -0
  57. package/lib/components/create-okr/img/hand.svg +12 -0
  58. package/lib/components/create-okr/img/kr-add.svg +12 -0
  59. package/lib/components/create-okr/img/left-quotation.svg +12 -0
  60. package/lib/components/create-okr/img/light.svg +1 -0
  61. package/lib/components/create-okr/img/pack-up.js +28 -0
  62. package/lib/components/create-okr/img/qr-code.png +0 -0
  63. package/lib/components/create-okr/img/right-quotation.svg +12 -0
  64. package/lib/components/create-okr/img/shower.png +0 -0
  65. package/lib/components/create-okr/img/target.svg +19 -0
  66. package/lib/components/create-okr/img/teach-okr.svg +17 -0
  67. package/lib/components/create-okr/img/wave.png +0 -0
  68. package/lib/components/create-okr/img/weight.svg +12 -0
  69. package/lib/components/create-okr/index.css +446 -0
  70. package/lib/components/create-okr/index.js +911 -0
  71. package/lib/components/create-okr/interface.js +5 -0
  72. package/lib/components/create-okr/kr-items/index.css +180 -0
  73. package/lib/components/create-okr/kr-items/kr-item-weight.js +194 -0
  74. package/lib/components/create-okr/kr-items/krDatas.js +299 -0
  75. package/lib/components/create-okr/kr-items/krItem.js +167 -0
  76. package/lib/components/create-okr/objectType.js +273 -0
  77. package/lib/components/create-okr/request-api.js +220 -0
  78. package/lib/components/create-okr/style.js +100 -0
  79. package/lib/components/create-okr/utils/getCreateOkrSurpassPercent.js +124 -0
  80. package/lib/components/create-okr/utils/helper.js +99 -0
  81. package/lib/components/create-okr/utils/index.js +23 -0
  82. package/lib/components/dropdown-layer/icon-item.js +5 -3
  83. package/lib/components/dropdown-layer/index.css +16 -0
  84. package/lib/components/dropdown-layer/index.js +21 -14
  85. package/lib/components/dynamic/components/condition-render/index.js +20 -0
  86. package/lib/components/dynamic/components/dangerous-html/index.js +22 -0
  87. package/lib/components/dynamic/components/dynamic-search-input/index.css +78 -0
  88. package/lib/components/dynamic/components/dynamic-search-input/index.js +192 -0
  89. package/lib/components/dynamic/components/obj-status/index.css +22 -0
  90. package/lib/components/dynamic/components/obj-status/index.js +38 -0
  91. package/lib/components/dynamic/components/percent/index.css +21 -0
  92. package/lib/components/dynamic/components/percent/index.js +38 -0
  93. package/lib/components/dynamic/components/title/index.css +35 -0
  94. package/lib/components/dynamic/components/title/index.js +59 -0
  95. package/lib/components/dynamic/constant.js +97 -0
  96. package/lib/components/dynamic/context/index.js +13 -0
  97. package/lib/components/dynamic/dynamic-item/components/header/index.css +101 -0
  98. package/lib/components/dynamic/dynamic-item/components/header/index.js +299 -0
  99. package/lib/components/dynamic/dynamic-item/components/icon/index.css +10 -0
  100. package/lib/components/dynamic/dynamic-item/components/icon/index.js +35 -0
  101. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +22 -0
  102. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +22 -0
  103. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +95 -0
  104. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +173 -0
  105. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +59 -0
  106. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +107 -0
  107. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +48 -0
  108. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +89 -0
  109. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +96 -0
  110. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +171 -0
  111. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +67 -0
  112. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +110 -0
  113. package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +16 -0
  114. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
  115. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +111 -0
  116. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +158 -0
  117. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +95 -0
  118. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +215 -0
  119. package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +16 -0
  120. package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
  121. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +91 -0
  122. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +125 -0
  123. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +22 -0
  124. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +95 -0
  125. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +192 -0
  126. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +138 -0
  127. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +183 -0
  128. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +153 -0
  129. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +138 -0
  130. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +97 -0
  131. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +207 -0
  132. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +59 -0
  133. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +107 -0
  134. package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +50 -0
  135. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
  136. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
  137. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
  138. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
  139. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
  140. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
  141. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
  142. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +111 -0
  143. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +164 -0
  144. package/lib/components/dynamic/dynamic-item/index.css +128 -0
  145. package/lib/components/dynamic/dynamic-item/index.js +352 -0
  146. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
  147. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  148. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  149. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  150. package/lib/components/dynamic/dynamic-like-ranking/index.css +126 -0
  151. package/lib/components/dynamic/dynamic-like-ranking/index.js +157 -0
  152. package/lib/components/dynamic/dynamic-like-ranking/item.js +107 -0
  153. package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
  154. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
  155. package/lib/components/dynamic/dynamic-liking/index.css +81 -0
  156. package/lib/components/dynamic/dynamic-liking/index.js +76 -0
  157. package/lib/components/dynamic/dynamic-liking/item.js +91 -0
  158. package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
  159. package/lib/components/dynamic/dynamic-list/index.css +36 -0
  160. package/lib/components/dynamic/dynamic-list/index.js +61 -0
  161. package/lib/components/dynamic/dynamic-topping/image/quotationMark.svg +16 -0
  162. package/lib/components/dynamic/dynamic-topping/image/topIcon.svg +30 -0
  163. package/lib/components/dynamic/dynamic-topping/index.css +148 -0
  164. package/lib/components/dynamic/dynamic-topping/index.js +80 -0
  165. package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
  166. package/lib/components/dynamic/dynamic-topping/item.js +140 -0
  167. package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
  168. package/lib/components/dynamic/dynamic.css +204 -0
  169. package/lib/components/dynamic/dynamic.js +391 -0
  170. package/lib/components/dynamic/export-module/index.js +33 -0
  171. package/lib/components/dynamic/img/dynamic-P1.svg +15 -0
  172. package/lib/components/dynamic/img/dynamic-P2.svg +15 -0
  173. package/lib/components/dynamic/img/dynamic-P3.svg +15 -0
  174. package/lib/components/dynamic/img/dynamic-P4.svg +15 -0
  175. package/lib/components/dynamic/img/dynamic-P5.svg +15 -0
  176. package/lib/components/dynamic/img/dynamic-delay.svg +17 -0
  177. package/lib/components/dynamic/img/dynamic-desire.svg +61 -0
  178. package/lib/components/dynamic/img/dynamic-empty.png +0 -0
  179. package/lib/components/dynamic/img/dynamic-end.svg +17 -0
  180. package/lib/components/dynamic/img/dynamic-left-quoto.svg +13 -0
  181. package/lib/components/dynamic/img/dynamic-loading.gif +0 -0
  182. package/lib/components/dynamic/img/dynamic-normal.svg +17 -0
  183. package/lib/components/dynamic/img/dynamic-promise.svg +61 -0
  184. package/lib/components/dynamic/img/dynamic-reword.svg +24 -0
  185. package/lib/components/dynamic/img/dynamic-right-quoto.svg +13 -0
  186. package/lib/components/dynamic/img/dynamic-risk.svg +17 -0
  187. package/lib/components/dynamic/img/dynamic-submit-delay.svg +16 -0
  188. package/lib/components/dynamic/img/dynamic-submit-normal.svg +18 -0
  189. package/lib/components/dynamic/img/dynamic-top.svg +14 -0
  190. package/lib/components/dynamic/index.js +27 -0
  191. package/lib/components/dynamic/interface.js +5 -0
  192. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
  193. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +37 -0
  194. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
  195. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +37 -0
  196. package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
  197. package/lib/components/dynamic/quick-operation/components/create-share/index.js +37 -0
  198. package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
  199. package/lib/components/dynamic/quick-operation/components/create-task/index.js +42 -0
  200. package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
  201. package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
  202. package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
  203. package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
  204. package/lib/components/dynamic/quick-operation/index.css +51 -0
  205. package/lib/components/dynamic/quick-operation/index.js +112 -0
  206. package/lib/components/dynamic/request-api.js +92 -0
  207. package/lib/components/dynamic/util.js +140 -0
  208. package/lib/components/emotionsSelector/style.js +1 -1
  209. package/lib/components/file-list/components/single-file/index.css +84 -0
  210. package/lib/components/file-list/components/single-file/index.js +115 -0
  211. package/lib/components/file-list/img/new-file-list-doc.svg +1 -0
  212. package/lib/components/file-list/img/new-file-list-other.svg +1 -0
  213. package/lib/components/file-list/img/new-file-list-pdf.svg +1 -0
  214. package/lib/components/file-list/img/new-file-list-ppt.svg +1 -0
  215. package/lib/components/file-list/img/new-file-list-radio.svg +1 -0
  216. package/lib/components/file-list/img/new-file-list-video.svg +1 -0
  217. package/lib/components/file-list/img/new-file-list-xls.svg +1 -0
  218. package/lib/components/file-list/index.css +5 -0
  219. package/lib/components/file-list/index.js +61 -0
  220. package/lib/components/file-list/interface.js +5 -0
  221. package/lib/components/file-list/util.js +78 -0
  222. package/lib/components/form/form-fields/input/index.css +11 -0
  223. package/lib/components/form/form-fields/input/index.js +3 -1
  224. package/lib/components/grid-page/image/{Assistant.svg → assistant.svg} +0 -0
  225. package/lib/components/grid-page/image/{Boss.svg → boss.svg} +0 -0
  226. package/lib/components/grid-page/image/{Default-background.png → default-background.png} +0 -0
  227. package/lib/components/grid-page/image/{UserManager.svg → userManager.svg} +0 -0
  228. package/lib/components/grid-page/personal-info/index.js +5 -5
  229. package/lib/components/img-viewer/icon/enlarge.js +30 -0
  230. package/lib/components/img-viewer/icon/left-rotate.js +46 -0
  231. package/lib/components/img-viewer/icon/right-rotate.js +44 -0
  232. package/lib/components/img-viewer/icon/shrink.js +37 -0
  233. package/lib/components/img-viewer/image/loading.gif +0 -0
  234. package/lib/components/img-viewer/index.css +155 -0
  235. package/lib/components/img-viewer/index.js +228 -0
  236. package/lib/components/img-viewer/interface.js +5 -0
  237. package/lib/components/img-viewer/util.js +16 -0
  238. package/lib/components/mblog/components/MblogAction.js +10 -6
  239. package/lib/components/mblog/index.js +24 -11
  240. package/lib/components/mblog/style.js +8 -8
  241. package/lib/components/okr-detail/components/header/index.css +4 -0
  242. package/lib/components/okr-detail/components/header/o-cycle.js +2 -2
  243. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +15 -8
  244. package/lib/components/okr-flow/child-node/work-node.js +7 -1
  245. package/lib/components/okr-period-selector/select-cycle.js +139 -151
  246. package/lib/components/okr-progress-detail/index.css +1 -0
  247. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +5 -5
  248. package/lib/components/okr-review/ReviewPop/index.js +4 -4
  249. package/lib/components/period-selector/common.js +168 -17
  250. package/lib/components/period-selector/components/selector/index.js +103 -38
  251. package/lib/components/period-selector/components/selector/style.js +23 -9
  252. package/lib/components/period-selector/index.js +29 -28
  253. package/lib/components/popup/index.js +3 -1
  254. package/lib/components/publish-dynamic-modal/index.js +13 -0
  255. package/lib/components/publish-dynamic-modal/interface.js +5 -0
  256. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.css +3 -0
  257. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +191 -0
  258. package/lib/components/publish-dynamic-modal/requist-api.js +48 -0
  259. package/lib/components/radio/index.css +5 -0
  260. package/lib/components/radio/radio.js +12 -4
  261. package/lib/components/search-key-handle/index.js +39 -0
  262. package/lib/components/table/index.css +0 -1
  263. package/lib/components/upload/components/uploadedPreview.js +62 -54
  264. package/lib/components/upload/img/doc.svg +1 -0
  265. package/lib/components/upload/img/other.svg +1 -0
  266. package/lib/components/upload/img/pdf.svg +1 -0
  267. package/lib/components/upload/img/ppt.svg +1 -0
  268. package/lib/components/upload/img/radio.svg +1 -0
  269. package/lib/components/upload/img/video.svg +1 -0
  270. package/lib/components/upload/img/xls.svg +1 -0
  271. package/lib/components/upload/index.css +26 -0
  272. package/lib/components/upload/index.js +89 -57
  273. package/lib/components/upload/style.js +7 -7
  274. package/lib/components/upload/type.js +15 -15
  275. package/lib/components/upload/util.js +102 -0
  276. package/lib/components/upvote/index.js +37 -14
  277. package/lib/components/user-selector/export-modules/field-tree-selector/index.css +4 -0
  278. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +50 -24
  279. package/lib/components/user-selector/export-modules/field-tree-selector/single-selector/index.js +11 -2
  280. package/lib/components/user-selector/layout/index.css +1 -1
  281. package/lib/components-v1/buttonv2/ButtonLinked.js +35 -0
  282. package/lib/components-v1/buttonv2/ButtonOutlined.js +64 -0
  283. package/lib/components-v1/buttonv2/ButtonRounded.js +101 -0
  284. package/lib/components-v1/buttonv2/DefaultButton.js +86 -0
  285. package/lib/components-v1/buttonv2/index.js +37 -0
  286. package/lib/components-v1/buttonv2/style/style.js +53 -0
  287. package/lib/components-v1/buttonv2/style/theme.css +3 -0
  288. package/lib/components-v1/confirm/index.js +158 -0
  289. package/lib/index.js +49 -5
  290. package/lib/pages/dynamic/index.css +5 -0
  291. package/lib/pages/dynamic/index.js +25 -0
  292. package/lib/pages/home-page/components/data-list/nav-selector/index.js +18 -0
  293. package/lib/pages/home-page/components/data-list/table/utils-function.js +6 -3
  294. package/lib/pages/like-ranking/column.js +141 -0
  295. package/lib/pages/like-ranking/filter-buttons/department.js +44 -0
  296. package/lib/pages/like-ranking/filter-buttons/group.js +34 -0
  297. package/lib/pages/like-ranking/filter-buttons/index.css +19 -0
  298. package/lib/pages/like-ranking/filter-buttons/index.js +40 -0
  299. package/lib/pages/like-ranking/filter-buttons/modular.js +110 -0
  300. package/lib/pages/like-ranking/filter-buttons/name.js +73 -0
  301. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +27 -0
  302. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +38 -0
  303. package/lib/pages/like-ranking/filter-buttons/timer.js +56 -0
  304. package/lib/pages/like-ranking/image/dynamic-empty.png +0 -0
  305. package/lib/pages/like-ranking/image/loading.gif +0 -0
  306. package/lib/pages/like-ranking/image/ranking-1.png +0 -0
  307. package/lib/pages/like-ranking/image/ranking-2.png +0 -0
  308. package/lib/pages/like-ranking/image/ranking-3.png +0 -0
  309. package/lib/pages/like-ranking/index.css +185 -0
  310. package/lib/pages/like-ranking/index.js +252 -0
  311. package/lib/pages/like-ranking/mock.js +366 -0
  312. package/lib/pages/like-ranking/request-api.js +15 -0
  313. package/lib/utils/auth.js +46 -5
  314. package/lib/utils/bs-global.js +26 -2
  315. package/lib/utils/format-time.js +161 -0
  316. package/lib/utils/helpers.js +41 -0
  317. package/lib/utils/roundWeight.js +105 -0
  318. package/lib/utils/tools.js +140 -20
  319. package/package.json +2 -2
@@ -15,16 +15,18 @@ var _avatar = _interopRequireDefault(require("../../components-v1/avatar"));
15
15
 
16
16
  var _Portals = _interopRequireDefault(require("../../components-v1/portals/Portals"));
17
17
 
18
- var _CommunicationAttachments = _interopRequireDefault(require("./CommunicationAttachments"));
19
-
20
18
  var _ConfirmPop = _interopRequireDefault(require("../delete-confirm-pop/ConfirmPop"));
21
19
 
22
20
  var _ConvertUserName = _interopRequireDefault(require("./ConvertUserName"));
23
21
 
24
- var _requestV = require("../../utils/request-v1");
25
-
26
22
  var _openData = require("../../utils/open-data");
27
23
 
24
+ var _fileList = _interopRequireDefault(require("../file-list"));
25
+
26
+ var _tools = require("../../utils/tools");
27
+
28
+ require("./index.css");
29
+
28
30
  var _style = require("./style");
29
31
 
30
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -33,162 +35,115 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
33
35
 
34
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; }
35
37
 
36
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
-
38
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
39
-
40
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
41
-
42
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
43
-
44
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
45
-
46
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
47
-
48
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
49
-
50
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
51
-
52
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
53
-
54
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
-
56
- var CommunicationRecord = /*#__PURE__*/function (_PureComponent) {
57
- _inherits(CommunicationRecord, _PureComponent);
58
-
59
- var _super = _createSuper(CommunicationRecord);
60
-
61
- function CommunicationRecord(props) {
62
- var _this;
63
-
64
- _classCallCheck(this, CommunicationRecord);
65
-
66
- _this = _super.call(this, props);
67
-
68
- _this.getCommentGetByIds = function (commentId) {
69
- var url = (0, _requestV.getApiUrl2)("comment/GetByIds?comment_id=".concat(commentId));
70
- (0, _requestV.taker)(url, 'GET').then(function (res) {
71
- if (res.Code == 1) {
72
- _this.setState({
73
- 'replyedContent': res.Data.content
74
- });
75
- }
38
+ var prefix = "titaui-communication";
39
+
40
+ var CommunicationRecord = function CommunicationRecord(_ref) {
41
+ var communicationTrack = _ref.communicationTrack,
42
+ _ref$confirmPopAlign = _ref.confirmPopAlign,
43
+ confirmPopAlign = _ref$confirmPopAlign === void 0 ? "top right" : _ref$confirmPopAlign,
44
+ highLightKeyWord = _ref.highLightKeyWord,
45
+ index = _ref.index,
46
+ onCommunicationRecordChange = _ref.onCommunicationRecordChange,
47
+ className = _ref.className,
48
+ praiseStatus = _ref.praiseStatus;
49
+ var contentRef = (0, _react.useRef)();
50
+ (0, _react.useEffect)(function () {
51
+ (0, _tools.unHighLight)({
52
+ parentDom: contentRef.current
53
+ });
54
+
55
+ if (highLightKeyWord) {
56
+ (0, _tools.highLightWord)({
57
+ parentDom: contentRef.current,
58
+ keyWord: highLightKeyWord
76
59
  });
77
- };
78
-
79
- _this.state = {
80
- replyedContent: ''
81
- };
82
- return _this;
83
- }
84
-
85
- _createClass(CommunicationRecord, [{
86
- key: "componentWillMount",
87
- value: function componentWillMount() {
88
- var parentCommentId = this.props.communicationTrack.parentCommentId;
89
-
90
- if (parentCommentId) {
91
- this.getCommentGetByIds(parentCommentId);
92
- }
93
- } // 获取被回复人发布的沟通内容:“的话”上的tips信息
94
-
95
- }, {
96
- key: "render",
97
- value: function render() {
98
- var _this2 = this;
99
-
100
- var _this$props = this.props,
101
- communicationTrack = _this$props.communicationTrack,
102
- index = _this$props.index,
103
- onCommunicationRecordChange = _this$props.onCommunicationRecordChange,
104
- className = _this$props.className,
105
- confirmPopAlign = _this$props.confirmPopAlign,
106
- praiseStatus = _this$props.praiseStatus;
107
- var replyedContent = this.state.replyedContent;
108
- return /*#__PURE__*/_react["default"].createElement(_style.CommunicationItem, {
109
- className: className
110
- }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
111
- size: _avatar["default"].size(7),
112
- name: communicationTrack.publishUser.name,
113
- src: communicationTrack.publishUser.avatar.small,
114
- color: communicationTrack.publishUser.avatar.color,
115
- userId: communicationTrack.publishUser.userId
116
- }), /*#__PURE__*/_react["default"].createElement(_style.CommunicationDetail, null, /*#__PURE__*/_react["default"].createElement("p", {
117
- style: {
118
- color: '#3a4247',
119
- wordBreak: 'break-all'
120
- }
121
- }, communicationTrack.commentType != 2 ? /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
122
- userName: communicationTrack.publishUser.name,
123
- userId: communicationTrack.publishUser.userId
124
- }) : /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
125
- userName: communicationTrack.publishUser.name,
126
- userId: communicationTrack.publishUser.userId
127
- }), "\xA0\u56DE\u590D\xA0", /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
128
- userName: communicationTrack.parentUser.name,
129
- userId: communicationTrack.parentUser.userId
130
- }), /*#__PURE__*/_react["default"].createElement(_style.CommunicationReplyedContent, {
131
- "data-tip": replyedContent,
132
- "data-html": true,
133
- onMouseEnter: function onMouseEnter() {
134
- return _this2.getCommentGetByIds(communicationTrack.parentCommentId);
135
- }
136
- }, "\xA0\u7684\u8BDD"), "\uFF1A", /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
137
- html: true,
138
- className: "tt-react-tooltip",
139
- place: "top",
140
- type: "dark",
141
- effect: "solid"
142
- })))), /*#__PURE__*/_react["default"].createElement(_style.CommunicationContent, null, (0, _openData.parseTag)(communicationTrack.content)), communicationTrack.attachments && /*#__PURE__*/_react["default"].createElement(_CommunicationAttachments["default"], {
143
- attachments: communicationTrack.attachments ? communicationTrack.attachments : []
144
- }), /*#__PURE__*/_react["default"].createElement("p", {
145
- className: "communication__date"
146
- }, communicationTrack.createDate)), /*#__PURE__*/_react["default"].createElement(_style.CommunicationActionbar, {
147
- className: "communication__actionbar"
148
- }, /*#__PURE__*/_react["default"].createElement(_style.ActionbarList, null, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
149
- onMouseDown: function onMouseDown(event) {
150
- praiseStatus != 2 && onCommunicationRecordChange(event, 'reply', index);
151
- }
152
- }, "\u56DE\u590D"), /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
153
- onMouseDown: function onMouseDown(event) {
154
- praiseStatus != 2 && onCommunicationRecordChange(event, 'praise', index);
155
- }
156
- }, communicationTrack.isPraise ? '已赞' : '点赞'), communicationTrack.praiseTotal > 0 &&
157
- /*#__PURE__*/
158
- // <ToolTip title='点击查看点赞记录'>
159
- _react["default"].createElement(_style.CommunicationPraiseTotal, {
160
- className: "communication__praise__total",
161
- onMouseDown: function onMouseDown(event) {
162
- onCommunicationRecordChange(event, 'showPraiseRecord', index);
163
- event.stopPropagation();
164
- event.nativeEvent.stopImmediatePropagation();
165
- },
166
- onClick: function onClick(event) {
167
- event.stopPropagation();
168
- event.nativeEvent.stopImmediatePropagation();
169
- },
170
- "data-for": "praise-record",
171
- "data-tip": !!communicationTrack.praiseTotal ? '点击查看点赞记录' : ''
172
- }, communicationTrack.praiseTotal) // </ToolTip>
173
- , communicationTrack.isEdit && /*#__PURE__*/_react["default"].createElement(_ConfirmPop["default"], {
174
- align: confirmPopAlign,
175
- onSubmit: function onSubmit(event) {
176
- return onCommunicationRecordChange(event, 'delete', index);
177
- }
178
- }, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, null, "\u5220\u9664")))), /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
179
- id: "praise-record",
180
- className: "tt-react-tooltip",
181
- place: "top",
182
- type: "dark",
183
- effect: "solid"
184
- }));
185
60
  }
186
- }]);
187
-
188
- return CommunicationRecord;
189
- }(_react.PureComponent);
190
-
191
- exports["default"] = CommunicationRecord;
192
- CommunicationRecord.defaultProps = {
193
- confirmPopAlign: 'top right'
194
- };
61
+ }, [highLightKeyWord]);
62
+ return /*#__PURE__*/_react["default"].createElement(_style.CommunicationItem, {
63
+ className: className
64
+ }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
65
+ size: _avatar["default"].size(7),
66
+ name: communicationTrack.publishUser.name,
67
+ src: communicationTrack.publishUser.avatar.small,
68
+ color: communicationTrack.publishUser.avatar.color,
69
+ userId: communicationTrack.publishUser.userId
70
+ }), /*#__PURE__*/_react["default"].createElement(_style.CommunicationDetail, null, /*#__PURE__*/_react["default"].createElement("p", {
71
+ style: {
72
+ color: "#3a4247",
73
+ wordBreak: "break-all"
74
+ }
75
+ }, communicationTrack.commentType != 2 ? /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
76
+ userName: communicationTrack.publishUser.name,
77
+ userId: communicationTrack.publishUser.userId
78
+ }), /*#__PURE__*/_react["default"].createElement("span", {
79
+ className: prefix + "__communication-colon"
80
+ }, "\uFF1A")) : /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
81
+ userName: communicationTrack.publishUser.name,
82
+ userId: communicationTrack.publishUser.userId
83
+ }), /*#__PURE__*/_react["default"].createElement("span", {
84
+ className: prefix + "__communication-text"
85
+ }, "\u56DE\u590D"), /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
86
+ userName: communicationTrack.parentUser.name,
87
+ userId: communicationTrack.parentUser.userId
88
+ }), /*#__PURE__*/_react["default"].createElement("span", {
89
+ className: prefix + "__communication-colon"
90
+ }, "\uFF1A"), /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
91
+ html: true,
92
+ className: "tt-react-tooltip",
93
+ place: "top",
94
+ type: "dark",
95
+ effect: "solid"
96
+ }))), /*#__PURE__*/_react["default"].createElement("span", {
97
+ className: prefix + "__communication-content",
98
+ ref: contentRef
99
+ }, (0, _openData.parseTag)(communicationTrack.content))), communicationTrack.attachments && /*#__PURE__*/_react["default"].createElement("div", {
100
+ className: prefix + "__communication-attachments"
101
+ }, /*#__PURE__*/_react["default"].createElement(_fileList["default"], {
102
+ data: communicationTrack.attachments
103
+ })), /*#__PURE__*/_react["default"].createElement("div", {
104
+ className: prefix + "__communication-bottom"
105
+ }, /*#__PURE__*/_react["default"].createElement("span", {
106
+ className: prefix + "__communication-time"
107
+ }, communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_style.CommunicationActionbar, {
108
+ className: "communication__actionbar"
109
+ }, /*#__PURE__*/_react["default"].createElement(_style.ActionbarList, null, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
110
+ onMouseDown: function onMouseDown(event) {
111
+ praiseStatus != 2 && onCommunicationRecordChange(event, "reply", index);
112
+ }
113
+ }, "\u56DE\u590D"), /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
114
+ onMouseDown: function onMouseDown(event) {
115
+ praiseStatus != 2 && onCommunicationRecordChange(event, "praise", index);
116
+ }
117
+ }, communicationTrack.isPraise ? "已赞" : "点赞"), communicationTrack.praiseTotal > 0 &&
118
+ /*#__PURE__*/
119
+ // <ToolTip title='点击查看点赞记录'>
120
+ _react["default"].createElement(_style.CommunicationPraiseTotal, {
121
+ className: "communication__praise__total",
122
+ onMouseDown: function onMouseDown(event) {
123
+ onCommunicationRecordChange(event, "showPraiseRecord", index);
124
+ event.stopPropagation();
125
+ event.nativeEvent.stopImmediatePropagation();
126
+ },
127
+ onClick: function onClick(event) {
128
+ event.stopPropagation();
129
+ event.nativeEvent.stopImmediatePropagation();
130
+ },
131
+ "data-for": "praise-record",
132
+ "data-tip": !!communicationTrack.praiseTotal ? "点击查看点赞记录" : ""
133
+ }, communicationTrack.praiseTotal) // </ToolTip>
134
+ , communicationTrack.isEdit && /*#__PURE__*/_react["default"].createElement(_ConfirmPop["default"], {
135
+ align: confirmPopAlign,
136
+ onSubmit: function onSubmit(event) {
137
+ return onCommunicationRecordChange(event, "delete", index);
138
+ }
139
+ }, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, null, "\u5220\u9664")))))), /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
140
+ id: "praise-record",
141
+ className: "tt-react-tooltip",
142
+ place: "top",
143
+ type: "dark",
144
+ effect: "solid"
145
+ }));
146
+ };
147
+
148
+ var _default = CommunicationRecord;
149
+ exports["default"] = _default;
@@ -45,7 +45,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
45
45
 
46
46
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
47
47
 
48
- var UserLink = _styledComponents["default"].a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 12px;\n color: #3A4247;\n\n &:hover {\n color: #1687d9;\n }\n"])));
48
+ var UserLink = _styledComponents["default"].a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 14px;\n font-weight: 600;\n color: #3F4755;\n line-height: 22px;\n\n &:hover {\n color: #2879ff;\n }\n"])));
49
49
 
50
50
  var ConvertUserName = /*#__PURE__*/function (_PureComponent) {
51
51
  _inherits(ConvertUserName, _PureComponent);
@@ -0,0 +1,63 @@
1
+ .titaui-communication__communication-text {
2
+ font-size: 14px;
3
+ color: #89919f;
4
+ line-height: 22px;
5
+ margin: 0 8px;
6
+ }
7
+
8
+ .titaui-communication__communication-colon {
9
+ font-size: 14px;
10
+ font-weight: 600;
11
+ color: #3f4755;
12
+ line-height: 22px;
13
+ }
14
+
15
+ .titaui-communication__communication-content {
16
+ font-size: 14px;
17
+ color: #6f7886;
18
+ line-height: 22px;
19
+ }
20
+
21
+ .titaui-communication__communication-content .highlight {
22
+ color: #f05e5e;
23
+ }
24
+
25
+ .titaui-communication__communication-content img {
26
+ vertical-align: text-bottom;
27
+ }
28
+
29
+ .titaui-communication__communication-content a {
30
+ color: #2879ff;
31
+ }
32
+
33
+ .titaui-communication__communication-content a:hover {
34
+ color: #5c8eff;
35
+ }
36
+
37
+ .titaui-communication__communication-time {
38
+ font-size: 12px;
39
+ color: #89919f;
40
+ line-height: 18px;
41
+ margin-top: 4px;
42
+ }
43
+
44
+ .titaui-communication__communication-bottom {
45
+ position: relative;
46
+ }
47
+
48
+ .titaui-communication__communication-list {
49
+ margin-bottom: 8px;
50
+ }
51
+
52
+ .titaui-communication__communication-attachments {
53
+ margin-top: 12px;
54
+ }
55
+
56
+ .titaui-communication__communication-total {
57
+ display: flex;
58
+ align-items: center;
59
+ }
60
+
61
+ .titaui-communication__communication-total-icon {
62
+ margin-left: 4px;
63
+ }
@@ -9,6 +9,8 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
12
14
  var _mblog = _interopRequireDefault(require("../mblog"));
13
15
 
14
16
  var _praiseRecord = _interopRequireDefault(require("../praise-record"));
@@ -21,6 +23,8 @@ var _style = require("./style");
21
23
 
22
24
  var _openData = require("../../utils/open-data");
23
25
 
26
+ require("./index.css");
27
+
24
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
29
 
26
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -59,6 +63,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
59
63
 
60
64
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
61
65
 
66
+ var prefix = "titaui-communication";
67
+
62
68
  var Communication = /*#__PURE__*/function (_PureComponent) {
63
69
  _inherits(Communication, _PureComponent);
64
70
 
@@ -77,14 +83,14 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
77
83
  okrFeedParams = _this$props.okrFeedParams;
78
84
  var isShowAllCommunicationRecord = _this.state.isShowAllCommunicationRecord;
79
85
  var url = commentType == 1 ? isShowAllCommunicationRecord ? (0, _requestV.getApiUrl2)("comment/Get?feed_id=".concat(feedId, "&comment_type=0")) : (0, _requestV.getApiUrl2)("user/feed/GetById?feed_id=".concat(feedId, "&comment_count=").concat(commentCount)) : (0, _requestV.getApiUrl)("okr/cycle/getFeed?objId=".concat(okrFeedParams && okrFeedParams.objId, "&objType=").concat(okrFeedParams && okrFeedParams.objType, "&cycleType=").concat(okrFeedParams && okrFeedParams.cycleType, "&yqmNum=").concat(okrFeedParams && okrFeedParams.yqmNum, "&annualNum=").concat(okrFeedParams && okrFeedParams.annualNum, "&commentCount=").concat(commentCount));
80
- (0, _requestV.taker)(url, 'GET').then(function (res) {
86
+ (0, _requestV.taker)(url, "GET").then(function (res) {
81
87
  if (res.Code === 1) {
82
88
  var data = res.Data && (res.Data.feedComments || res.Data);
83
89
 
84
90
  _this.setState({
85
91
  communicationTrackList: data.comments ? data.comments : [],
86
92
  communicationTrackTotal: data.total,
87
- okrCommentFeedId: commentType == 2 ? res.Data.feedId : ''
93
+ okrCommentFeedId: commentType == 2 ? res.Data.feedId : ""
88
94
  });
89
95
  } else {
90
96
  _this.setState({
@@ -104,10 +110,11 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
104
110
 
105
111
  var isShowAllCommunicationRecord = _this.state.isShowAllCommunicationRecord;
106
112
  isShowAllCommunicationRecord = !isShowAllCommunicationRecord;
107
- isShowAllCommunicationRecord ? _this.getFeedInfo(feedId, communicationTrackTotal) : _this.getFeedInfo(feedId, commentCount);
108
113
 
109
114
  _this.setState({
110
115
  isShowAllCommunicationRecord: isShowAllCommunicationRecord
116
+ }, function () {
117
+ isShowAllCommunicationRecord ? _this.getFeedInfo(feedId, communicationTrackTotal) : _this.getFeedInfo(feedId, commentCount);
111
118
  });
112
119
  };
113
120
 
@@ -123,15 +130,15 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
123
130
 
124
131
  var communicationTrackList = _toConsumableArray(_this.state.communicationTrackList);
125
132
 
126
- if (actionType === 'delete') {
133
+ if (actionType === "delete") {
127
134
  // 删除
128
135
  var url = (0, _requestV.getApiUrl2)("comment/Delete?comment_id=".concat(communicationTrackList[index].commentId, "&feed_id=").concat(feedId || _this.state.okrCommentFeedId));
129
- (0, _requestV.taker)(url, 'DELETE').then(function (res) {
136
+ (0, _requestV.taker)(url, "DELETE").then(function (res) {
130
137
  if (res.Code === 1) {
131
138
  isShowAllCommunicationRecord ? _this.getFeedInfo(feedId, communicationTrackTotal - 1) : _this.getFeedInfo(feedId, commentCount);
132
139
  }
133
140
  });
134
- } else if (actionType === 'reply') {
141
+ } else if (actionType === "reply") {
135
142
  // 沟通里的回复
136
143
  if (_this.props.useCustomMblog && _this.props.onComment) {
137
144
  _this.props.onComment({
@@ -156,7 +163,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
156
163
  replyUserId: communicationTrackList[index].publishUser.userId,
157
164
  replyUserCommentId: communicationTrackList[index].commentId
158
165
  });
159
- } else if (actionType === 'praise') {
166
+ } else if (actionType === "praise") {
160
167
  // 沟通里的点赞
161
168
  var isPraise = communicationTrackList[index].isPraise;
162
169
  isPraise = !isPraise;
@@ -167,7 +174,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
167
174
 
168
175
  var _url = isPraise ? (0, _requestV.getApiUrl)("praise/add?objId=".concat(communicationTrackList[index].commentId, "&objType=19&praiseType=1")) : (0, _requestV.getApiUrl)("praise/cancel?objId=".concat(communicationTrackList[index].commentId, "&objType=19"));
169
176
 
170
- (0, _requestV.taker)(_url, 'POST').then(function (res) {
177
+ (0, _requestV.taker)(_url, "POST").then(function (res) {
171
178
  if (res.Code === 1) {
172
179
  var praiseTotal = communicationTrackList[index].praiseTotal;
173
180
  communicationTrackList[index].isPraise = isPraise;
@@ -183,7 +190,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
183
190
  });
184
191
  }
185
192
  });
186
- } else if (actionType === 'showPraiseRecord') {
193
+ } else if (actionType === "showPraiseRecord") {
187
194
  // 显示点赞记录
188
195
  _this.setState({
189
196
  isShowPraiseRecordPop: true,
@@ -218,12 +225,13 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
218
225
  communicationTrackTotal = _this$state3.communicationTrackTotal,
219
226
  isShowAllCommunicationRecord = _this$state3.isShowAllCommunicationRecord;
220
227
 
221
- if (submitType === 'submit') {
228
+ if (submitType === "submit") {
222
229
  // 发送
223
230
  sentData.FeedId = feedId;
224
231
  sentData.CommentId = 0;
225
232
  sentData.ObjId = 0;
226
233
  sentData.ObjType = 0;
234
+ sentData.Content = sentData.Content || ' ';
227
235
 
228
236
  if (isShowReplyToUser) {
229
237
  sentData.CommentId = replyUserCommentId;
@@ -233,8 +241,8 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
233
241
  submitStatus: 2
234
242
  });
235
243
 
236
- var url = commentType == 1 ? (0, _requestV.getApiUrl2)('comment/Add') : (0, _requestV.getApiUrl)("okr/cycle/addComment?objId=".concat(okrFeedParams && okrFeedParams.objId, "&objType=").concat(okrFeedParams && okrFeedParams.objType, "&cycleType=").concat(okrFeedParams && okrFeedParams.cycleType, "&yqmNum=").concat(okrFeedParams && okrFeedParams.yqmNum, "&annualNum=").concat(okrFeedParams && okrFeedParams.annualNum));
237
- (0, _requestV.taker)(url, 'POST', sentData).then(function (res) {
244
+ var url = commentType == 1 ? (0, _requestV.getApiUrl2)("comment/Add") : (0, _requestV.getApiUrl)("okr/cycle/addComment?objId=".concat(okrFeedParams && okrFeedParams.objId, "&objType=").concat(okrFeedParams && okrFeedParams.objType, "&cycleType=").concat(okrFeedParams && okrFeedParams.cycleType, "&yqmNum=").concat(okrFeedParams && okrFeedParams.yqmNum, "&annualNum=").concat(okrFeedParams && okrFeedParams.annualNum));
245
+ (0, _requestV.taker)(url, "POST", sentData).then(function (res) {
238
246
  if (res.Code === 1) {
239
247
  isShowAllCommunicationRecord ? _this.getFeedInfo(feedId, communicationTrackTotal + 1) : _this.getFeedInfo(feedId, commentCount);
240
248
 
@@ -270,17 +278,17 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
270
278
  isShowAllCommunicationRecord: false,
271
279
  // 是否显示所有记录
272
280
  // 回复
273
- replyUser: '',
274
- replyUserId: '',
275
- replyUserCommentId: '0',
281
+ replyUser: "",
282
+ replyUserId: "",
283
+ replyUserCommentId: "0",
276
284
  isShowReplyToUser: false,
277
285
  // 是否显示回复谁
278
286
  submitStatus: 0,
279
287
  praiseStatus: 0,
280
288
  // 点赞记录
281
- praiseObjId: '',
289
+ praiseObjId: "",
282
290
  isShowPraiseRecordPop: false,
283
- okrCommentFeedId: ''
291
+ okrCommentFeedId: ""
284
292
  };
285
293
  return _this;
286
294
  }
@@ -338,19 +346,32 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
338
346
  userSelectorPopAlign = _this$props8.userSelectorPopAlign,
339
347
  emotionsSelectorPopAlign = _this$props8.emotionsSelectorPopAlign,
340
348
  showAtAll = _this$props8.showAtAll,
341
- useCustomMblog = _this$props8.useCustomMblog;
349
+ commentCount = _this$props8.commentCount,
350
+ useCustomMblog = _this$props8.useCustomMblog,
351
+ _this$props8$submitTe = _this$props8.submitText,
352
+ submitText = _this$props8$submitTe === void 0 ? "回复" : _this$props8$submitTe,
353
+ _this$props8$highLigh = _this$props8.highLightKeyWord,
354
+ highLightKeyWord = _this$props8$highLigh === void 0 ? '' : _this$props8$highLigh,
355
+ _this$props8$autoFocu = _this$props8.autoFocus,
356
+ autoFocus = _this$props8$autoFocu === void 0 ? false : _this$props8$autoFocu;
342
357
  return /*#__PURE__*/_react["default"].createElement(_style.CommunicationWrapper, {
343
358
  className: "communcation-wrapper ".concat(className)
344
- }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_style.CommunicationRecordTotal, null, communicationTrackTotal > 0 && /*#__PURE__*/_react["default"].createElement("p", {
345
- className: isShowAllCommunicationRecord ? "tu-icon-angles-up" : "tu-icon-angles-down",
359
+ }, /*#__PURE__*/_react["default"].createElement("div", null, communicationTrackTotal > 0 && /*#__PURE__*/_react["default"].createElement(_style.CommunicationRecordTotal, null, /*#__PURE__*/_react["default"].createElement("div", {
360
+ className: prefix + "__communication-total",
346
361
  onMouseDown: function onMouseDown() {
347
362
  return _this2.handlerSwitchShowRecord();
348
363
  }
349
- }, "\u5168\u90E8\u6C9F\u901A\xA0", /*#__PURE__*/_react["default"].createElement("span", null, communicationTrackTotal))), /*#__PURE__*/_react["default"].createElement("div", {
350
- className: "communication__list"
364
+ }, "\u5168\u90E8\u6C9F\u901A\xA0", /*#__PURE__*/_react["default"].createElement("span", null, communicationTrackTotal), communicationTrackTotal > commentCount && /*#__PURE__*/_react["default"].createElement("i", {
365
+ className: (0, _classnames["default"])(prefix + "__communication-total-icon", {
366
+ "tu-icon-APP-xi": isShowAllCommunicationRecord,
367
+ "tu-icon-arrow-down1": !isShowAllCommunicationRecord
368
+ })
369
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
370
+ className: prefix + "__communication-list"
351
371
  }, communicationTrackList.length > 0 && communicationTrackList.map(function (item, index) {
352
372
  return /*#__PURE__*/_react["default"].createElement(_CommunicationRecord["default"], {
353
373
  communicationTrack: item,
374
+ highLightKeyWord: highLightKeyWord,
354
375
  index: index,
355
376
  key: item.commentId,
356
377
  praiseStatus: _this2.state.praiseStatus,
@@ -362,12 +383,12 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
362
383
  }))), !useCustomMblog && /*#__PURE__*/_react["default"].createElement("div", {
363
384
  className: "communication__reply__cintainer"
364
385
  }, /*#__PURE__*/_react["default"].createElement(_style.ReplyToUser, {
365
- height: isShowReplyToUser ? 'auto' : '0',
366
- padding: isShowReplyToUser ? '3px 0' : '0'
386
+ height: isShowReplyToUser ? "auto" : "0",
387
+ padding: isShowReplyToUser ? "3px 0" : "0"
367
388
  }, /*#__PURE__*/_react["default"].createElement("span", {
368
389
  style: {
369
- position: 'relative',
370
- top: '2px'
390
+ position: "relative",
391
+ top: "2px"
371
392
  }
372
393
  }, "\u56DE\u590D"), /*#__PURE__*/_react["default"].createElement(_style.ReplyUser, null, /*#__PURE__*/_react["default"].createElement("span", {
373
394
  className: "name"
@@ -379,15 +400,19 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
379
400
  onMouseDown: this.handlerCancelReplyUser
380
401
  }))), /*#__PURE__*/_react["default"].createElement(_mblog["default"], {
381
402
  setTextareaRef: setTextareaRef || function () {},
403
+ isHasPlaceholder: true,
404
+ placeholderText: "请输入沟通内容",
382
405
  isShowRange: false,
383
406
  isShowBtnCancel: false,
384
407
  isShowSendSms: isShowSendSms,
385
- submitText: "\u56DE\u590D",
408
+ submitText: submitText,
386
409
  showAtAll: showAtAll,
387
410
  commentsTypeKey: feedId,
388
411
  submitStatus: submitStatus,
389
412
  userSelectorPopAlign: userSelectorPopAlign,
390
413
  emotionsSelectorPopAlign: emotionsSelectorPopAlign,
414
+ autoFocus: autoFocus,
415
+ autoResizing: false,
391
416
  onMblogSubmit: function onMblogSubmit(submitType, sentData) {
392
417
  return _this2.handlerReply(submitType, sentData);
393
418
  }
@@ -397,7 +422,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
397
422
  onSubmit: function onSubmit() {
398
423
  return _this2.setState({
399
424
  isShowPraiseRecordPop: false,
400
- praiseObjId: ''
425
+ praiseObjId: ""
401
426
  });
402
427
  }
403
428
  }));