@titaui/pc 1.11.4-1 → 1.11.4-2

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 (301) hide show
  1. package/lib/components/date-picker/BodyItem.js +3 -3
  2. package/lib/components/date-picker/CalendarHeader.js +3 -3
  3. package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
  4. package/lib/components/dynamic/constant.js +31 -30
  5. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +21 -6
  6. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +4 -4
  7. package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +19 -7
  8. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
  9. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
  10. package/{es/pages/group-management/page-view/loading → lib/components/dynamic/dynamic-item/dynamic-interview-share}/index.js +33 -11
  11. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
  12. package/lib/components/dynamic/dynamic-item/index.js +41 -32
  13. package/lib/components/eReport/eReportLists/reportList.js +3 -3
  14. package/lib/components/emotions-selector/selector-pop.js +3 -3
  15. package/lib/components/ereport-list/index.js +3 -3
  16. package/lib/components/mblog/components/MblogAction.js +3 -3
  17. package/lib/components/menus/export-modules/interview-menus/constant.js +12 -12
  18. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
  19. package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
  20. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
  21. package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
  22. package/lib/components/rich-editor/models/schema.js +6 -6
  23. package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
  24. package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
  25. package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
  26. package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
  27. package/lib/components/rich-editor/plugins/core/index.js +4 -4
  28. package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
  29. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
  30. package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
  31. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
  32. package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
  33. package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
  34. package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
  35. package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
  36. package/lib/components/rich-editor/react/uiProvider.js +3 -3
  37. package/lib/components/rich-editor/ui/Popup/index.js +3 -3
  38. package/lib/components/select/Option.js +3 -3
  39. package/lib/components/task-tree/helper.js +61 -0
  40. package/lib/components/task-tree/images/P1.svg +15 -0
  41. package/lib/components/task-tree/images/P2.svg +15 -0
  42. package/lib/components/task-tree/images/P3.svg +15 -0
  43. package/lib/components/task-tree/images/P4.svg +15 -0
  44. package/lib/components/task-tree/images/P5.svg +15 -0
  45. package/lib/components/task-tree/images/arrow.svg +9 -0
  46. package/lib/components/task-tree/images/empty-131.png +0 -0
  47. package/lib/components/task-tree/images/followed.svg +33 -0
  48. package/lib/components/task-tree/images/nice.svg +108 -0
  49. package/lib/components/task-tree/images/struc12.png +0 -0
  50. package/lib/components/task-tree/images/struc2.png +0 -0
  51. package/lib/components/task-tree/images/xialat-s.svg +13 -0
  52. package/lib/components/task-tree/index.js +27 -0
  53. package/lib/components/task-tree/mock.js +944 -0
  54. package/{es/components/okr-detail/components/okr-tree → lib/components/task-tree}/precls.js +1 -1
  55. package/lib/components/task-tree/request-apis.js +88 -0
  56. package/lib/components/task-tree/task-item-node/constant.js +45 -0
  57. package/{es/components/okr-detail/components/okr-tree/tree-node/default-node.js → lib/components/task-tree/task-item-node/e-empty.js} +13 -6
  58. package/{es/components/okr-detail/components/okr-tree/tree-node/e-node → lib/components/task-tree/task-item-node}/e-project.js +29 -34
  59. package/{es/components/e-status-dropdown/index.js → lib/components/task-tree/task-item-node/e-status-dropdown.js} +3 -3
  60. package/{es/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js → lib/components/task-tree/task-item-node/e-task.js} +140 -121
  61. package/{es/components/okr-detail/components/okr-tree/tree-node → lib/components/task-tree/task-item-node}/get-process-color.js +3 -3
  62. package/lib/components/task-tree/task-item-node/index.css +290 -0
  63. package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
  64. package/lib/components/task-tree/task-tree.css +8 -0
  65. package/{es/components/okr-detail/components/okr-tree/index.js → lib/components/task-tree/task-tree.js} +17 -16
  66. package/lib/components/tita-chart/errorBoundary/index.js +3 -3
  67. package/lib/components-v1/animate/AnimateChild.js +3 -3
  68. package/lib/components-v1/avatar/index.js +3 -3
  69. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
  70. package/lib/components-v1/progress/CircleProgress.js +3 -3
  71. package/lib/components-v1/select/Option.js +3 -3
  72. package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
  73. package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
  74. package/lib/components-v1/userSelector/components/UserItem.js +3 -3
  75. package/lib/index.js +8 -0
  76. package/package.json +1 -1
  77. package/yarn-error.log +6356 -5424
  78. package/es/components/cascader/time.js +0 -31
  79. package/es/components/common-share/request-apis.js +0 -56
  80. package/es/components/confidence/heart.js +0 -66
  81. package/es/components/create-okr-modal/fields/index.js +0 -17
  82. package/es/components/create-okr-modal/utils/getCreateOkrSurpassPercent.js +0 -154
  83. package/es/components/date-picker/BodyItem.js +0 -121
  84. package/es/components/date-picker/CalendarBody.js +0 -157
  85. package/es/components/date-picker/CalendarHeader.js +0 -187
  86. package/es/components/date-picker/index.js +0 -157
  87. package/es/components/date-range-picker/index.js +0 -210
  88. package/es/components/dialog/index.js +0 -119
  89. package/es/components/dialog-confirm/index.js +0 -154
  90. package/es/components/drop-selector/icon-item.js +0 -40
  91. package/es/components/drop-selector/index.js +0 -179
  92. package/es/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  93. package/es/components/dynamic/dynamic-liking/mock.js +0 -83
  94. package/es/components/dynamic/dynamic-topping/request-api.js +0 -36
  95. package/es/components/e-priority/index.js +0 -88
  96. package/es/components/grid-layout/commen-components/index.js +0 -73
  97. package/es/components/grid-layout/image/could.js +0 -8
  98. package/es/components/grid-layout/image/lv.js +0 -8
  99. package/es/components/grid-layout/image/tita-mask.js +0 -8
  100. package/es/components/help-card/request-api.js +0 -35
  101. package/es/components/icon-button-list/index.js +0 -65
  102. package/es/components/menus/context.js +0 -18
  103. package/es/components/menus/precls.js +0 -8
  104. package/es/components/okr-detail/auth.js +0 -197
  105. package/es/components/okr-detail/components/ao-nice/index.js +0 -245
  106. package/es/components/okr-detail/components/block-line/index.js +0 -20
  107. package/es/components/okr-detail/components/header/index.js +0 -211
  108. package/es/components/okr-detail/components/icon-text/index.js +0 -116
  109. package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +0 -88
  110. package/es/components/okr-detail/components/okr-tree/tree-node/e-node/e-status-dropdown.js +0 -98
  111. package/es/components/okr-detail/components/okr-tree/tree-node/index.js +0 -90
  112. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/get-process-color.js +0 -46
  113. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +0 -421
  114. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/index.js +0 -54
  115. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/style.js +0 -62
  116. package/es/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +0 -94
  117. package/es/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +0 -273
  118. package/es/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +0 -207
  119. package/es/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +0 -236
  120. package/es/components/okr-detail/components/padding-layout.js +0 -22
  121. package/es/components/okr-detail/components/tab-panel-content/index.js +0 -27
  122. package/es/components/okr-detail/context.js +0 -30
  123. package/es/components/okr-detail/e-list/index.js +0 -243
  124. package/es/components/okr-detail/e-list/precls.js +0 -8
  125. package/es/components/okr-detail/e-list/search-form/fields/e-order.js +0 -172
  126. package/es/components/okr-detail/e-list/search-form/fields/e-status.js +0 -99
  127. package/es/components/okr-detail/e-list/search-form/fields/e-user.js +0 -49
  128. package/es/components/okr-detail/e-list/search-form/index.js +0 -143
  129. package/es/components/okr-detail/error-page/index.js +0 -33
  130. package/es/components/okr-detail/index.js +0 -428
  131. package/es/components/okr-detail/loading/index.js +0 -28
  132. package/es/components/okr-detail/okr-list/add-parent-okr.js +0 -37
  133. package/es/components/okr-detail/okr-list/create-kr-item/heart.js +0 -38
  134. package/es/components/okr-detail/okr-list/drag-order-kr.js +0 -62
  135. package/es/components/okr-detail/okr-list/empty/index.js +0 -48
  136. package/es/components/okr-detail/okr-list/index.js +0 -524
  137. package/es/components/okr-detail/okr-list/warp-parent-okr.js +0 -21
  138. package/es/components/okr-detail/store.js +0 -1
  139. package/es/components/okr-flow/child-node/fields/creator.js +0 -175
  140. package/es/components/okr-flow/child-node/fields/okrClassify.js +0 -31
  141. package/es/components/okr-flow/child-node/fields/okrType.js +0 -21
  142. package/es/components/okr-flow/child-node/helper.js +0 -35
  143. package/es/components/okr-flow/child-node/index.js +0 -110
  144. package/es/components/okr-flow/child-node/kr-node.js +0 -75
  145. package/es/components/okr-flow/child-node/work-node.js +0 -242
  146. package/es/components/okr-flow/context.js +0 -14
  147. package/es/components/okr-flow/empty/index.js +0 -29
  148. package/es/components/okr-flow/export-modules/okr-search-panel/index.js +0 -394
  149. package/es/components/okr-flow/index.js +0 -24
  150. package/es/components/okr-flow/mini-map/index.js +0 -112
  151. package/es/components/okr-flow/mini-map/map.js +0 -145
  152. package/es/components/okr-flow/mini-map/mini-node.js +0 -57
  153. package/es/components/okr-flow/mini-map/utils.js +0 -79
  154. package/es/components/okr-flow/okr-map/index.js +0 -192
  155. package/es/components/okr-flow/open-data/index.js +0 -115
  156. package/es/components/okr-flow/precls.js +0 -8
  157. package/es/components/okr-flow/request-apis.js +0 -118
  158. package/es/components/okr-flow/root-node/index.js +0 -229
  159. package/es/components/okr-flow/utils/config.js +0 -18
  160. package/es/components/okr-flow/utils/helper.js +0 -36
  161. package/es/components/okr-flow/utils/index.js +0 -66
  162. package/es/components/okr-flow/utils/tree-handler.js +0 -323
  163. package/es/components/okr-progress-modal/helper.js +0 -156
  164. package/es/components/okr-progress-modal/request-apis.js +0 -34
  165. package/es/components/okr-share/request-apis.js +0 -56
  166. package/es/components/okrcase-library/server/network.js +0 -407
  167. package/es/components/pagination/locale/en_US.js +0 -22
  168. package/es/components/pagination/locale/zh_CN.js +0 -22
  169. package/es/components/point-demo/drop-down-box/index.js +0 -159
  170. package/es/components/point-demo/index.js +0 -533
  171. package/es/components/point-demo/input/index.js +0 -176
  172. package/es/components/point-demo/point-demo.js +0 -75
  173. package/es/components/point-demo/popup/index.js +0 -113
  174. package/es/components/point-demo/popup/placement.js +0 -44
  175. package/es/components/range-picker-pop/index.js +0 -273
  176. package/es/components/scrollbar/simplebar/helpers.js +0 -59
  177. package/es/components/scrollbar/simplebar/index.js +0 -91
  178. package/es/components/scrollbar/simplebar/scrollbar-width.js +0 -47
  179. package/es/components/scrollbar/simplebar/simplebar.js +0 -852
  180. package/es/components/scrollbar/simplebar-react.js +0 -163
  181. package/es/components/search-dropdown/index.js +0 -40
  182. package/es/components/search-input/index.js +0 -126
  183. package/es/components/select/Option.js +0 -94
  184. package/es/components/select/index.js +0 -330
  185. package/es/components/selector-input/debounce.js +0 -36
  186. package/es/components/selector-input/index.js +0 -109
  187. package/es/components/slider-input/index.js +0 -119
  188. package/es/components/switch/index.js +0 -39
  189. package/es/components/table/index.js +0 -275
  190. package/es/components/tabs/index.js +0 -63
  191. package/es/components/task-relation-modal/tree-node/index.js +0 -58
  192. package/es/components/tita-chart/charts/img/could.js +0 -8
  193. package/es/components/tooltip/error-tip.js +0 -24
  194. package/es/components/tooltip/index.js +0 -21
  195. package/es/components/tree/index.js +0 -79
  196. package/es/components/tree/precls.js +0 -8
  197. package/es/components/upvote/request-apis.js +0 -45
  198. package/es/components/user-selector/action-btns/btn-cancel.js +0 -21
  199. package/es/components/user-selector/action-btns/btn-ok.js +0 -21
  200. package/es/components/user-selector/action-btns/index.js +0 -27
  201. package/es/components/user-selector/context.js +0 -18
  202. package/es/components/user-selector/empty/group.js +0 -55
  203. package/es/components/user-selector/empty/index.js +0 -28
  204. package/es/components/user-selector/export-modules/depart-search-selector/result-part.js +0 -41
  205. package/es/components/user-selector/export-modules/group-selector/index.js +0 -170
  206. package/es/components/user-selector/export-modules/group-selector/searched-panel.js +0 -68
  207. package/es/components/user-selector/export-modules/multiple-user-selector--bak/index.js +0 -246
  208. package/es/components/user-selector/index.js +0 -25
  209. package/es/components/user-selector/layout/index.js +0 -25
  210. package/es/components/user-selector/loading/index.js +0 -18
  211. package/es/components/user-selector/request-apis.js +0 -180
  212. package/es/components/user-selector/searched-panel/index.js +0 -139
  213. package/es/components/user-selector/searched-panel/result-part.js +0 -43
  214. package/es/components/user-selector/select-tree/selected-tree/index.js +0 -91
  215. package/es/components/user-selector/select-tree/tree-nodes/tree-depart-node/index.js +0 -48
  216. package/es/components/user-selector/select-tree/tree-nodes/tree-duties-node/index.js +0 -27
  217. package/es/components/user-selector/select-tree/tree-nodes/tree-group-node/index.js +0 -57
  218. package/es/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +0 -93
  219. package/es/components/user-selector/utils.js +0 -139
  220. package/es/components/viewer/ImageListRender.js +0 -143
  221. package/es/components/viewer/index.js +0 -168
  222. package/es/components/word-cloud/index.js +0 -109
  223. package/es/components/word-cloud/request-apis.js +0 -26
  224. package/es/components-v1/animate/AnimateChild.js +0 -76
  225. package/es/components-v1/animate/animate.js +0 -148
  226. package/es/components-v1/animate/index.js +0 -13
  227. package/es/components-v1/dom/index.js +0 -30
  228. package/es/components-v1/placement/index.js +0 -13
  229. package/es/components-v1/placement/placement.js +0 -111
  230. package/es/components-v1/placement/placementInner.js +0 -139
  231. package/es/components-v1/pop/Pop.js +0 -246
  232. package/es/components-v1/pop/PopInner.js +0 -163
  233. package/es/components-v1/pop/index.js +0 -13
  234. package/es/components-v1/progress/CircleProgress.js +0 -152
  235. package/es/components-v1/progress/LineProgress.js +0 -83
  236. package/es/components-v1/progress/index.js +0 -80
  237. package/es/components-v1/select/Option.js +0 -94
  238. package/es/components-v1/select/index.js +0 -330
  239. package/es/components-v1/utils/animate/animate.js +0 -103
  240. package/es/components-v1/utils/animate/event.js +0 -79
  241. package/es/components-v1/utils/dom/index.js +0 -30
  242. package/es/components-v1/utils/placement/autoAdjustPlacement.js +0 -93
  243. package/es/components-v1/utils/placement/getContainerVisibleArea.js +0 -22
  244. package/es/components-v1/utils/placement/getExpectPlacement.js +0 -49
  245. package/es/components-v1/utils/placement/getPlacementInContainer.js +0 -26
  246. package/es/components-v1/utils/placement/placement.js +0 -76
  247. package/es/index.js +0 -777
  248. package/es/pages/appointment-demo/drop-down-box/index.js +0 -159
  249. package/es/pages/appointment-demo/index.js +0 -649
  250. package/es/pages/appointment-demo/input/index.js +0 -176
  251. package/es/pages/appointment-demo/popup/index.js +0 -113
  252. package/es/pages/appointment-demo/popup/placement.js +0 -44
  253. package/es/pages/group-management/components/checkbox/index.js +0 -28
  254. package/es/pages/group-management/components/input-form/index.js +0 -174
  255. package/es/pages/group-management/components/radio/index.js +0 -21
  256. package/es/pages/group-management/components/table/index.js +0 -174
  257. package/es/pages/group-management/groupInterface.js +0 -293
  258. package/es/pages/group-management/index.js +0 -13
  259. package/es/pages/group-management/page-view/empty.js +0 -111
  260. package/es/pages/group-management/page-view/group-empty.js +0 -66
  261. package/es/pages/group-management/page-view/importGroupStaff/index.js +0 -208
  262. package/es/pages/group-management/page-view/index.js +0 -412
  263. package/es/pages/group-management/table/index.js +0 -104
  264. package/es/pages/group-management/tree/add-group-dialog/index.js +0 -153
  265. package/es/pages/group-management/tree/delete-group-dialog/index.js +0 -82
  266. package/es/pages/group-management/tree/edit-group-dialog/index.js +0 -155
  267. package/es/pages/group-management/tree/group-form/index.js +0 -207
  268. package/es/pages/group-management/tree/index.js +0 -168
  269. package/es/pages/group-management/tree/operation-panel.js +0 -41
  270. package/es/pages/group-management/tree/trigger-render.js +0 -99
  271. package/es/pages/like-ranking/mock.js +0 -366
  272. package/es/pages/okr-map/export-modules/index.js +0 -1
  273. package/es/pages/okr-map/export-modules/okr-map/header/index.js +0 -182
  274. package/es/pages/okr-map/export-modules/okr-map/header/show-kr-confirm.js +0 -47
  275. package/es/pages/okr-map/export-modules/okr-map/okr-map.js +0 -497
  276. package/es/pages/okr-map/export-modules/share-okr-page/header/index.js +0 -69
  277. package/es/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +0 -168
  278. package/es/pages/okr-map/hooks/useStorage.js +0 -96
  279. package/es/pages/okr-map/index.js +0 -18
  280. package/es/pages/okr-map/level2-search/depart.js +0 -53
  281. package/es/pages/okr-map/level2-search/group.js +0 -69
  282. package/es/pages/okr-map/level2-search/index.js +0 -51
  283. package/es/pages/okr-map/level2-search/level2-input.js +0 -46
  284. package/es/pages/okr-map/level2-search/user.js +0 -54
  285. package/es/pages/okr-map/no-okr/index.js +0 -24
  286. package/es/pages/okr-map/number-select/index.js +0 -81
  287. package/es/pages/okr-map/open-data/index.js +0 -115
  288. package/es/pages/okr-map/precls.js +0 -8
  289. package/es/pages/okr-map/request-apis.js +0 -76
  290. package/es/pages/okr-map/share-dialog/index.js +0 -122
  291. package/es/pages/okr-map/unsupport-ie/index.js +0 -83
  292. package/es/pages/okr-map/utils.js +0 -51
  293. package/es/utils/auth.js +0 -294
  294. package/es/utils/bs-global.js +0 -114
  295. package/es/utils/local-storage.js +0 -42
  296. package/es/utils/mblog.js +0 -33
  297. package/es/utils/mock-bsglobal.js +0 -1837
  298. package/es/utils/open-data.js +0 -341
  299. package/es/utils/request-v1.js +0 -115
  300. package/es/utils/request.js +0 -183
  301. package/es/utils/tools.js +0 -286
