@titaui/pc 1.10.7 → 1.10.8-2.beta-1

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 (299) hide show
  1. package/.eslintrc.js +2 -2
  2. package/.prettierignore +4 -4
  3. package/lib/components/book-demo/utils.js +4 -0
  4. package/lib/components/button/default-button/index.css +10 -4
  5. package/lib/components/button/default-button/index.js +13 -2
  6. package/lib/components/change-okr-modal/index.js +3 -2
  7. package/lib/components/checkbox/index.css +1 -0
  8. package/lib/components/communication/CommunicationRecord.js +16 -16
  9. package/lib/components/communication/index.css +16 -15
  10. package/lib/components/communication/index.js +23 -6
  11. package/lib/components/communication/style.js +4 -4
  12. package/lib/components/create-okr-modal/fields/o-new-name.js +31 -21
  13. package/lib/components/create-okr-modal/fields/okr-parent.js +1 -5
  14. package/lib/components/create-okr-modal/kr-items/krDatas.js +16 -16
  15. package/lib/components/{dynamic/components/dangerous-html → dangerous-html}/index.js +0 -0
  16. package/lib/components/dialog/index.css +4 -1
  17. package/lib/components/dialog/index.js +1 -1
  18. package/lib/components/dialog-confirm/index.css +1 -1
  19. package/lib/components/drawer/index.js +3 -2
  20. package/lib/components/drawer-manager/index.js +6 -1
  21. package/lib/components/dynamic/components/first-level-tabs/index.css +12 -2
  22. package/lib/components/dynamic/components/first-level-tabs/index.js +19 -6
  23. package/lib/components/dynamic/components/obj-status/index.css +1 -0
  24. package/lib/components/dynamic/components/obj-status/utils.js +1 -1
  25. package/lib/components/dynamic/constant.js +12 -2
  26. package/lib/components/dynamic/dynamic-item/components/feed-operate/index.css +71 -0
  27. package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +112 -0
  28. package/lib/components/dynamic/dynamic-item/components/header/index.css +2 -1
  29. package/lib/components/dynamic/dynamic-item/components/header/index.js +2 -2
  30. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +27 -0
  31. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +13 -7
  32. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +10 -4
  33. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +1 -1
  34. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +1 -1
  35. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +5 -3
  36. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.css +4 -0
  37. package/lib/components/dynamic/dynamic-item/dynamic-chart/index.js +102 -0
  38. package/lib/components/dynamic/dynamic-item/dynamic-chart/utils.js +61 -0
  39. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +12 -11
  40. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -5
  41. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +2 -2
  42. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -3
  43. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/dynamic-share-course.png +0 -0
  44. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/jiantou-right@3x.png +0 -0
  45. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/img/user-photo.png +0 -0
  46. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/index.css +2 -2
  47. package/lib/components/dynamic/dynamic-item/{dynamic-share-to-dynamic → dynamic-learning}/index.js +6 -5
  48. package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +9 -2
  49. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +2 -2
  50. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +4 -2
  51. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +1 -1
  52. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +1 -1
  53. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +2 -6
  54. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -2
  55. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +2 -2
  56. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -1
  57. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +13 -7
  58. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +42 -6
  59. package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.css +14 -30
  60. package/lib/components/dynamic/dynamic-item/{dynamic-replay → dynamic-reply}/index.js +1 -1
  61. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +1 -1
  62. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +12 -3
  63. package/lib/components/dynamic/dynamic-item/dynamic-reward/img/reward.png +0 -0
  64. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +6 -1
  65. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +18 -51
  66. package/lib/components/dynamic/dynamic-item/dynamic-reward/utils.js +28 -0
  67. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +6 -2
  68. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +55 -2
  69. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +2 -2
  70. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +1 -1
  71. package/lib/components/dynamic/dynamic-item/index.css +58 -3
  72. package/lib/components/dynamic/dynamic-item/index.js +124 -23
  73. package/lib/components/dynamic/dynamic-like-ranking/item.js +1 -1
  74. package/lib/components/dynamic/dynamic-list/index.js +11 -2
  75. package/lib/components/dynamic/dynamic-topping/item.js +8 -4
  76. package/lib/components/dynamic/dynamic.js +5 -2
  77. package/lib/components/dynamic/img/dynamic-operate.png +0 -0
  78. package/lib/components/dynamic/img/dynamic-point.svg +13 -0
  79. package/lib/components/dynamic/img/dynamic-reward-hover.svg +1 -0
  80. package/lib/components/dynamic/img/dynamic-reward-normal.svg +1 -0
  81. package/lib/components/dynamic/online-broadcast/data.js +13 -1
  82. package/lib/components/e-status-dropdown/index.css +3 -0
  83. package/lib/components/e-status-dropdown/index.js +94 -0
  84. package/lib/components/edit-kr-wight/style/index.js +2 -2
  85. package/lib/components/file-list/components/single-file/index.css +6 -5
  86. package/lib/components/file-list/components/single-file/index.js +1 -1
  87. package/lib/components/file-list/index.css +1 -0
  88. package/lib/components/follower-visitor/index.js +6 -4
  89. package/lib/components/grid-layout/okr-progress/index.js +20 -30
  90. package/lib/components/help-card/image/not-try.png +0 -0
  91. package/lib/components/help-card/image/try.png +0 -0
  92. package/lib/components/help-card/index.css +31 -2
  93. package/lib/components/help-card/index.js +54 -17
  94. package/lib/components/invite-people/img/invite-people.svg +62 -0
  95. package/lib/components/invite-people/index.css +1 -1
  96. package/lib/components/mblog/index.js +14 -5
  97. package/lib/components/menus/export-modules/demo-menus/index.js +2 -2
  98. package/lib/components/menus/export-modules/demo-menus/menu-highlight.js +25 -1
  99. package/lib/components/menus/export-modules/demo-menus/menus.js +60 -11
  100. package/lib/components/menus/export-modules/manage-menus/constant.js +1 -1
  101. package/lib/components/menus/export-modules/manage-menus/index.css +3 -0
  102. package/lib/components/menus/export-modules/okr-menus/subordinate-menus/index.js +34 -12
  103. package/lib/components/menus/images/okr-gongsi.svg +17 -0
  104. package/lib/components/nav-top/components/menu/index.css +24 -0
  105. package/lib/components/nav-top/components/menu/index.js +9 -1
  106. package/lib/components/nav-top/components/user-message/components/reply/index.js +9 -8
  107. package/lib/components/nav-top/components/user-message/components/reply/reply-item.js +15 -5
  108. package/lib/components/nav-top/components/user-message/index.css +4 -3
  109. package/lib/components/nav-top/components/user-message/index.js +33 -6
  110. package/lib/components/nav-top/request.apis.js +22 -8
  111. package/lib/components/nav-top/useGlobalValue.js +14 -0
  112. package/lib/components/okr-detail/components/header/o-name.js +11 -4
  113. package/lib/components/okr-detail/components/header/o-score.js +4 -6
  114. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.css +26 -12
  115. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +11 -5
  116. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-project.js +20 -7
  117. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +3 -1
  118. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +27 -6
  119. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/index.css +29 -10
  120. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +1 -1
  121. package/lib/components/okr-detail/detail-header/actions.js +40 -44
  122. package/lib/components/okr-detail/detail-header/index.css +2 -2
  123. package/lib/components/okr-detail/detail-header/index.js +207 -195
  124. package/lib/components/okr-detail/e-list/index.js +70 -24
  125. package/lib/components/okr-detail/e-list/util.js +11 -2
  126. package/lib/components/okr-detail/index.js +4 -0
  127. package/lib/components/okr-detail/okr-list/index.js +1 -5
  128. package/lib/components/okr-flow/export-modal/index.js +3 -3
  129. package/lib/components/okr-flow/root-node/index.js +14 -1
  130. package/lib/components/okr-progress-detail/index.css +11 -10
  131. package/lib/components/okr-progress-detail/index.js +5 -1
  132. package/lib/components/okr-progress-detail/utils.js +4 -4
  133. package/lib/components/okr-progress-modal/helper.js +20 -27
  134. package/lib/components/okr-share/common-painter/openDataPainter.js +34 -27
  135. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +40 -36
  136. package/lib/components/open-data-painter/index.js +5 -1
  137. package/lib/components/progress/circle-progress/index.js +1 -1
  138. package/lib/components/rich-editor/basic/schema.js +47 -0
  139. package/lib/components/rich-editor/consts/events.js +12 -0
  140. package/lib/components/rich-editor/enums.js +42 -0
  141. package/lib/components/rich-editor/index.js +58 -0
  142. package/lib/components/rich-editor/keymap.js +119 -0
  143. package/lib/components/rich-editor/keymaps/index.js +241 -0
  144. package/lib/components/rich-editor/models/controller.js +18 -0
  145. package/lib/components/rich-editor/models/editor.js +47 -0
  146. package/lib/components/rich-editor/models/plugin.js +20 -0
  147. package/lib/components/rich-editor/models/schema.js +121 -0
  148. package/lib/components/rich-editor/plugins/block/block-quote/commond.js +27 -0
  149. package/lib/components/rich-editor/plugins/block/block-quote/index.js +128 -0
  150. package/lib/components/rich-editor/plugins/block/heading/commonds.js +31 -0
  151. package/lib/components/rich-editor/plugins/block/heading/index.js +190 -0
  152. package/lib/components/rich-editor/plugins/block/index.js +57 -0
  153. package/lib/components/rich-editor/plugins/block/lists/actions/conversions.js +172 -0
  154. package/lib/components/rich-editor/plugins/block/lists/actions/indent-list-items-selected.js +163 -0
  155. package/lib/components/rich-editor/plugins/block/lists/actions/indent-list.js +59 -0
  156. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-forward.js +74 -0
  157. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/index.js +45 -0
  158. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +104 -0
  159. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +92 -0
  160. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +89 -0
  161. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-paragraph-with-list.js +48 -0
  162. package/lib/components/rich-editor/plugins/block/lists/actions/join-list-items-scenarios/join-sibling-list-items.js +61 -0
  163. package/lib/components/rich-editor/plugins/block/lists/actions/merge-lists.js +34 -0
  164. package/lib/components/rich-editor/plugins/block/lists/actions/outdent-list-items-selected.js +289 -0
  165. package/lib/components/rich-editor/plugins/block/lists/actions/wrap-and-join-lists.js +180 -0
  166. package/lib/components/rich-editor/plugins/block/lists/baseCommand.js +328 -0
  167. package/lib/components/rich-editor/plugins/block/lists/commond/indent-list.js +60 -0
  168. package/lib/components/rich-editor/plugins/block/lists/commond/index.js +396 -0
  169. package/lib/components/rich-editor/plugins/block/lists/commond/join-list-item-forward.js +45 -0
  170. package/lib/components/rich-editor/plugins/block/lists/commond/listBackspace.js +302 -0
  171. package/lib/components/rich-editor/plugins/block/lists/commond/outdent-list.js +43 -0
  172. package/lib/components/rich-editor/plugins/block/lists/index.js +224 -0
  173. package/lib/components/rich-editor/plugins/block/lists/messages.js +38 -0
  174. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/input-rule.js +152 -0
  175. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/keymap.js +33 -0
  176. package/lib/components/rich-editor/plugins/block/lists/pm-plugins/main.js +94 -0
  177. package/lib/components/rich-editor/plugins/block/lists/styles.js +15 -0
  178. package/lib/components/rich-editor/plugins/block/lists/transforms.js +347 -0
  179. package/lib/components/rich-editor/plugins/block/lists/utils/analytics.js +48 -0
  180. package/lib/components/rich-editor/plugins/block/lists/utils/find.js +126 -0
  181. package/lib/components/rich-editor/plugins/block/lists/utils/indentation.js +87 -0
  182. package/lib/components/rich-editor/plugins/block/lists/utils/node.js +144 -0
  183. package/lib/components/rich-editor/plugins/block/lists/utils/replace-content.js +31 -0
  184. package/lib/components/rich-editor/plugins/block/lists/utils/selection.js +201 -0
  185. package/lib/components/rich-editor/plugins/block/lists/utils.js +52 -0
  186. package/lib/components/rich-editor/plugins/block/paragraph/index.js +91 -0
  187. package/lib/components/rich-editor/plugins/core/index.js +90 -0
  188. package/lib/components/rich-editor/plugins/core/pm-plugins/focus-handler.js +67 -0
  189. package/lib/components/rich-editor/plugins/core/pm-plugins/keymap.js +29 -0
  190. package/lib/components/rich-editor/plugins/core/pm-plugins/reactNodeView.js +80 -0
  191. package/lib/components/rich-editor/plugins/extension/alignment/commond.js +24 -0
  192. package/lib/components/rich-editor/plugins/extension/alignment/index.js +113 -0
  193. package/lib/components/rich-editor/plugins/extension/alignment/utils.js +19 -0
  194. package/lib/components/rich-editor/plugins/extension/index.js +18 -0
  195. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +126 -0
  196. package/lib/components/rich-editor/plugins/extension/placeholder/styles.js +19 -0
  197. package/lib/components/rich-editor/plugins/index.js +44 -0
  198. package/lib/components/rich-editor/plugins/inline/color/commond.js +128 -0
  199. package/lib/components/rich-editor/plugins/inline/color/consts.js +43 -0
  200. package/lib/components/rich-editor/plugins/inline/color/index.css +61 -0
  201. package/lib/components/rich-editor/plugins/inline/color/index.js +217 -0
  202. package/lib/components/rich-editor/plugins/inline/color/selector.js +252 -0
  203. package/lib/components/rich-editor/plugins/inline/color/util.js +25 -0
  204. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +149 -0
  205. package/lib/components/rich-editor/plugins/inline/em/index.js +93 -0
  206. package/lib/components/rich-editor/plugins/inline/index.js +83 -0
  207. package/lib/components/rich-editor/plugins/inline/link/commands.js +256 -0
  208. package/lib/components/rich-editor/plugins/inline/link/index.js +149 -0
  209. package/lib/components/rich-editor/plugins/inline/link/pm-plugins/fake-cursor-for-toolbar.js +77 -0
  210. package/lib/components/rich-editor/plugins/inline/link/pm-plugins/main.js +293 -0
  211. package/lib/components/rich-editor/plugins/inline/link/ui/index.css +84 -0
  212. package/lib/components/rich-editor/plugins/inline/link/ui/linkEditor.js +150 -0
  213. package/lib/components/rich-editor/plugins/inline/link/ui/linkToolbar.js +101 -0
  214. package/lib/components/rich-editor/plugins/inline/link/ui/toolbarBtn.js +117 -0
  215. package/lib/components/rich-editor/plugins/inline/link/utils.js +33 -0
  216. package/lib/components/rich-editor/plugins/inline/strong/index.js +139 -0
  217. package/lib/components/rich-editor/plugins/inline/under-line/index.js +147 -0
  218. package/lib/components/rich-editor/plugins/util.js +284 -0
  219. package/lib/components/rich-editor/react/reactNodeView.js +383 -0
  220. package/lib/components/rich-editor/react/uiProvider.js +185 -0
  221. package/lib/components/rich-editor/schemas/basic.js +309 -0
  222. package/lib/components/rich-editor/schemas/index.js +19 -0
  223. package/lib/components/rich-editor/schemas/list.js +342 -0
  224. package/lib/components/rich-editor/types/commond.js +5 -0
  225. package/lib/components/rich-editor/types/index.js +18 -0
  226. package/lib/components/rich-editor/ui/Popup/index.js +247 -0
  227. package/lib/components/rich-editor/ui/Popup/utils.js +399 -0
  228. package/lib/components/rich-editor/ui/editor/index.css +178 -0
  229. package/lib/components/rich-editor/ui/editor/index.js +153 -0
  230. package/lib/components/rich-editor/ui/normal-toolbar/index.css +34 -0
  231. package/lib/components/rich-editor/ui/normal-toolbar/index.js +109 -0
  232. package/lib/components/rich-editor/utils/browser.js +35 -0
  233. package/lib/components/rich-editor/utils/commands.js +266 -0
  234. package/lib/components/rich-editor/utils/document.js +211 -0
  235. package/lib/components/rich-editor/utils/event.js +79 -0
  236. package/lib/components/rich-editor/utils/helpers.js +16 -0
  237. package/lib/components/rich-editor/utils/mark.js +168 -0
  238. package/lib/components/rich-editor/utils/slice.js +85 -0
  239. package/lib/components/rich-editor/utils/toolbar.js +228 -0
  240. package/lib/components/scrollbar/index.js +67 -9
  241. package/lib/components/scrollbar/scroll-mask/index.css +29 -0
  242. package/lib/components/scrollbar/scroll-mask/index.js +152 -0
  243. package/lib/components/superset-charts/components/chart/index.js +54 -0
  244. package/lib/components/superset-charts/fetch-assets-and-append/append-assets.js +106 -0
  245. package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +142 -0
  246. package/lib/components/superset-charts/fetch-assets-and-append/index.js +79 -0
  247. package/lib/components/superset-charts/index.js +13 -0
  248. package/lib/components/superset-charts/interface.js +5 -0
  249. package/lib/components/superset-charts/utils/axios.js +102 -0
  250. package/lib/components/toast/index.js +5 -17
  251. package/lib/components/tree/index.css +3 -2
  252. package/lib/components/upload/index.js +4 -2
  253. package/lib/components/upload/util.js +2 -0
  254. package/lib/components/upload-photo-modal/request-api.js +1 -17
  255. package/lib/components/user-selector/empty/index.css +6 -6
  256. package/lib/components/user-selector/selected-panel/index.css +3 -3
  257. package/lib/components/{float-fixed-video-modal → video-modal/components/video-box}/index.css +118 -121
  258. package/lib/components/{float-fixed-video-modal → video-modal/components/video-box}/index.js +182 -182
  259. package/lib/components/{float-fixed-video-modal → video-modal}/img/close.png +0 -0
  260. package/lib/components/{float-fixed-video-modal → video-modal}/img/full.svg +0 -0
  261. package/lib/components/video-modal/img/muted.svg +8 -10
  262. package/lib/components/video-modal/img/not-muted.svg +17 -11
  263. package/lib/components/video-modal/img/pause.svg +7 -11
  264. package/lib/components/video-modal/img/play.svg +13 -11
  265. package/lib/components/video-modal/index.css +38 -168
  266. package/lib/components/video-modal/index.js +104 -244
  267. package/lib/components/video-modal/utils.js +2 -2
  268. package/lib/components/wechat-btn/index.css +10 -0
  269. package/lib/components/wechat-btn/index.js +232 -0
  270. package/lib/components/weekly-report/common-painter/openDataPainter.js +5 -1
  271. package/lib/hooks/useGlobalState.js +63 -0
  272. package/lib/index.js +39 -7
  273. package/lib/pages/aha2021/img/canceled.svg +13 -0
  274. package/lib/pages/aha2021/img/not-try.png +0 -0
  275. package/lib/pages/aha2021/img/try.png +0 -0
  276. package/lib/pages/aha2021/index.css +52 -0
  277. package/lib/pages/aha2021/index.js +73 -14
  278. package/lib/pages/group-management/tree/group-form/index.js +1 -1
  279. package/lib/pages/new-okr-list/header/index.js +2 -1
  280. package/lib/pages/new-okr-list/index.js +10 -13
  281. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -5
  282. package/lib/pages/pay/image/success.png +0 -0
  283. package/lib/pages/pay/index.css +79 -0
  284. package/lib/pages/pay/index.js +66 -0
  285. package/lib/pages/personal-info/request-api.js +1 -1
  286. package/lib/utils/auth.js +15 -5
  287. package/lib/utils/bs-global.js +8 -8
  288. package/lib/utils/helpers.js +7 -1
  289. package/lib/utils/open-data.js +82 -2
  290. package/package.json +121 -101
  291. package/lib/components/float-fixed-video-modal/img/muted.svg +0 -21
  292. package/lib/components/float-fixed-video-modal/img/pause.svg +0 -21
  293. package/lib/components/float-fixed-video-modal/img/play.svg +0 -22
  294. package/lib/components/float-fixed-video-modal/img/small.svg +0 -22
  295. package/lib/components/float-fixed-video-modal/img/smallFaQi.png +0 -0
  296. package/lib/components/float-fixed-video-modal/img/volume.svg +0 -21
  297. package/lib/components/float-fixed-video-modal/utils.js +0 -25
  298. package/lib/components/invite-people/img/invite-people.png +0 -0
  299. package/lib/components/video-modal/img/play.png +0 -0
