@titaui/pc 1.11.27-beta.8 → 1.11.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/lib/components/avatar/name-avatar/index.css +0 -1
  2. package/lib/components/avatar/name-avatar/index.js +13 -22
  3. package/lib/components/avatar/text-avatar/index.css +7 -0
  4. package/lib/components/avatar/text-avatar/index.js +32 -7
  5. package/lib/components/button/icon-btn/index.js +17 -8
  6. package/lib/components/button/rect-btn/index.css +11 -45
  7. package/lib/components/button/rect-btn/index.js +13 -19
  8. package/lib/components/change-okr-modal/Item.js +14 -14
  9. package/lib/components/change-okr-modal/index.js +1 -2
  10. package/lib/components/create-okr-modal/index.js +1 -3
  11. package/lib/components/create-okr-modal/request-api.js +1 -1
  12. package/lib/components/dialog-confirm/index.css +2 -2
  13. package/lib/components/drawer/headerAction.js +1 -5
  14. package/lib/components/drawer/headerDrop.js +4 -42
  15. package/lib/components/drawer/index.css +0 -33
  16. package/lib/components/drawer/index.js +3 -26
  17. package/lib/components/drop-selector/index.js +25 -10
  18. package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
  19. package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
  20. package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
  21. package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
  22. package/lib/components/dynamic/advertise/index.css +21 -0
  23. package/lib/components/dynamic/advertise/index.js +126 -0
  24. package/lib/components/dynamic/advertise/interface.js +5 -0
  25. package/lib/components/dynamic/advertise/util.js +28 -0
  26. package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
  27. package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
  28. package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
  29. package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
  30. package/lib/components/dynamic/constant.js +33 -32
  31. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
  32. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
  33. package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
  34. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
  35. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
  36. package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
  37. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
  38. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
  39. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
  40. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
  41. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
  42. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
  43. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
  44. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
  45. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
  46. package/lib/components/dynamic/dynamic-item/index.js +50 -32
  47. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
  48. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  49. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  50. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  51. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  52. package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
  53. package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
  54. package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
  55. package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
  56. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
  57. package/lib/components/dynamic/dynamic-liking/index.css +81 -0
  58. package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
  59. package/lib/components/dynamic/dynamic-liking/item.js +75 -0
  60. package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
  61. package/lib/components/dynamic/dynamic-list/index.js +7 -15
  62. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
  63. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
  64. package/lib/components/dynamic/dynamic-topping/index.css +141 -0
  65. package/lib/components/dynamic/dynamic-topping/index.js +82 -0
  66. package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
  67. package/lib/components/dynamic/dynamic-topping/item.js +153 -0
  68. package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
  69. package/lib/components/dynamic/dynamic.css +173 -0
  70. package/lib/components/dynamic/dynamic.js +428 -0
  71. package/lib/components/dynamic/export-module/index.js +37 -0
  72. package/lib/components/dynamic/img/dynamic-top.svg +14 -0
  73. package/lib/components/dynamic/index.js +12 -9
  74. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  75. package/lib/components/dynamic/my-team/img/line.png +0 -0
  76. package/lib/components/dynamic/my-team/img/team.png +0 -0
  77. package/lib/components/dynamic/my-team/index.css +184 -0
  78. package/lib/components/dynamic/my-team/index.js +263 -0
  79. package/lib/components/dynamic/my-team/request-api.js +52 -0
  80. package/lib/components/dynamic/my-team/util.js +20 -0
  81. package/lib/components/dynamic/new-ui.css +192 -0
  82. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
  83. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
  84. package/lib/components/dynamic/online-broadcast/data.js +77 -0
  85. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
  86. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  87. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  88. package/lib/components/dynamic/online-broadcast/index.css +46 -0
  89. package/lib/components/dynamic/online-broadcast/index.js +61 -0
  90. package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
  91. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
  92. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
  93. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
  94. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
  95. package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
  96. package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
  97. package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
  98. package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
  99. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  100. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  101. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  102. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  103. package/lib/components/dynamic/quick-operation/index.css +51 -0
  104. package/lib/components/dynamic/quick-operation/index.js +120 -0
  105. package/lib/components/dynamic/request-api.js +68 -7
  106. package/lib/components/e-priority/index.js +8 -8
  107. package/lib/components/eReport/eReportShare/index.js +11 -11
  108. package/lib/components/form/form-fields/date/index.css +24 -0
  109. package/lib/components/form/form-fields/date/index.js +102 -0
  110. package/lib/components/form/form-fields/input/index.js +10 -10
  111. package/lib/components/form/form-fields/user/index.css +23 -3
  112. package/lib/components/form/form-fields/user/index.js +18 -8
  113. package/lib/components/form/form-fields/user/user-input.js +15 -6
  114. package/lib/components/form/index.js +10 -3
  115. package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
  116. package/lib/components/icon-button-list/index.js +3 -3
  117. package/lib/components/img-viewer/index.css +3 -3
  118. package/lib/components/img-viewer/index.js +11 -11
  119. package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
  120. package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
  121. package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
  122. package/lib/components/menus/components/menu-tree/index.css +4 -2
  123. package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
  124. package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
  125. package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
  126. package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
  127. package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
  128. package/lib/components/menus/index.js +11 -5
  129. package/lib/components/nav-top/components/menu/index.js +14 -14
  130. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
  131. package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
  132. package/lib/components/nav-top/components/user-message/constant.js +1 -0
  133. package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
  134. package/lib/components/nav-top/components/user-message/index.js +23 -20
  135. package/lib/components/nav-top/index.js +4 -8
  136. package/lib/components/nav-top/request.apis.js +3 -1
  137. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
  138. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
  139. package/lib/components/okr-detail/components/header/index.js +3 -10
  140. package/lib/components/okr-detail/components/header/o-name.js +3 -10
  141. package/lib/components/okr-detail/components/o-classify.js +1 -5
  142. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
  143. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
  144. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
  145. package/lib/components/okr-detail/detail-header/actions.js +23 -23
  146. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
  147. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
  148. package/lib/components/okr-detail/detail-header/index.css +0 -11
  149. package/lib/components/okr-detail/detail-header/index.js +234 -228
  150. package/lib/components/okr-detail/index.js +21 -40
  151. package/lib/components/okr-detail/okr-list/index.js +8 -11
  152. package/lib/components/okr-detail/request-apis.js +4 -10
  153. package/lib/components/okr-flow/child-node/index.css +6 -6
  154. package/lib/components/okr-flow/child-node/work-node.js +21 -21
  155. package/lib/components/okr-flow/export-modal/index.js +33 -19
  156. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
  157. package/lib/components/okr-flow/okr-map/index.js +5 -5
  158. package/lib/components/okr-flow/request-apis.js +4 -4
  159. package/lib/components/okr-flow/root-node/index.js +25 -24
  160. package/lib/components/okr-flow/utils/index.js +5 -5
  161. package/lib/components/okr-flow/utils/tree-handler.js +17 -17
  162. package/lib/components/okr-period-selector/index.js +5 -9
  163. package/lib/components/okr-period-selector/select-cycle.js +19 -23
  164. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
  165. package/lib/components/operation-records/index.js +1 -1
  166. package/lib/components/operation-records/style.js +1 -1
  167. package/lib/components/pagination/index.css +3 -3
  168. package/lib/components/pagination/select.css +58 -23
  169. package/lib/components/period-selector/index.css +3 -3
  170. package/lib/components/period-selector/index.js +11 -11
  171. package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
  172. package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
  173. package/lib/components/picker/components/panels/date-panel/index.css +14 -0
  174. package/lib/components/picker/components/panels/date-panel/index.js +49 -0
  175. package/lib/components/picker/components/panels/month-panel/index.css +27 -0
  176. package/lib/components/picker/components/panels/month-panel/index.js +63 -0
  177. package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
  178. package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
  179. package/lib/components/picker/components/panels/panel-body/index.js +53 -0
  180. package/lib/components/picker/components/panels/panel-head/index.js +48 -0
  181. package/lib/components/picker/components/panels/year-panel/index.css +23 -0
  182. package/lib/components/picker/components/panels/year-panel/index.js +65 -0
  183. package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
  184. package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
  185. package/lib/components/picker/components/picker-trigger/index.css +57 -0
  186. package/lib/components/picker/components/picker-trigger/index.js +94 -0
  187. package/lib/components/picker/context.js +15 -0
  188. package/lib/components/picker/index.css +121 -0
  189. package/lib/components/picker/index.js +13 -0
  190. package/lib/components/picker/picker-panels.js +182 -0
  191. package/lib/components/picker/picker.js +132 -0
  192. package/lib/components/picker/type.js +5 -0
  193. package/lib/components/picker/utils.js +28 -0
  194. package/lib/components/popup/index.js +4 -4
  195. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
  196. package/lib/components/radio/index.css +9 -9
  197. package/lib/components/scrollbar/scroll-mask/index.js +1 -1
  198. package/lib/components/superset-charts/utils/axios.js +5 -5
  199. package/lib/components/survey-model/index.css +18 -18
  200. package/lib/components/survey-model/instance.js +1 -1
  201. package/lib/components/task-relation-modal/request-api.js +1 -2
  202. package/lib/components/task-tree/helper.js +61 -0
  203. package/lib/components/task-tree/images/P1.svg +15 -0
  204. package/lib/components/task-tree/images/P2.svg +15 -0
  205. package/lib/components/task-tree/images/P3.svg +15 -0
  206. package/lib/components/task-tree/images/P4.svg +15 -0
  207. package/lib/components/task-tree/images/P5.svg +15 -0
  208. package/lib/components/task-tree/images/arrow.svg +9 -0
  209. package/lib/components/task-tree/images/empty-131.png +0 -0
  210. package/lib/components/task-tree/images/followed.svg +33 -0
  211. package/lib/components/task-tree/images/nice.svg +108 -0
  212. package/lib/components/task-tree/images/struc12.png +0 -0
  213. package/lib/components/task-tree/images/struc2.png +0 -0
  214. package/lib/components/task-tree/images/xialat-s.svg +13 -0
  215. package/lib/components/task-tree/index.js +22 -0
  216. package/lib/components/task-tree/mock.js +944 -0
  217. package/lib/components/task-tree/precls.js +8 -0
  218. package/lib/components/task-tree/request-apis.js +88 -0
  219. package/lib/components/task-tree/task-item-node/constant.js +45 -0
  220. package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
  221. package/lib/components/task-tree/task-item-node/e-project.js +212 -0
  222. package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
  223. package/lib/components/task-tree/task-item-node/e-task.js +426 -0
  224. package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
  225. package/lib/components/task-tree/task-item-node/index.css +289 -0
  226. package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
  227. package/lib/components/task-tree/task-tree.css +16 -0
  228. package/lib/components/task-tree/task-tree.js +49 -0
  229. package/lib/components/time-picker/index.css +123 -0
  230. package/lib/components/time-picker/index.js +13 -0
  231. package/lib/components/time-picker/time-picker-selector.js +138 -0
  232. package/lib/components/time-picker/time-picker.js +336 -0
  233. package/lib/components/time-picker/timer-picker-input.js +96 -0
  234. package/lib/components/time-picker/utils.js +52 -0
  235. package/lib/components/toast/index.js +3 -5
  236. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
  237. package/lib/components-v1/radio/radio.js +3 -3
  238. package/lib/components-v1/radio/style/index.css +8 -8
  239. package/lib/index.js +0 -40
  240. package/lib/pages/aha2021/index.js +5 -1
  241. package/lib/pages/new-okr-list/header/index.css +0 -45
  242. package/lib/pages/new-okr-list/header/index.js +16 -38
  243. package/lib/pages/new-okr-list/index.js +1 -3
  244. package/lib/pages/new-okr-list/list/index.js +2 -19
  245. package/lib/pages/new-okr-list/request-api.js +2 -8
  246. package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
  247. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
  248. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
  249. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
  250. package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
  251. package/lib/pages/okr-map/number-select/index.js +2 -2
  252. package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
  253. package/lib/utils/auth.js +6 -6
  254. package/lib/utils/bs-global.js +12 -12
  255. package/lib/utils/format-time.js +1 -8
  256. package/lib/utils/hooks.js +72 -0
  257. package/lib/utils/open-data.js +27 -31
  258. package/package.json +6 -3
  259. package/.eslintignore +0 -3
  260. package/.eslintrc.js +0 -223
  261. package/.husky/pre-commit +0 -4
  262. package/.prettierignore +0 -31
  263. package/.prettierrc.js +0 -90
  264. package/.vscode/settings.json +0 -5
  265. package/lib/components/okr-detail/detail-header/constant.js +0 -53
  266. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
  267. package/lib/components/okr-detail/helper.js +0 -108
  268. package/lib/components/textarea/index.css +0 -142
  269. package/lib/components/textarea/index.js +0 -259
  270. package/lib/pages/new-okr-list/header/common.js +0 -52