@@ -5,53 +5,49 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports["default"] = _default;
8
+ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
- var _toast = _interopRequireDefault(require("../../../../../toast"));
14
+ var _toast = _interopRequireDefault(require("../../toast"));
15
15
 
16
- var _eStatusDropdown = _interopRequireDefault(require("./e-status-dropdown"));
17
-
18
- var _avatar = _interopRequireDefault(require("../../../../../avatar"));
16
+ var _avatar = _interopRequireDefault(require("../../avatar"));
19
17
 
20
- var _precls = _interopRequireDefault(require("../../precls"));
18
+ var _progress = _interopRequireDefault(require("../../progress"));
21
19
 
22
- var _helpers = require("../../../../../../utils/helpers");
20
+ var _tooltip = _interopRequireDefault(require("../../tooltip"));
23
21
 
24
- var _requestApis = require("../../../../request-apis");
25
-
26
- var _constant = require("./constant");
22
+ var _statusTime = _interopRequireDefault(require("../../status-time"));
27
23
 
28
- var _statusTime = _interopRequireDefault(require("../../../../../status-time"));
24
+ var _drawerManager = _interopRequireDefault(require("../../drawer-manager"));
29
25
 
30
- var _dialogConfirm = _interopRequireWildcard(require("../../../../../dialog-confirm"));
26
+ var _ePriority = _interopRequireDefault(require("../../e-priority"));
31
27
 