@@ -19,6 +19,10 @@ var _clickLink = _interopRequireWildcard(require("../util/click-link"));
19
19
 
20
20
  var _getLocale = require("../../../utils/getLocale");
21
21
 
22
+ var _OKRprogressEmpty = _interopRequireDefault(require("../image/OKRprogress-empty.png"));
23
+
24
+ var _Progress = _interopRequireDefault(require("../image/Progress.png"));
25
+
22
26
  require("../index.css");
23
27
 
24
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -27,8 +31,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
27
31
 
28
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
33
 
30
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
31
-
32
34
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
33
35
 
34
36
  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."); }
@@ -71,38 +73,26 @@ function OKRProgressComponent() {
71
73
 
72
74
  (0, _react.useEffect)(function () {
73
75
  (0, _network["default"])(ComponentId).then(function (res) {
74
- var _iterator = _createForOfIteratorHelper(res),
75
- _step;
76
-
77
- try {
78
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
79
- var item = _step.value;
80
-
81
- switch (item.componentDataProp) {
82
- case "allMyProgressCount":
83
- setHadUpdateOkrNum(item.componentDataCount);
84
- break;
76
+ Object.values(res).forEach(function (item) {
77
+ if (item.componentDataProp === "allMyProgressCount") {
78
+ setHadUpdateOkrNum(item.componentDataCount);
79
+ }
85
80
 
86
- case "allMyNoProgressCount":
87
- setHadNotUpdateOkrNum(item.componentDataCount);
88
- break;
81
+ if (item.componentDataProp === "allMyNoProgressCount") {
82
+ setHadNotUpdateOkrNum(item.componentDataCount);
83
+ }
89
84
 
90
- case "weekLatelyUpdatekrProgress":
91
- setWeekLatelyUpdatekrProgress(item.componentDataCount);
92
- }
85
+ if (item.componentDataProp === "weekLatelyUpdatekrProgress") {
86
+ setWeekLatelyUpdatekrProgress(item.componentDataCount);
93
87
  }
94
- } catch (err) {
95
- _iterator.e(err);
96
- } finally {
97
- _iterator.f();
98
- }
88
+ });
99
89
  });
100
90
  }, []);
101
91
  (0, _react.useEffect)(function () {
102
92
  if (hadUpdateOkrNum + hadNotUpdateOkrNum === 0) {
103
- !isMyOKREmpty && setIsMyOKREmpty(true);
93
+ setIsMyOKREmpty(isMyOKREmpty);
104
94
  } else {
105
- isMyOKREmpty && setIsMyOKREmpty(false);
95
+ setIsMyOKREmpty(!isMyOKREmpty);
106
96
  setUpdatePercent(Number.parseFloat((hadUpdateOkrNum / (hadNotUpdateOkrNum + hadUpdateOkrNum)).toFixed(2)) * 100);
107
97
  }
108
98
  }, [hadUpdateOkrNum + hadNotUpdateOkrNum]);
@@ -119,16 +109,16 @@ function OKRProgressComponent() {
119
109
  padding: "20px 22px 0"
120
110
  }
121
111
  }, /*#__PURE__*/_react["default"].createElement(_commenComponents.CardTitle, {
122
- content: (0, _getLocale.getLocale)("HP_Executiotasks"),
123
- iconUrl: require("../image/Progress.png"),
112
+ content: (0, _getLocale.getLocale)("HP_KRProgress"),
113
+ iconUrl: _Progress["default"],
124
114
  tips: (0, _getLocale.getLocale)("HP_ProgressKROKR")
125
- }, !isMyOKREmpty && /*#__PURE__*/_react["default"].createElement("a", {
115
+ }, !isMyOKREmpty && /*#__PURE__*/_react["default"].createElement("span", {
126
116
  onClick: function onClick() {
127
117
  return (0, _clickLink["default"])("okr%2Fmanage");
128
118
  },
129
119
  className: "grid-component-card-title__behave"
130
120
  }, (0, _getLocale.getLocale)("OKR_OKRW_Gotoupdate"))), isMyOKREmpty ? /*#__PURE__*/_react["default"].createElement(_commenComponents.EmptyBackGround, {
131
- imgSrc: require("../image/OKRprogress-empty.png"),
121
+ imgSrc: _OKRprogressEmpty["default"],
132
122
  content: (0, _getLocale.getLocale)("HP_Regulgoodwork"),
133
123
  behave: {
134
124
  type: "moreinfo",
@@ -34,7 +34,7 @@
34
34
  height: 476px;
35
35
  border-radius: 24px;
36
36
  background: #ffffff;
37
- box-shadow: 0px 0px 16px 0px rgba(127, 145, 180, 0.1);
37
+ box-shadow: 0px 8px 24px 0px rgba(127, 145, 180, 0.16);
38
38
  }
39
39
 
40
40
  .help-card__header {
@@ -59,6 +59,35 @@
59
59
  border-radius: 50%;
60
60
  }
61
61
 
62
+ .help-card__wechat {
63
+ height: 330px;
64
+ display: flex;
65
+ flex-direction: column;
66
+ align-items: center;
67
+ justify-content: center;
68
+ }
69
+
70
+ .help-card__wechat-title {
71
+ font-size: 20px;
72
+ font-weight: normal;
73
+ color: #141c28;
74
+ line-height: 30px;
75
+ }
76
+
77
+ .help-card__wechat-content {
78
+ margin-top: 4px;
79
+ font-size: 14px;
80
+ font-weight: normal;
81
+ color: #6f7886;
82
+ line-height: 22px;
83
+ }
84
+
85
+ .help-card__wechat-img {
86
+ width: 200px;
87
+ height: 200px;
88
+ margin-top: 24px;
89
+ }
90
+
62
91
  .help-card__body {
63
92
  box-sizing: border-box;
64
93
  padding: 0 20px;
@@ -96,7 +125,7 @@
96
125
  }
97
126
 
98
127
  .help-card__body-item-title-left::before {
99
- content: "";
128
+ content: '';
100
129
  width: 81px;
101
130
  height: 7px;
102
131
  background: linear-gradient(90deg, #2879ff 0%, #f6f8fc 100%);
@@ -23,6 +23,8 @@ var _requestApi = require("./request-api");
23
23
 
24
24
  var _tooltip = _interopRequireDefault(require("../tooltip"));
25
25
 
26
+ var _conditionRender = _interopRequireDefault(require("../condition-render"));
27
+
26
28
  var _kefu = _interopRequireDefault(require("./image/kefu1.svg"));
27
29
 
28
30
  var _yuyueyanshi = _interopRequireDefault(require("./image/yuyueyanshi.svg"));
@@ -39,6 +41,12 @@ var _errorBoundary = _interopRequireDefault(require("../error-boundary"));
39
41
 
40
42
  var _errorLevel = _interopRequireDefault(require("../../utils/error-level"));
41
43
 
44
+ var _platform = require("../../utils/platform");
45
+
46
+ var _try = _interopRequireDefault(require("./image/try.png"));
47
+
48
+ var _notTry = _interopRequireDefault(require("./image/not-try.png"));
49
+
42
50
  require("./index.css");
43
51
 
44
52
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -62,6 +70,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
62
70
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
63
71
 
64
72
  var preCls = "help-card";
73
+ var isTry = (0, _bsGlobal.getVersion)() === 1;
74
+ var isDingding = (0, _platform.isDD)(true) === true;
75
+ var isFeis = (0, _platform.isFeishu)(true) === true;
65
76
 
66
77
  var HelpCard = function HelpCard(_ref) {
67
78
  var restProps = _extends({}, _ref);
@@ -71,25 +82,30 @@ var HelpCard = function HelpCard(_ref) {
71
82
  visible = _useState2[0],
72
83
  setVisible = _useState2[1];
73
84
 
74
- var _useState3 = (0, _react.useState)(1),
85
+ var _useState3 = (0, _react.useState)(false),
75
86
  _useState4 = _slicedToArray(_useState3, 2),
76
- pageNum = _useState4[0],
77
- setPageNum = _useState4[1];
87
+ weChatCodeVisible = _useState4[0],
88
+ setWeChatCodeVisible = _useState4[1];
78
89
 
79
- var _useState5 = (0, _react.useState)([]),
90
+ var _useState5 = (0, _react.useState)(1),
80
91
  _useState6 = _slicedToArray(_useState5, 2),
81
- guessList = _useState6[0],
82
- setGuessList = _useState6[1];
92
+ pageNum = _useState6[0],
93
+ setPageNum = _useState6[1];
83
94
 
84
95
  var _useState7 = (0, _react.useState)([]),
85
96
  _useState8 = _slicedToArray(_useState7, 2),
86
- recommendList = _useState8[0],
87
- setRecommendList = _useState8[1];
97
+ guessList = _useState8[0],
98
+ setGuessList = _useState8[1];
88
99
 
89
- var _useState9 = (0, _react.useState)(0),
100
+ var _useState9 = (0, _react.useState)([]),
90
101
  _useState10 = _slicedToArray(_useState9, 2),
91
- guessQuestionNum = _useState10[0],
92
- setGuessQuestionNum = _useState10[1];
102
+ recommendList = _useState10[0],
103
+ setRecommendList = _useState10[1];
104
+
105
+ var _useState11 = (0, _react.useState)(0),
106
+ _useState12 = _slicedToArray(_useState11, 2),
107
+ guessQuestionNum = _useState12[0],
108
+ setGuessQuestionNum = _useState12[1];
93
109
 
94
110
  var bookDemoRef = (0, _react.useRef)();
95
111
  var isTrial = (0, _bsGlobal.getVersion)() === 1;
@@ -129,6 +145,9 @@ var HelpCard = function HelpCard(_ref) {
129
145
 
130
146
  setGuessList(guessQuestion || []);
131
147
  });
148
+ setTimeout(function () {
149
+ setWeChatCodeVisible(!visible);
150
+ }, 100);
132
151
  }, [pageNum, visible]);
133
152
 
134
153
  var handlePoint = function handlePoint() {
@@ -178,9 +197,13 @@ var HelpCard = function HelpCard(_ref) {
178
197
  };
179
198
 
180
199
  var handleCustomerService = function handleCustomerService() {
181
- setVisible(false);
182
- window.open(kefuUrl);
183
- handleClickTracker("联系客服");
200
+ if (isDingding === true || isFeis === true) {
201
+ setVisible(false);
202
+ window.open(kefuUrl);
203
+ handleClickTracker("联系客服");
204
+ } else {
205
+ setWeChatCodeVisible(true);
206
+ }
184
207
  };
185
208
 
186
209
  var handleUpgrade = function handleUpgrade() {
@@ -198,7 +221,7 @@ var HelpCard = function HelpCard(_ref) {
198
221
  };
199
222
 
200
223
  var renderKefu = function renderKefu() {
201
- if ((0, _openData.isPlatform)("feishu") || (0, _openData.isPlatform)("dd") || (0, _openData.isWxTrial)()) return /*#__PURE__*/_react["default"].createElement("span", null);
224
+ if ((0, _openData.isPlatform)("feishu") || (0, _openData.isPlatform)("dd")) return /*#__PURE__*/_react["default"].createElement("span", null);
202
225
  return /*#__PURE__*/_react["default"].createElement("div", {
203
226
  className: "".concat(preCls, "__footer-item"),
204
227
  onClick: handleCustomerService
@@ -215,7 +238,9 @@ var HelpCard = function HelpCard(_ref) {
215
238
  className: "".concat(preCls, "__header")
216
239
  }, /*#__PURE__*/_react["default"].createElement("div", {
217
240
  className: "".concat(preCls, "__header-avatar")
218
- }), "Tita\u5C0F\u52A9\u624B"), /*#__PURE__*/_react["default"].createElement("div", {
241
+ }), "Tita\u5C0F\u52A9\u624B"), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
242
+ condition: weChatCodeVisible === false
243
+ }, /*#__PURE__*/_react["default"].createElement("div", {
219
244
  className: "".concat(preCls, "__body")
220
245
  }, /*#__PURE__*/_react["default"].createElement("div", {
221
246
  className: "".concat(preCls, "__body-item")
@@ -254,7 +279,19 @@ var HelpCard = function HelpCard(_ref) {
254
279
  },
255
280
  key: item.questionUrl + item.questionName
256
281
  }, item.questionName);
257
- })))), /*#__PURE__*/_react["default"].createElement("div", {
282
+ }))))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
283
+ condition: weChatCodeVisible === true
284
+ }, /*#__PURE__*/_react["default"].createElement("div", {
285
+ className: "".concat(preCls, "__wechat")
286
+ }, /*#__PURE__*/_react["default"].createElement("div", {
287
+ className: "".concat(preCls, "__wechat-title")
288
+ }, "\u5FAE\u4FE1/\u4F01\u4E1A\u5FAE\u4FE1\u626B\u4E00\u626B"), /*#__PURE__*/_react["default"].createElement("div", {
289
+ className: "".concat(preCls, "__wechat-content")
290
+ }, "\u4E13\u5C5E\u5BA2\u670D\u4E3A\u4F60\u63D0\u4F9B\u54A8\u8BE2\u670D\u52A1"), /*#__PURE__*/_react["default"].createElement("img", {
291
+ src: isTry ? _try["default"] : _notTry["default"],
292
+ className: "".concat(preCls, "__wechat-img"),
293
+ alt: "\u5FAE\u4FE1\u626B\u7801"
294
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
258
295
  className: "".concat(preCls, "__footer")
259
296
  }, isTrial && /*#__PURE__*/_react["default"].createElement("div", {
260
297
  className: "".concat(preCls, "__footer-item"),
@@ -0,0 +1,62 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="52px" height="52px" viewBox="0 0 52 52" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>编组 9</title>
4
+ <defs>
5
+ <linearGradient x1="50%" y1="3.061617e-15%" x2="50%" y2="100%" id="linearGradient-1">
6
+ <stop stop-color="#4E90FF" offset="0%"></stop>
7
+ <stop stop-color="#2879FF" offset="100%"></stop>
8
+ </linearGradient>
9
+ <circle id="path-2" cx="26" cy="26" r="26"></circle>
10
+ <filter x="-7.7%" y="-7.7%" width="115.4%" height="115.4%" filterUnits="objectBoundingBox" id="filter-3">
11
+ <feMorphology radius="2" operator="erode" in="SourceAlpha" result="shadowSpreadInner1"></feMorphology>
12
+ <feGaussianBlur stdDeviation="3" in="shadowSpreadInner1" result="shadowBlurInner1"></feGaussianBlur>
13
+ <feOffset dx="0" dy="0" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
14
+ <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
15
+ <feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
16
+ </filter>
17
+ <filter x="-66.7%" y="-67.8%" width="233.3%" height="235.6%" filterUnits="objectBoundingBox" id="filter-4">
18
+ <feOffset dx="0" dy="4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
19
+ <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
20
+ <feColorMatrix values="0 0 0 0 0.101003231 0 0 0 0 0.427065106 0 0 0 0 0.966476109 0 0 0 1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
21
+ <feMerge>
22
+ <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
23
+ <feMergeNode in="SourceGraphic"></feMergeNode>
24
+ </feMerge>
25
+ </filter>
26
+ <path d="M16.2408759,11.8636364 C17.6941571,11.8636364 18.9915571,12.4834063 19.8432958,13.4538491 L19.7727273,13.453125 L19.7727273,13.453125 C16.6096419,13.453125 14.0454545,16.0173123 14.0454545,19.1803977 C14.0454545,20.9550936 14.8526446,22.5412601 16.1199159,23.5917885 L4.6284008,23.5908352 L4.64499005,23.5908352 C2.07963288,23.5908352 0,21.6596367 0,19.2773827 L0,16.1770888 C0,13.9888024 1.75476468,12.1811102 4.02888228,11.9012462 C5.39814304,13.8696511 7.5432088,15.1363636 9.95454545,15.1363636 C12.3817457,15.1363636 14.53916,13.8529296 15.9070744,11.8635215 L16.2408759,11.8636364 Z M9.95454545,0 C13.3435655,0 16.0909091,3.05260398 16.0909091,6.81818182 C16.0909091,10.5837597 13.3435655,13.6363636 9.95454545,13.6363636 C6.5655254,13.6363636 3.81818182,10.5837597 3.81818182,6.81818182 C3.81818182,3.05260398 6.5655254,0 9.95454545,0 Z" id="path-5"></path>
27
+ <filter x="-7.6%" y="-6.4%" width="115.1%" height="112.7%" filterUnits="objectBoundingBox" id="filter-6">
28
+ <feGaussianBlur stdDeviation="1.5" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
29
+ <feOffset dx="0" dy="0" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
30
+ <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
31
+ <feColorMatrix values="0 0 0 0 0.156862745 0 0 0 0 0.474509804 0 0 0 0 1 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
32
+ </filter>
33
+ <circle id="path-7" cx="19.7727273" cy="19.1803977" r="4.22727273"></circle>
34
+ <filter x="-11.8%" y="-11.8%" width="123.7%" height="123.7%" filterUnits="objectBoundingBox" id="filter-8">
35
+ <feGaussianBlur stdDeviation="1" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
36
+ <feOffset dx="0" dy="0" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
37
+ <feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
38
+ <feColorMatrix values="0 0 0 0 0.156862745 0 0 0 0 0.474509804 0 0 0 0 1 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
39
+ </filter>
40
+ </defs>
41
+ <g id="动态" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
42
+ <g id="动态-版本二(一级导航变菜单栏)" transform="translate(-20.000000, -646.000000)">
43
+ <g id="编组-9" transform="translate(20.000000, 646.000000)">
44
+ <g id="椭圆形">
45
+ <use fill="url(#linearGradient-1)" fill-rule="evenodd" xlink:href="#path-2"></use>
46
+ <use fill="black" fill-opacity="1" filter="url(#filter-3)" xlink:href="#path-2"></use>
47
+ </g>
48
+ <g id="shitu备份" filter="url(#filter-4)" transform="translate(14.000000, 14.000000)">
49
+ <g id="形状结合">
50
+ <use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-5"></use>
51
+ <use fill="black" fill-opacity="1" filter="url(#filter-6)" xlink:href="#path-5"></use>
52
+ </g>
53
+ <g id="椭圆形">
54
+ <use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-7"></use>
55
+ <use fill="black" fill-opacity="1" filter="url(#filter-8)" xlink:href="#path-7"></use>
56
+ </g>
57
+ <path d="M19.8409091,16.5894886 C20.2080529,16.5894886 20.5056818,16.8871175 20.5056818,17.2542614 L20.5048182,18.5834886 L21.8352273,18.5838068 C22.2023711,18.5838068 22.5,18.8814357 22.5,19.2485795 C22.5,19.6157234 22.2023711,19.9133523 21.8352273,19.9133523 L20.5048182,19.9124886 L20.5056818,21.2428977 C20.5056818,21.6100416 20.2080529,21.9076705 19.8409091,21.9076705 C19.4737653,21.9076705 19.1761364,21.6100416 19.1761364,21.2428977 L19.1758182,19.9124886 L17.8465909,19.9133523 C17.4794471,19.9133523 17.1818182,19.6157234 17.1818182,19.2485795 C17.1818182,18.8814357 17.4794471,18.5838068 17.8465909,18.5838068 L19.1758182,18.5834886 L19.1761364,17.2542614 C19.1761364,16.8871175 19.4737653,16.5894886 19.8409091,16.5894886 Z" id="形状结合" fill="#2879FF"></path>
58
+ </g>
59
+ </g>
60
+ </g>
61
+ </g>
62
+ </svg>
@@ -1,7 +1,7 @@
1
1
  .titaui-invite-people {
2
2
  width: 42px;
3
3
  height: 42px;
4
- background: url("./img/invite-people.png") no-repeat;
4
+ background: url("./img/invite-people.svg") no-repeat;
5
5
  background-size: 42px;
6
6
  box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
7
7
  cursor: pointer;
@@ -169,17 +169,23 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
169
169
  };
170
170
 
171
171
  _this.handlerDealAttachemntData = function (uploadSuccessFilesPath) {
172
+ var _this$refs$textEditor2;
173
+
172
174
  var successFilesPath = uploadSuccessFilesPath.filter(function (item) {
173
175
  return item !== "";
174
176
  });
175
177
  var successFilesPathLen = successFilesPath.length; // @ts-ignore
176
178
 
177
- var textareaInput = _this.refs.textEditor.refs.textareaInput;
179
+ var _this$refs$textEditor = (_this$refs$textEditor2 = _this.refs.textEditor) === null || _this$refs$textEditor2 === void 0 ? void 0 : _this$refs$textEditor2.refs,
180
+ textareaInput = _this$refs$textEditor.textareaInput;
181
+
178
182
  var textareaValue = _this.state.textareaValue; // textareaValue = dealWithLoadedFileTips(textareaValue, successFilesPathLen); // 更新输入框内容
179
183
 
180
184
  localStorage.setItem(_this.state.localStroageKey, textareaValue); // 将输入框内容进行本地缓存
181
185
 
182
- textareaInput.focus();
186
+ if (textareaInput) {
187
+ textareaInput.focus();
188
+ }
183
189
 
184
190
  _this.setState({
185
191
  textareaValue: textareaValue,
@@ -192,9 +198,12 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
192
198
  _this.focus = function () {
193
199
  // @ts-ignore
194
200
  var textareaInput = _this.refs.textEditor.refs.textareaInput;
195
- setTimeout(function () {
196
- textareaInput.focus();
197
- }, 300);
201
+
202
+ if (textareaInput) {
203
+ setTimeout(function () {
204
+ textareaInput.focus();
205
+ }, 300);
206
+ }
198
207
  };
199
208
 
200
209
  _this.allowSubmit = function (content) {
@@ -64,7 +64,7 @@ var DemoMenus = function DemoMenus(props) {
64
64
  setExpandedKeys = _useState4[1];
65
65
 
66
66
  var _useState5 = (0, _react.useState)(function () {
67
- okrMenusData.current = new _menus["default"]();
67
+ okrMenusData.current = new _menus["default"](isManager);
68
68
  return okrMenusData.current.getMenus();
69
69
  }),
70
70
  _useState6 = _slicedToArray(_useState5, 2),
@@ -72,7 +72,7 @@ var DemoMenus = function DemoMenus(props) {
72
72
  setMenus = _useState6[1];
73
73
 
74
74
  (0, _react.useEffect)(function () {
75
- okrMenusData.current = new _menus["default"](isManager === 1);
75
+ okrMenusData.current = new _menus["default"](isManager);
76
76
  setMenus(okrMenusData.current.getMenus());
77
77
  setExpandedKeys(["demofree"]);
78
78
  }, [isManager]);
@@ -25,7 +25,7 @@ var _default = /*#__PURE__*/function () {
25
25
  _createClass(_default, [{
26
26
  key: "highlight",
27
27
  value: function highlight(cb) {
28
- if (this.isUnAssigned()) cb(_menus.PAGE_UNASSIGNED_DEMOFREE);else if (this.isAssigned()) cb(_menus.PAGE_ASSIGNED_DEMOFREE);else if (this.isReserved()) cb(_menus.PAGE_RESERVED_DEMOFREE);else if (this.isDone()) cb(_menus.PAGE_DONE_DEMOFREE);else if (this.isIgnore()) cb(_menus.PAGE_IGNORED_DEMOFREE);else if (this.isChart()) cb(_menus.PAGE_CHARTS_DEMOFREE);
28
+ if (this.isUnAssigned()) cb(_menus.PAGE_UNASSIGNED_DEMOFREE);else if (this.isAssigned()) cb(_menus.PAGE_ASSIGNED_DEMOFREE);else if (this.isReserved()) cb(_menus.PAGE_RESERVED_DEMOFREE);else if (this.isDone()) cb(_menus.PAGE_DONE_DEMOFREE);else if (this.isIgnore()) cb(_menus.PAGE_IGNORED_DEMOFREE);else if (this.isChart()) cb(_menus.PAGE_CHARTS_DEMOFREE);else if (this.isRechargeList()) cb(_menus.PAGE_RECHARGE_LIST);else if (this.isRechargeStatistics()) cb(_menus.PAGE_RECHARGE_STATISTICS);else if (this.isRechargeStatus()) cb(_menus.PAGE_RECHARGE_STATUS);else if (this.isDueDateOrder()) cb(_menus.PAGE_DUEDATE_ORDER);
29
29
  }
30
30
  }, {
31
31
  key: "isChart",
@@ -33,6 +33,30 @@ var _default = /*#__PURE__*/function () {
33
33
  var pathname = this.history.location.pathname;
34
34
  return pathname.match(/demofree\/charts/);
35
35
  }
36
+ }, {
37
+ key: "isRechargeStatus",
38
+ value: function isRechargeStatus() {
39
+ var pathname = this.history.location.pathname;
40
+ return pathname.match(/demofree\/recharge\/status/);
41
+ }
42
+ }, {
43
+ key: "isDueDateOrder",
44
+ value: function isDueDateOrder() {
45
+ var pathname = this.history.location.pathname;
46
+ return pathname.match(/demofree\/recharge\/order/);
47
+ }
48
+ }, {
49
+ key: "isRechargeList",
50
+ value: function isRechargeList() {
51
+ var pathname = this.history.location.pathname;
52
+ return pathname.match(/demofree\/recharge\/list/);
53
+ }
54
+ }, {
55
+ key: "isRechargeStatistics",
56
+ value: function isRechargeStatistics() {
57
+ var pathname = this.history.location.pathname;
58
+ return pathname.match(/demofree\/recharge\/statistics/);
59
+ }
36
60
  }, {
37
61
  key: "isUnAssigned",
38
62
  value: function isUnAssigned() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.defaultRefObject = exports["default"] = exports.PAGE_UNASSIGNED_DEMOFREE = exports.PAGE_RESERVED_DEMOFREE = exports.PAGE_IGNORED_DEMOFREE = exports.PAGE_DONE_DEMOFREE = exports.PAGE_CHARTS_DEMOFREE = exports.PAGE_ASSIGNED_DEMOFREE = void 0;
6
+ exports.defaultRefObject = exports["default"] = exports.PAGE_UNASSIGNED_DEMOFREE = exports.PAGE_RESERVED_DEMOFREE = exports.PAGE_RECHARGE_STATUS = exports.PAGE_RECHARGE_STATISTICS = exports.PAGE_RECHARGE_LIST = exports.PAGE_IGNORED_DEMOFREE = exports.PAGE_DUEDATE_ORDER = exports.PAGE_DONE_DEMOFREE = exports.PAGE_CHARTS_DEMOFREE = exports.PAGE_ASSIGNED_DEMOFREE = void 0;
7
7
 
8
8
  var _index = require("../../components/menu-tree/tree-node/index");
9
9
 
@@ -13,6 +13,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
13
13
 
14
14
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
15
15
 
16
+ var EManagerType;
17
+
18
+ (function (EManagerType) {
19
+ EManagerType[EManagerType["Sales"] = 0] = "Sales";
20
+ EManagerType[EManagerType["Manager"] = 1] = "Manager";
21
+ EManagerType[EManagerType["Supervisor"] = 2] = "Supervisor";
22
+ EManagerType[EManagerType["ReCharge"] = 3] = "ReCharge";
23
+ EManagerType[EManagerType["DemoFreeReadOnly"] = 4] = "DemoFreeReadOnly";
24
+ })(EManagerType || (EManagerType = {}));
25
+
16
26
  var defaultRefObject = {
17
27
  menus: [],
18
28
  getMenus: function getMenus() {}
@@ -30,11 +40,17 @@ var PAGE_IGNORED_DEMOFREE = "ignore";
30
40
  exports.PAGE_IGNORED_DEMOFREE = PAGE_IGNORED_DEMOFREE;
31
41
  var PAGE_CHARTS_DEMOFREE = "charts";
32
42
  exports.PAGE_CHARTS_DEMOFREE = PAGE_CHARTS_DEMOFREE;
43
+ var PAGE_RECHARGE_LIST = "rechargeList";
44
+ exports.PAGE_RECHARGE_LIST = PAGE_RECHARGE_LIST;
45
+ var PAGE_DUEDATE_ORDER = "dueDateOrder";
46
+ exports.PAGE_DUEDATE_ORDER = PAGE_DUEDATE_ORDER;
47
+ var PAGE_RECHARGE_STATISTICS = "rechargeStatistics";
48
+ exports.PAGE_RECHARGE_STATISTICS = PAGE_RECHARGE_STATISTICS;
49
+ var PAGE_RECHARGE_STATUS = "rechargeStatus";
50
+ exports.PAGE_RECHARGE_STATUS = PAGE_RECHARGE_STATUS;
33
51
 
34
52
  var DemoMenuData = /*#__PURE__*/function () {
35
- function DemoMenuData() {
36
- var isManager = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
37
-
53
+ function DemoMenuData(isManager) {
38
54
  _classCallCheck(this, DemoMenuData);
39
55
 
40
56
  this.isManager = isManager;
@@ -43,44 +59,77 @@ var DemoMenuData = /*#__PURE__*/function () {
43
59
  label: "任务状态",
44
60
  key: "demofree",
45
61
  href: this.isManager ? "#/demofree/list?selected=unassigned" : "#/demofree/list?selected=assigned",
46
- isShow: true,
62
+ isShow: this.isManager !== EManagerType.ReCharge,
47
63
  children: [{
48
64
  icon: "",
49
65
  label: "未分配",
50
66
  key: "unassigned",
51
67
  href: "#/demofree/list?selected=unassigned",
52
- isShow: this.isManager
68
+ isShow: this.isManager === EManagerType.Manager
53
69
  }, {
54
70
  icon: "",
55
71
  label: "已分配",
56
72
  key: "assigned",
57
73
  href: "#/demofree/list?selected=assigned",
58
- isShow: true
74
+ isShow: this.isManager !== EManagerType.ReCharge
59
75
  }, {
60
76
  icon: "",
61
77
  label: "已预约",
62
78
  key: "reserved",
63
79
  href: "#/demofree/list?selected=reserved",
64
- isShow: true
80
+ isShow: this.isManager !== EManagerType.ReCharge
65
81
  }, {
66
82
  icon: "",
67
83
  label: "已完成",
68
84
  key: "done",
69
85
  href: "#/demofree/list?selected=done",
70
- isShow: true
86
+ isShow: this.isManager !== EManagerType.ReCharge
71
87
  }, {
72
88
  icon: "",
73
89
  label: "已忽略",
74
90
  key: "ignore",
75
91
  href: "#/demofree/list?selected=ignore",
76
- isShow: this.isManager
92
+ isShow: this.isManager === EManagerType.Manager
77
93
  }]
94
+ }, {
95
+ icon: "KH-help",
96
+ label: "客户续费",
97
+ key: "recharge",
98
+ href: "#/demofree/recharge",
99
+ isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager,
100
+ children: [{
101
+ icon: "",
102
+ label: "客户",
103
+ key: PAGE_RECHARGE_LIST,
104
+ href: "#/demofree/recharge/list",
105
+ isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager
106
+ }, {
107
+ icon: "",
108
+ label: "到期订单",
109
+ key: PAGE_DUEDATE_ORDER,
110
+ href: "#/demofree/recharge/order",
111
+ isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager
112
+ } // {
113
+ // icon: "",
114
+ // label: "续费状态",
115
+ // key: PAGE_RECHARGE_STATUS,
116
+ // href: "#/demofree/recharge/status",
117
+ // isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager,
118
+ // },
119
+ // {
120
+ // icon: "",
121
+ // label: "数据统计",
122
+ // key: PAGE_RECHARGE_STATISTICS,
123
+ // href: "#/demofree/recharge/statistics",
124
+ // isShow: this.isManager === EManagerType.ReCharge || this.isManager === EManagerType.Manager,
125
+ // },
126
+ ]
78
127
  }, {
79
128
  icon: "KH-help",
80
129
  label: "预约演示报表",
81
130
  key: "charts",
82
131
  href: "#/demofree/charts",
83
- isShow: this.isManager,
132
+ isShow: this.isManager === EManagerType.Manager,
84
133
  children: [],
85
134
  type: _index.MENU_ITEM_NOE
86
135
  }];
@@ -8,7 +8,7 @@ exports.menus = void 0;
8
8
  var _i18n = require("../../i18n");
9
9
 
10
10
  var menus = [{
11
- icon: "okr",
11
+ icon: "enterprise",
12
12
  label: _i18n.locale.menu_regulation_enterprise,
13
13
  key: "enterprise",
14
14
  href: "",
@@ -0,0 +1,3 @@
1
+ .titaui-menus-tree__parent-menu-node-icon.enterprise {
2
+ background-image: url("../../images/okr-gongsi.svg");
3
+ }