@@ -0,0 +1,184 @@
1
+ .titaui-dynamic-my-team__container {
2
+ border-radius: 12px;
3
+ box-shadow: 0px 2px 12px 0px rgba(127, 145, 180, 0.2);
4
+ background: #ffffff;
5
+ padding-bottom: 12px;
6
+ margin-top: 10px;
7
+ width: 278px;
8
+ }
9
+
10
+ .titaui-dynamic-my-team__container .titaui-pc-avator-container {
11
+ display: inline-flex;
12
+ }
13
+
14
+ .titaui-dynamic-my-team__header {
15
+ display: flex;
16
+ align-items: center;
17
+ padding: 16px 16px 0 16px;
18
+ }
19
+
20
+ .titaui-dynamic-my-team__header-icon {
21
+ width: 20px;
22
+ height: 20px;
23
+ margin-right: 4px;
24
+ border-radius: 50%;
25
+ background: #2879ff;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ }
30
+
31
+ .titaui-dynamic-my-team__header-icon-img {
32
+ width: 16px;
33
+ height: 16px;
34
+ }
35
+
36
+ .titaui-dynamic-my-team__header-text {
37
+ font-size: 16px;
38
+ font-weight: 600;
39
+ color: #3f4755;
40
+ line-height: 24px;
41
+ }
42
+
43
+ .titaui-dynamic-my-team__content {
44
+ margin-top: 20px;
45
+ display: flex;
46
+ align-items: center;
47
+ flex-direction: column;
48
+ }
49
+
50
+ .titaui-dynamic-my-team__content-superior {
51
+ display: flex;
52
+ flex-direction: column;
53
+ align-items: center;
54
+ }
55
+
56
+ .titaui-dynamic-my-team__content-superior-text {
57
+ margin-top: 4px;
58
+ font-size: 12px;
59
+ color: #6f7886;
60
+ line-height: 18px;
61
+ }
62
+
63
+ .titaui-dynamic-my-team__content-superior::after {
64
+ content: "";
65
+ width: 1px;
66
+ height: 16px;
67
+ background-color: #e9ecf0;
68
+ margin-bottom: 4px;
69
+ }
70
+
71
+ .titaui-dynamic-my-team__content-add-subordinate {
72
+ width: 190px;
73
+ height: 31px;
74
+ background: url("./img/line.png") no-repeat;
75
+ background-size: 190px 22px;
76
+ background-position-y: 9px;
77
+ display: flex;
78
+ justify-content: center;
79
+ margin-top: 12px;
80
+ }
81
+
82
+ .titaui-dynamic-my-team__content-add-subordinate-icon {
83
+ width: 20px;
84
+ height: 20px;
85
+ background: #e9f1ff;
86
+ display: flex;
87
+ align-items: center;
88
+ justify-content: center;
89
+ border-radius: 50%;
90
+ cursor: pointer;
91
+ }
92
+
93
+ .titaui-dynamic-my-team__content-add-subordinate-icon-img {
94
+ width: 12px;
95
+ height: 12px;
96
+ }
97
+
98
+ .titaui-dynamic-my-team__content-subordinate {
99
+ width: 100%;
100
+ }
101
+
102
+ .titaui-dynamic-my-team__content-subordinate--empty {
103
+ margin-top: 12px;
104
+ font-size: 14px;
105
+ color: #6f7886;
106
+ line-height: 22px;
107
+ text-align: center;
108
+ }
109
+
110
+ .titaui-dynamic-my-team__subordinates {
111
+ display: flex;
112
+ align-items: center;
113
+ position: relative;
114
+ width: 100%;
115
+ height: 46px;
116
+ }
117
+
118
+ .titaui-dynamic-my-team__subordinates-left-mask {
119
+ width: 20px;
120
+ height: 46px;
121
+ background: #ffffff;
122
+ opacity: 0.9;
123
+ position: absolute;
124
+ left: 0;
125
+ z-index: 1;
126
+ display: flex;
127
+ align-items: center;
128
+ justify-content: center;
129
+ }
130
+
131
+ .titaui-dynamic-my-team__subordinates-left-mask-icon {
132
+ font-size: 16px;
133
+ color: #89919f;
134
+ }
135
+
136
+ .titaui-dynamic-my-team__subordinates-left-mask-icon:hover {
137
+ color: #2879ff;
138
+ cursor: pointer;
139
+ }
140
+
141
+ .titaui-dynamic-my-team__subordinates-right-mask {
142
+ width: 20px;
143
+ height: 46px;
144
+ background: #ffffff;
145
+ opacity: 0.9;
146
+ position: absolute;
147
+ right: 0;
148
+ z-index: 1;
149
+ display: flex;
150
+ align-items: center;
151
+ justify-content: center;
152
+ }
153
+
154
+ .titaui-dynamic-my-team__subordinates-right-mask-icon {
155
+ font-size: 16px;
156
+ color: #89919f;
157
+ transform: rotate(180deg);
158
+ }
159
+
160
+ .titaui-dynamic-my-team__subordinates-right-mask-icon:hover {
161
+ cursor: pointer;
162
+ color: #2879ff;
163
+ }
164
+
165
+ .titaui-dynamic-my-team__subordinates-content {
166
+ flex: 1;
167
+ display: flex;
168
+ align-items: center;
169
+ word-break: keep-all;
170
+ white-space: nowrap;
171
+ overflow: hidden;
172
+ }
173
+
174
+ .titaui-dynamic-my-team__subordinates-item {
175
+ margin-left: 12px;
176
+ }
177
+
178
+ .titaui-dynamic-my-team__subordinates-item:first-of-type {
179
+ margin-left: 20px;
180
+ }
181
+
182
+ .titaui-dynamic-my-team__subordinates-item:last-of-type {
183
+ margin-right: 20px;
184
+ }
@@ -0,0 +1,263 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _util = require("./util");
15
+
16
+ var _requestApi = require("./request-api");
17
+
18
+ var _bsGlobal = require("../../../utils/bs-global");
19
+
20
+ var _avatar = _interopRequireDefault(require("../../avatar"));
21
+
22
+ var _conditionRender = _interopRequireDefault(require("../../condition-render"));
23
+
24
+ var _addSubordinate = _interopRequireDefault(require("./img/add-subordinate.png"));
25
+
26
+ var _userSelector = _interopRequireDefault(require("../../user-selector"));
27
+
28
+ var _toast = _interopRequireDefault(require("../../toast"));
29
+
30
+ var _team = _interopRequireDefault(require("./img/team.png"));
31
+
32
+ var _getLocale = require("../../../utils/getLocale");
33
+
34
+ require("./index.css");
35
+
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
+
38
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
39
+
40
+ 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; }
41
+
42
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
43
+
44
+ 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."); }
45
+
46
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
47
+
48
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
49
+
50
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
51
+
52
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
+
54
+ var prefix = "titaui-dynamic-my-team";
55
+
56
+ var DynamicMyTeam = function DynamicMyTeam() {
57
+ var loginUser = (0, _bsGlobal.getBSGlobal)("loginUserInfo");
58
+
59
+ var _useState = (0, _react.useState)(),
60
+ _useState2 = _slicedToArray(_useState, 2),
61
+ superior = _useState2[0],
62
+ setSuperior = _useState2[1];
63
+
64
+ var _useState3 = (0, _react.useState)([]),
65
+ _useState4 = _slicedToArray(_useState3, 2),
66
+ subordinate = _useState4[0],
67
+ setSubordinate = _useState4[1];
68
+
69
+ var _useState5 = (0, _react.useState)(false),
70
+ _useState6 = _slicedToArray(_useState5, 2),
71
+ isMouseEnter = _useState6[0],
72
+ setIsMouseEnter = _useState6[1];
73
+
74
+ var _useState7 = (0, _react.useState)(0),
75
+ _useState8 = _slicedToArray(_useState7, 2),
76
+ scrollLeft = _useState8[0],
77
+ setScrollLeft = _useState8[1];
78
+
79
+ var subordinateContainerRef = (0, _react.useRef)();
80
+ var selectorRef = (0, _react.useRef)();
81
+
82
+ var handleScrollToLeft = function handleScrollToLeft() {
83
+ subordinateContainerRef.current.scrollTo({
84
+ left: scrollLeft - 96,
85
+ behavior: "smooth"
86
+ });
87
+ setScrollLeft(function (data) {
88
+ return data - 96;
89
+ });
90
+ };
91
+
92
+ var handleScrollToRight = function handleScrollToRight() {
93
+ subordinateContainerRef.current.scrollTo({
94
+ left: scrollLeft + 96,
95
+ behavior: "smooth"
96
+ });
97
+ setScrollLeft(function (data) {
98
+ return data + 96;
99
+ });
100
+ };
101
+
102
+ var handleMouseEnter = function handleMouseEnter() {
103
+ setIsMouseEnter(true);
104
+ };
105
+
106
+ var handleMouseLeave = function handleMouseLeave() {
107
+ setIsMouseEnter(false);
108
+ };
109
+
110
+ var getSubordinateData = function getSubordinateData() {
111
+ (0, _requestApi.getSubordinate)().then(function (resp) {
112
+ if (resp.Code === 1) {
113
+ setSubordinate(resp.Data.data.members.filter(function (item) {
114
+ return item.user.userId !== loginUser.Id;
115
+ }));
116
+ }
117
+ });
118
+ };
119
+
120
+ var handleSelected = function handleSelected(_ref) {
121
+ var _ref2 = _slicedToArray(_ref, 1),
122
+ user = _ref2[0];
123
+
124
+ (0, _requestApi.addSubPerson)(user.data.userId).then(function (resp) {
125
+ if (resp.Code === 1 && resp.Data) {
126
+ _toast["default"].Success("添加成功", {
127
+ canClose: false
128
+ });
129
+
130
+ setTimeout(getSubordinateData, 1500);
131
+ } else {
132
+ _toast["default"].Error(resp.Message, {
133
+ canClose: false
134
+ });
135
+ }
136
+ });
137
+ };
138
+
139
+ (0, _react.useEffect)(function () {
140
+ (0, _requestApi.getSuperior)().then(function (resp) {
141
+ if (resp.Code === 1) {
142
+ setSuperior(resp.Data[0].parentUser);
143
+ }
144
+ });
145
+ getSubordinateData();
146
+ }, []);
147
+ return /*#__PURE__*/_react["default"].createElement("div", {
148
+ className: prefix
149
+ }, /*#__PURE__*/_react["default"].createElement("div", {
150
+ className: "".concat(prefix, "__container")
151
+ }, /*#__PURE__*/_react["default"].createElement("div", {
152
+ className: "".concat(prefix, "__header")
153
+ }, /*#__PURE__*/_react["default"].createElement("span", {
154
+ className: "".concat(prefix, "__header-icon")
155
+ }, /*#__PURE__*/_react["default"].createElement("img", {
156
+ className: "".concat(prefix, "__header-icon-img"),
157
+ src: _team["default"]
158
+ })), /*#__PURE__*/_react["default"].createElement("span", {
159
+ className: "".concat(prefix, "__header-text")
160
+ }, (0, _getLocale.getLocale)("Feed_Title_Myteam"))), /*#__PURE__*/_react["default"].createElement("div", {
161
+ className: "".concat(prefix, "__content")
162
+ }, superior && /*#__PURE__*/_react["default"].createElement("div", {
163
+ className: "".concat(prefix, "__content-superior")
164
+ }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
165
+ size: {
166
+ width: 40,
167
+ textNum: 1,
168
+ fontSize: 14
169
+ },
170
+ src: superior.avatar.Medium,
171
+ userId: superior.userId,
172
+ name: superior.name,
173
+ color: superior.avatar.Color,
174
+ showNameTips: true
175
+ }), /*#__PURE__*/_react["default"].createElement("span", {
176
+ className: "".concat(prefix, "__content-superior-text")
177
+ }, (0, _getLocale.getLocale)("Feed_Title_Directsuperior"))), /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
178
+ size: {
179
+ width: 56,
180
+ textNum: 3,
181
+ fontSize: 14
182
+ },
183
+ src: loginUser.UserAvatar.Medium,
184
+ userId: loginUser.Id,
185
+ name: loginUser.Name,
186
+ color: loginUser.UserAvatar.Color,
187
+ showNameTips: true
188
+ }), /*#__PURE__*/_react["default"].createElement("div", {
189
+ className: "".concat(prefix, "__content-add-subordinate")
190
+ }, (0, _util.showAddIcon)() && /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
191
+ ref: selectorRef,
192
+ multiple: false,
193
+ position: "centerRight",
194
+ onSelect: handleSelected,
195
+ disabledDepartSelect: true,
196
+ searchedPanes: {
197
+ user: true,
198
+ depart: false,
199
+ group: false
200
+ },
201
+ popupAlign: {
202
+ offset: [0, 0],
203
+ overflow: {
204
+ adjustX: true,
205
+ adjustY: true
206
+ },
207
+ targetOffset: [12, 209]
208
+ },
209
+ panes: {
210
+ depart: true
211
+ },
212
+ trigger: /*#__PURE__*/_react["default"].createElement("span", {
213
+ className: "".concat(prefix, "__content-add-subordinate-icon")
214
+ }, /*#__PURE__*/_react["default"].createElement("img", {
215
+ className: "".concat(prefix, "__content-add-subordinate-icon-img"),
216
+ src: _addSubordinate["default"]
217
+ }))
218
+ })), /*#__PURE__*/_react["default"].createElement("div", {
219
+ className: "".concat(prefix, "__content-subordinate"),
220
+ onMouseEnter: handleMouseEnter,
221
+ onMouseLeave: handleMouseLeave
222
+ }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
223
+ condition: subordinate.length > 0
224
+ }, /*#__PURE__*/_react["default"].createElement("div", {
225
+ className: "".concat(prefix, "__subordinates")
226
+ }, /*#__PURE__*/_react["default"].createElement("div", {
227
+ className: "".concat(prefix, "__subordinates-left-mask")
228
+ }, isMouseEnter && /*#__PURE__*/_react["default"].createElement("i", {
229
+ onClick: handleScrollToLeft,
230
+ className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__subordinates-left-mask-icon"))
231
+ })), /*#__PURE__*/_react["default"].createElement("div", {
232
+ className: "".concat(prefix, "__subordinates-content"),
233
+ ref: subordinateContainerRef
234
+ }, subordinate.map(function (item) {
235
+ var user = item.user;
236
+ return /*#__PURE__*/_react["default"].createElement("span", {
237
+ className: "".concat(prefix, "__subordinates-item")
238
+ }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
239
+ size: {
240
+ width: 40,
241
+ textNum: 1,
242
+ fontSize: 14
243
+ },
244
+ src: user.avatar.Medium,
245
+ userId: user.userId,
246
+ name: user.name,
247
+ color: user.avatar.Color,
248
+ showNameTips: true
249
+ }));
250
+ })), /*#__PURE__*/_react["default"].createElement("div", {
251
+ className: "".concat(prefix, "__subordinates-right-mask")
252
+ }, isMouseEnter && /*#__PURE__*/_react["default"].createElement("i", {
253
+ onClick: handleScrollToRight,
254
+ className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__subordinates-right-mask-icon"))
255
+ })))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
256
+ condition: subordinate.length === 0
257
+ }, /*#__PURE__*/_react["default"].createElement("div", {
258
+ className: "".concat(prefix, "__content-subordinate--empty")
259
+ }, (0, _getLocale.getLocale)("Feed_Tab_HaveSubordinates")))))));
260
+ };
261
+
262
+ var _default = DynamicMyTeam;
263
+ exports["default"] = _default;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSuperior = exports.getSubordinate = exports.addSubPerson = void 0;
7
+
8
+ var _qs = _interopRequireDefault(require("qs"));
9
+
10
+ var _request = require("../../../utils/request");
11
+
12
+ var _bsGlobal = require("../../../utils/bs-global");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ var loginUser = (0, _bsGlobal.getBSGlobal)("loginUserInfo");
17
+
18
+ var getSuperior = function getSuperior() {
19
+ return (0, _request.rget)("v1")("org/DirectSuperior?to_user_id=".concat(loginUser.Id));
20
+ };
21
+
22
+ exports.getSuperior = getSuperior;
23
+
24
+ var addSubPerson = function addSubPerson(id) {
25
+ return (0, _request.rput)("v1")("user", {
26
+ subordinate_user_id: id
27
+ }, {
28
+ headers: {
29
+ "Content-Type": "application/x-www-form-urlencoded"
30
+ },
31
+ transformRequest: _qs["default"].stringify
32
+ });
33
+ };
34
+
35
+ exports.addSubPerson = addSubPerson;
36
+
37
+ var getSubordinate = function getSubordinate() {
38
+ return (0, _request.rpost)("v2")("WorkTable/View?channel_type=2&view_name=Team", {
39
+ view_name: "Team",
40
+ startNum: 1,
41
+ count: 500,
42
+ WorkTableType: 0,
43
+ SubType: 0
44
+ }, {
45
+ headers: {
46
+ "Content-Type": "application/x-www-form-urlencoded"
47
+ },
48
+ transformRequest: _qs["default"].stringify
49
+ });
50
+ };
51
+
52
+ exports.getSubordinate = getSubordinate;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.showAddIcon = void 0;
7
+
8
+ var _bsGlobal = require("../../../utils/bs-global");
9
+
10
+ var showAddIcon = function showAddIcon() {
11
+ // const isUseSetOrg = getBSGlobal("tenant_function").IsUseSetOrg;
12
+ // const header = getBSGlobal("Header");
13
+ // const isOpenApp908 = header.find((item) => item.Code == "908");
14
+ // const isOpenApp830 = header.find((item) => item.Code == "830");
15
+ // return isUseSetOrg && !isOpenApp908 && !isOpenApp830;
16
+ var versionInfo = (0, _bsGlobal.getBSGlobal)("tenantAuthentication");
17
+ return versionInfo.Version === 1;
18
+ };
19
+
20
+ exports.showAddIcon = showAddIcon;
@@ -0,0 +1,192 @@
1
+ .titaui-new-ui-dynamic {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
6
+ height: 100%;
7
+ }
8
+
9
+ .titaui-new-ui-dynamic__header {
10
+ position: absolute;
11
+ display: flex;
12
+ justify-content: space-between;
13
+ height: 68px;
14
+ background: #ffffff;
15
+ box-shadow: 0px 0px 24px 0px rgba(127, 145, 180, 0.2);
16
+ padding: 0 24px;
17
+ width: calc(100% - 14px);
18
+ box-sizing: border-box;
19
+ z-index: 3;
20
+ border-radius: 12px;
21
+ }
22
+
23
+ .titaui-new-ui-dynamic__header--content-scroll {
24
+ background: rgba(255, 255, 255, 0.92);
25
+ backdrop-filter: blur(4px);
26
+ }
27
+
28
+ .titaui-new-ui-dynamic__header-search {
29
+ display: flex;
30
+ align-items: center;
31
+ }
32
+
33
+ .titaui-new-ui-dynamic__header-tabs {
34
+ display: flex;
35
+ }
36
+
37
+ .titaui-new-ui-dynamic__content {
38
+ position: relative;
39
+ display: flex;
40
+ flex: 1;
41
+ overflow: auto;
42
+ padding: 78px 0 0 0;
43
+ box-sizing: border-box;
44
+ }
45
+
46
+ .titaui-new-ui-dynamic__content-left {
47
+ display: flex;
48
+ flex-direction: column;
49
+ width: calc(100% - 288px);
50
+ }
51
+
52
+ .titaui-new-ui-dynamic__content-left-tabs {
53
+ display: flex;
54
+ align-items: center;
55
+ min-height: 48px;
56
+ max-height: 48px;
57
+ background: #ffffff;
58
+ box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
59
+ border-radius: 12px;
60
+ padding-left: 20px;
61
+ margin-bottom: 10px;
62
+ }
63
+
64
+ .titaui-new-ui-dynamic__content-left-tab {
65
+ display: inline-flex;
66
+ align-items: center;
67
+ height: 30px;
68
+ padding: 4px 12px;
69
+ background: #ffffff;
70
+ border-radius: 15px;
71
+ font-size: 14px;
72
+ color: #3f4755;
73
+ line-height: 22px;
74
+ box-sizing: border-box;
75
+ cursor: pointer;
76
+ white-space: nowrap;
77
+ word-break: keep-all;
78
+ overflow: hidden;
79
+ text-overflow: ellipsis;
80
+ }
81
+
82
+ .titaui-new-ui-dynamic__content-left-tab--active {
83
+ background: rgba(40, 121, 255, 0.1);
84
+ color: #2879ff;
85
+ animation: second-tab-animation 0.1s linear;
86
+ }
87
+
88
+ .titaui-new-ui-dynamic__content-left-loading {
89
+ margin: 0 auto;
90
+ background-image: url("./img/dynamic-loading.gif");
91
+ background-repeat: no-repeat;
92
+ background-size: 100px 40px;
93
+ padding-bottom: 60px;
94
+ width: 100px;
95
+ }
96
+
97
+ .titaui-new-ui-dynamic__content-right {
98
+ margin-left: 10px;
99
+ }
100
+
101
+ .titaui-new-ui-dynamic__loading {
102
+ position: absolute;
103
+ width: 100%;
104
+ height: 100%;
105
+ z-index: 4;
106
+ background: #f0f4fa;
107
+ }
108
+
109
+ .titaui-new-ui-dynamic__loading-img {
110
+ width: 100px;
111
+ position: relative;
112
+ top: 50%;
113
+ left: 50%;
114
+ transform: translate(-50%, -50%);
115
+ }
116
+
117
+ .titaui-new-ui-dynamic__empty-loading-block {
118
+ height: 160px;
119
+ }
120
+
121
+ .titaui-new-ui-dynamic__no-more-data {
122
+ display: flex;
123
+ justify-content: center;
124
+ align-items: center;
125
+ padding-bottom: 20px;
126
+ font-size: 14px;
127
+ color: #6f7886;
128
+ line-height: 22px;
129
+ }
130
+
131
+ .titaui-new-ui-dynamic__no-more-data::before {
132
+ content: "";
133
+ display: inline-block;
134
+ margin-right: 12px;
135
+ width: 192px;
136
+ height: 2px;
137
+ background: linear-gradient(90deg, #f0f4fa 0%, #b8c3d5 100%);
138
+ border-radius: 1px;
139
+ }
140
+
141
+ .titaui-new-ui-dynamic__no-more-data::after {
142
+ content: "";
143
+ display: inline-block;
144
+ margin-left: 12px;
145
+ width: 192px;
146
+ height: 2px;
147
+ background: linear-gradient(90deg, #b8c3d5 0%, #f0f4fa 100%);
148
+ border-radius: 1px;
149
+ }
150
+
151
+ .titaui-new-ui-dynamic__go-to-top {
152
+ position: fixed;
153
+ bottom: 128px;
154
+ right: 24px;
155
+ display: flex;
156
+ align-items: center;
157
+ justify-content: center;
158
+ width: 42px;
159
+ height: 42px;
160
+ background: rgba(255, 255, 255, 0.86);
161
+ box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
162
+ border-radius: 50%;
163
+ cursor: pointer;
164
+ z-index: 1;
165
+ }
166
+
167
+ .titaui-new-ui-dynamic__go-to-top-img {
168
+ display: inline-block;
169
+ width: 24px;
170
+ height: 24px;
171
+ background: url("./img/dynamic-top.svg") no-repeat;
172
+ }
173
+
174
+ @keyframes activeAnimation {
175
+ 0% {
176
+ width: 0;
177
+ }
178
+
179
+ 100% {
180
+ width: 24px;
181
+ }
182
+ }
183
+
184
+ @keyframes second-tab-animation {
185
+ 0% {
186
+ opacity: 0;
187
+ }
188
+
189
+ 100% {
190
+ opacity: 1;
191
+ }
192
+ }