32
- var _context2 = require("../../../../context");
28
+ var _dialogConfirm = _interopRequireWildcard(require("../../dialog-confirm"));
33
29
 
34
- var _progress = _interopRequireDefault(require("../../../../../progress"));
30
+ var _eStatusDropdown = _interopRequireDefault(require("./e-status-dropdown"));
35
31
 
36
- var _getProcessColor = _interopRequireDefault(require("../get-process-color"));
32
+ var _requestApis = require("../request-apis");
37
33
 
38
- var _auth = require("../../../../../../utils/auth");
34
+ var _constant = require("./constant");
39
35
 
40
- var _tooltip = _interopRequireDefault(require("../../../../../tooltip"));
36
+ var _getProcessColor = _interopRequireDefault(require("./get-process-color"));
41
37
 
42
- var _ePriority = _interopRequireDefault(require("../../../../../e-priority"));
38
+ var _getLocale = require("../../../utils/getLocale");
43
39
 
44
- var _tooltipText = _interopRequireDefault(require("../../../../../tooltip/tooltip-text"));
40
+ var _platform = require("../../../utils/platform");
45
41
 
46
- var _platform = require("../../../../../../utils/platform");
42
+ var _bsGlobal = require("../../../utils/bs-global");
47
43
 
48
- var _drawerManager = _interopRequireDefault(require("../../../../../drawer-manager"));
44
+ var _helpers = require("../../../utils/helpers");
49
45
 
50
- var _getLocale = require("../../../../../../utils/getLocale");
46
+ var _auth = require("../../../utils/auth");
51
47
 
52
- var _bsGlobal = require("../../../../../../utils/bs-global");
48
+ var _precls = _interopRequireDefault(require("../precls"));
53
49
 
54
- require("./index.scss");
50
+ require("./index.css");
55
51
 
56
52
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
57
53
 
@@ -81,77 +77,90 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
81
77
 
82
78
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
83
79
 
84
- function _default(props) {
80
+ var TooltipText = _tooltip["default"].Text; // status=3 已过期 status=2 已完成
81
+
82
+ function ETaskNode(props) {
85
83
  var _okrInfo$authority;
86
84
 
87
85
  var index = props.index,
88
86
  title = props.title,
89
87
  data = props.data,
90
- level = props.level,
91
- isLeaf = props.isLeaf,
92
- createUserId = props.createUserId,
93
- krUser = props.krUser;
94
-
95
- var _useState = (0, _react.useState)(data.principalUser || {}),
88
+ _props$createUserId = props.createUserId,
89
+ createUserId = _props$createUserId === void 0 ? {} : _props$createUserId,
90
+ _props$krUser = props.krUser,
91
+ krUser = _props$krUser === void 0 ? {} : _props$krUser,
92
+ _props$hasProgress = props.hasProgress,
93
+ hasProgress = _props$hasProgress === void 0 ? true : _props$hasProgress,
94
+ _props$hasRelation = props.hasRelation,
95
+ hasRelation = _props$hasRelation === void 0 ? true : _props$hasRelation,
96
+ _props$isPushScreen = props.isPushScreen,
97
+ isPushScreen = _props$isPushScreen === void 0 ? false : _props$isPushScreen,
98
+ _props$hasPrinciple = props.hasPrinciple,
99
+ hasPrinciple = _props$hasPrinciple === void 0 ? true : _props$hasPrinciple;
100
+
101
+ var _useState = (0, _react.useState)(false),
96
102
  _useState2 = _slicedToArray(_useState, 2),
97
- user = _useState2[0],
98
- setUser = _useState2[1];
103
+ unConnectVisible = _useState2[0],
104
+ setUnConnectVisible = _useState2[1];
99
105
 
100
- var _useState3 = (0, _react.useState)("".concat(data.priority)),
101
- _useState4 = _slicedToArray(_useState3, 2),
102
- priority = _useState4[0],
103
- setPriority = _useState4[1];
106
+ var _useState3 = (0, _react.useState)(data.progress),
107
+ _useState4 = _slicedToArray(_useState3, 1),
108
+ progress = _useState4[0];
104
109
 
105
- var _useState5 = (0, _react.useState)({
106
- deadLine: data.deadLine,
107
- isLongTerm: data.isLongTerm,
108
- status: data.status,
109
- riskLevel: data.riskLevel
110
- }),
110
+ var _useState5 = (0, _react.useState)(data.principalUser || {}),
111
111
  _useState6 = _slicedToArray(_useState5, 2),
112
- dateInfo = _useState6[0],
113
- setDateInfo = _useState6[1];
112
+ user = _useState6[0],
113
+ setUser = _useState6[1];
114
114
 
115
- var _useState7 = (0, _react.useState)(false),
115
+ var _useState7 = (0, _react.useState)(data.status === 2),
116
116
  _useState8 = _slicedToArray(_useState7, 2),
117
- unConnectVisible = _useState8[0],
118
- setUnConnectVisible = _useState8[1];
117
+ isGray = _useState8[0],
118
+ setIsGray = _useState8[1];
119
119
 
120
- var _useState9 = (0, _react.useState)(data.status === 2),
120
+ var _useState9 = (0, _react.useState)(data.status === 4),
121
121
  _useState10 = _slicedToArray(_useState9, 2),
122
- isGray = _useState10[0],
123
- setIsGray = _useState10[1];
122
+ isCancel = _useState10[0],
123
+ setIsCancel = _useState10[1];
124
124
 
125
- var _useState11 = (0, _react.useState)(data.status === 4),
125
+ var _useState11 = (0, _react.useState)("".concat(data.priority)),
126
126
  _useState12 = _slicedToArray(_useState11, 2),
127
- isCancel = _useState12[0],
128
- setIsCancel = _useState12[1];
127
+ priority = _useState12[0],
128
+ setPriority = _useState12[1];
129
129
 
130
- var _useContext = (0, _react.useContext)(_context2.CommonContext),
131
- okrInfo = _useContext.okrInfo;
132
-
133
- var _useContext2 = (0, _react.useContext)(_context2.EListContext),
134
- refreshEList = _useContext2.refreshEList;
130
+ var _useState13 = (0, _react.useState)({
131
+ deadLine: data.deadLine,
132
+ isLongTerm: data.isLongTerm,
133
+ status: data.status,
134
+ riskLevel: data.riskLevel
135
+ }),
136
+ _useState14 = _slicedToArray(_useState13, 2),
137
+ dataInfo = _useState14[0],
138
+ setDataInfo = _useState14[1];
135
139
 
136
- var _useState13 = (0, _react.useState)(function () {
140
+ var _useState15 = (0, _react.useState)(function () {
137
141
  return (0, _bsGlobal.getBSGlobal)("TaskAdvancedSetting").TaskFunctionSetting.TaskPriority;
138
142
  }),
139
- _useState14 = _slicedToArray(_useState13, 1),
140
- isShowPriority = _useState14[0];
143
+ _useState16 = _slicedToArray(_useState15, 1),
144
+ isShowPriority = _useState16[0]; // const { okrInfo } = useContext(CommonContext);
145
+ // const { refreshEList } = useContext(EListContext);
141
146
 
142
- var hasAuth = (new _auth.EAuth({
147
+
148
+ var okrInfo = {};
149
+
150
+ var refreshEList = function refreshEList() {}; // extraEditAuth = new KRAuth({ user: krUser, createUserId }).hasAuth()
151
+ // || new OAuth({
152
+ // principalUser: okrInfo.principalUser,
153
+ // createUserId: okrInfo.createUserId,
154
+ // }).hasAuth()
155
+
156
+
157
+ var hasEditAuth = (new _auth.EAuth({
143
158
  principalUser: data.principalUser,
144
159
  user: data.user
145
- }).hasAuth() || new _auth.KRAuth({
146
- user: krUser,
147
- createUserId: createUserId
148
- }).hasAuth() || new _auth.OAuth({
149
- principalUser: okrInfo.principalUser,
150
- createUserId: okrInfo.createUserId
151
- }).hasAuth()) && data.status !== 5;
160
+ }).hasAuth() || extraEditAuth) && data.status !== 5;
152
161
  var isParticipant = ((_okrInfo$authority = okrInfo.authority) === null || _okrInfo$authority === void 0 ? void 0 : _okrInfo$authority.roleRelation) && okrInfo.authority.roleRelation.roleType === 2;
153
162
  var hasRelativeAuth = new _auth.KRAuth({
154
- user: data.user,
163
+ user: krUser,
155
164
  createUserId: createUserId
156
165
  }).hasAuth() || new _auth.OAuth({
157
166
  principalUser: okrInfo.principalUser,
@@ -163,8 +172,8 @@ function _default(props) {
163
172
  user = _ref2[0];
164
173
 
165
174
  (0, _requestApis.updateTaskPrincipal)({
166
- task_id: data.taskId,
167
- to_user_id: Number(user.id)
175
+ taskId: data.taskId,
176
+ toUserId: Number(user.id)
168
177
  }).then(function (data) {
169
178
  if (data.Code === 1) {
170
179
  setUser(user.data);
@@ -173,7 +182,7 @@ function _default(props) {
173
182
  canClose: false
174
183
  });
175
184
  } else {
176
- _toast["default"].Error(resp.Message, {
185
+ _toast["default"].Error(data.Message, {
177
186
  canClose: false
178
187
  });
179
188
  }
@@ -186,19 +195,19 @@ function _default(props) {
186
195
 
187
196
  var onEStatusChangeHandler = function onEStatusChangeHandler(statusType) {
188
197
  (0, _requestApis.updateTaskStatus)({
189
- task_id: data.taskId,
198
+ taskId: data.taskId,
190
199
  status: _constant.EStatusClass2StatusType[statusType]
191
200
  }).then(function (resp) {
192
201
  if (resp.Code === 1) {
193
- setDateInfo(_objectSpread(_objectSpread({}, dateInfo), {}, {
202
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
203
+ canClose: false
204
+ });
205
+
206
+ setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
194
207
  status: _constant.EStatusClass2StatusType[statusType]
195
208
  }));
196
209
  setIsGray(_constant.EStatusClass2StatusType[statusType] === 2);
197
210
  setIsCancel(_constant.EStatusClass2StatusType[statusType] === 4);
198
-
199
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
200
- canClose: false
201
- });
202
211
  } else {
203
212
  _toast["default"].Error(resp.Message, {
204
213
  canClose: false
@@ -236,14 +245,14 @@ function _default(props) {
236
245
  })["finally"](setUnConnectVisible(false));
237
246
  };
238
247
 
239
- var onEditDateHandler = (0, _react.useCallback)( /*#__PURE__*/function () {
248
+ var updateDateHandler = /*#__PURE__*/function () {
240
249
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(e) {
241
250
  var res;
242
251
  return regeneratorRuntime.wrap(function _callee$(_context) {
243
252
  while (1) {
244
253
  switch (_context.prev = _context.next) {
245
254
  case 0:
246
- if (hasAuth) {
255
+ if (!(!hasEditAuth || dataInfo.status === 2)) {
247
256
  _context.next = 2;
248
257
  break;
249
258
  }
@@ -255,8 +264,8 @@ function _default(props) {
255
264
  return window.openDatePicker(e.target, {
256
265
  isShowCycleView: false,
257
266
  rangepickerOptions: {
258
- startDate: data.startDate,
259
- endDate: data.deadLine
267
+ startDate: dataInfo.startDate,
268
+ endDate: dataInfo.deadLine
260
269
  }
261
270
  });
262
271
 
@@ -264,17 +273,17 @@ function _default(props) {
264
273
  res = _context.sent;
265
274
  _context.next = 7;
266
275
  return (0, _requestApis.updateTaskDate)({
267
- task_id: data.taskId,
276
+ taskId: data.taskId,
268
277
  startDate: res.startDate,
269
278
  endDate: res.endDate,
270
279
  isLongTerm: res.isLongTerm
271
280
  }).then(function (resp) {
272
281
  if (resp.Code === 1) {
273
- setDateInfo({
282
+ setDataInfo(_objectSpread(_objectSpread({}, dataInfo), {}, {
274
283
  deadLine: resp.Data.deadLine,
275
284
  isLongTerm: resp.Data.isLongTerm,
276
285
  status: resp.Data.status
277
- });
286
+ }));
278
287
 
279
288
  _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
280
289
  canClose: false
@@ -298,26 +307,22 @@ function _default(props) {
298
307
  }, _callee);
299
308
  }));
300
309
 
301
- return function (_x) {
310
+ return function updateDateHandler(_x) {
302
311
  return _ref3.apply(this, arguments);
303
312
  };
304
- }(), []);
313
+ }();
305
314
 
306
315
  var onEPriorityChangeHandler = function onEPriorityChangeHandler(selectPriority) {
307
316
  (0, _requestApis.setTaskPriority)({
308
- task_id: data.taskId,
317
+ taskId: data.taskId,
309
318
  priority: selectPriority
310
319
  }).then(function (resp) {
311
320
  if (resp.Code === 1) {
312
- _toast["default"].Success(resp.Message, {
313
- canClose: false
314
- });
321
+ _toast["default"].Success(resp.Message);
315
322
 
316
323
  setPriority(selectPriority);
317
324
  } else {
318
- _toast["default"].Error(resp.Message, {
319
- canClose: false
320
- });
325
+ _toast["default"].Error(resp.Message);
321
326
  }
322
327
  });
323
328
  };
@@ -327,63 +332,74 @@ function _default(props) {
327
332
  _drawerManager["default"].close();
328
333
  }
329
334
 
330
- window.open("https://".concat(location.host).concat(location.pathname, "#more/taskinfo?id=").concat(data.taskId));
335
+ if (isPushScreen) {
336
+ var _window$Talent, _window$Talent2;
337
+
338
+ (_window$Talent = window.Talent) === null || _window$Talent === void 0 ? void 0 : _window$Talent.app.vent.off("global-pull-screen:closed:".concat(data.taskId));
339
+ (_window$Talent2 = window.Talent) === null || _window$Talent2 === void 0 ? void 0 : _window$Talent2.app.vent.on("global-pull-screen:closed:".concat(data.taskId), function () {
340
+ refreshEList && refreshEList();
341
+ }); // 任务:打开推屏
342
+
343
+ window.Talent.app.vent.trigger("global-pull-screen", data.taskId, "task");
344
+ } else {
345
+ window.open("//".concat(window.location.host).concat(window.location.pathname, "#more/taskinfo?id=").concat(data.taskId));
346
+ }
331
347
  };
332
348
 
333
349
  return /*#__PURE__*/_react["default"].createElement("div", {
334
350
  key: index,
335
- className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-level2-node"))
351
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node"))
336
352
  }, /*#__PURE__*/_react["default"].createElement("span", {
337
- className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-level2-node-prefix"))
353
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-prefix"))
338
354
  }, /*#__PURE__*/_react["default"].createElement(_eStatusDropdown["default"], {
339
355
  onChange: onEStatusChangeHandler,
340
- checked: _constant.EStatusStatus2ClassType[dateInfo.status],
341
- hasAuth: hasAuth
356
+ checked: _constant.EStatusStatus2ClassType[dataInfo.status],
357
+ hasAuth: hasEditAuth
342
358
  })), isShowPriority && /*#__PURE__*/_react["default"].createElement("span", {
343
359
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority"))
344
360
  }, /*#__PURE__*/_react["default"].createElement(_ePriority["default"], {
345
361
  onChange: onEPriorityChangeHandler,
346
362
  checked: priority,
347
- hasAuth: hasAuth,
363
+ hasAuth: hasEditAuth,
348
364
  status: data.status
349
365
  })), /*#__PURE__*/_react["default"].createElement("span", {
350
- className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-level2-node-title ").concat(isCancel ? "".concat(_precls["default"], "__e-project-node-gray") : "")),
366
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-title ").concat(isCancel ? "".concat(_precls["default"], "__e-project-node-gray") : "")),
351
367
  onClick: handleShowTaskDetail
352
- }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
368
+ }, /*#__PURE__*/_react["default"].createElement(TooltipText, {
353
369
  text: (0, _helpers.escapeHtml)(title),
354
370
  isPercent: true
355
371
  })), /*#__PURE__*/_react["default"].createElement("span", {
356
- className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-level2-node-actions"))
357
- }, /*#__PURE__*/_react["default"].createElement("span", {
358
- className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-level2-node-actions-user"))
372
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions"))
373
+ }, hasPrinciple && /*#__PURE__*/_react["default"].createElement("span", {
374
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-user"))
359
375
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Text, {
360
376
  name: user === null || user === void 0 ? void 0 : user.name,
361
377
  id: user === null || user === void 0 ? void 0 : user.userId,
362
378
  width: 64,
363
- editable: hasAuth,
379
+ editable: dataInfo.status !== 2 && hasEditAuth,
364
380
  onEditUser: onEditUserHandler,
365
381
  isGetRoot: true,
366
382
  extraCls: (isCancel || isGray) && "".concat(_precls["default"], "__e-project-node-gray")
367
383
  })), /*#__PURE__*/_react["default"].createElement("span", {
368
- className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-level2-node-actions-date")),
369
- onClick: onEditDateHandler
384
+ className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-date")),
385
+ onClick: updateDateHandler
370
386
  }, /*#__PURE__*/_react["default"].createElement(_statusTime["default"], {
371
- deadLine: dateInfo.deadLine,
372
- isLongTerm: dateInfo.isLongTerm,
373
- isCancel: dateInfo.status === 4,
374
- isComplete: dateInfo.status === 2
375
- })), /*#__PURE__*/_react["default"].createElement("span", {
387
+ deadLine: dataInfo.deadLine,
388
+ isLongTerm: dataInfo.isLongTerm,
389
+ isCancel: dataInfo.status === 4,
390
+ isComplete: dataInfo.status === 2
391
+ })), hasProgress && /*#__PURE__*/_react["default"].createElement("span", {
376
392
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-actions-progress ").concat((isGray || isCancel) && "".concat(_precls["default"], "__e-project-node-gray")))
377
393
  }, /*#__PURE__*/_react["default"].createElement(_progress["default"].Circle, {
378
394
  size: 22,
379
395
  width: 3,
380
- percent: data.progress,
396
+ percent: progress,
381
397
  linear: true,
382
398
  linearId: data.taskId,
383
- linearStartColor: (0, _getProcessColor["default"])(dateInfo.riskLevel, "linearStartColor", dateInfo.status),
384
- linearEndColor: (0, _getProcessColor["default"])(dateInfo.riskLevel, "linearEndColor", dateInfo.status),
385
- backgroundColor: (0, _getProcessColor["default"])(dateInfo.riskLevel, "backgroundColor", dateInfo.status)
386
- })), okrInfo.status === 1 && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
399
+ linearStartColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearStartColor", dataInfo.status),
400
+ linearEndColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "linearEndColor", dataInfo.status),
401
+ backgroundColor: (0, _getProcessColor["default"])(dataInfo.riskLevel, "backgroundColor", dataInfo.status)
402
+ })), okrInfo.status === 1 && hasRelation && (hasRelativeAuth || isParticipant) ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
387
403
  overlay: (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel"),
388
404
  placement: "top"
389
405
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -409,4 +425,7 @@ function _default(props) {
409
425
  type: "button",
410
426
  onClick: onSureUnConnectHandler
411
427
  }, (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"))));
412
- }
428
+ }
429
+
430
+ var _default = ETaskNode;
431
+ exports["default"] = _default;
@@ -12,11 +12,11 @@ var getProcessColor = function getProcessColor(level, type, status) {
12
12
  backgroundColor: "rgba(40, 121, 255, 0.11)"
13
13
  };
14
14
 
15
- if (status == 2) {
15
+ if (status === 2) {
16
16
  return cancelColor[type];
17
17
  }
18
18
 
19
- if (status == 4) {
19
+ if (status === 4) {
20
20
  return cancelColor[type];
21
21
  }
22
22
 
@@ -53,7 +53,7 @@ var getProcessColor = function getProcessColor(level, type, status) {
53
53
  }
54
54
  };
55
55
  var color = processColor["".concat(level)];
56
- if (level == 0) color = processColor["1"];
56
+ if (level === 0) color = processColor["1"];
57
57
  if (!color) return {};
58
58
  return color[type];
59
59
  };