@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
@@ -9,6 +9,8 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
+ var _titaUi = require("tita-ui");
13
+
12
14
  var _userSelector = _interopRequireDefault(require("../../user-selector"));
13
15
 
14
16
  var _drawer = _interopRequireDefault(require("../../drawer"));
@@ -25,9 +27,7 @@ var _requestApis = require("../request-apis");
25
27
 
26
28
  var _okrShare = _interopRequireDefault(require("../../okr-share"));
27
29
 
28
- var _context6 = require("../context");
29
-
30
- var _constant = require("./constant");
30
+ var _context7 = require("../context");
31
31
 
32
32
  var _deleteConfirm = _interopRequireDefault(require("./delete-confirm/delete-confirm"));
33
33
 
@@ -74,7 +74,7 @@ function OkrDetailHeader(_ref) {
74
74
  setShareVisible = _useState2[1];
75
75
 
76
76
  var userSelectRef = (0, _react.useRef)();
77
- var deletePopRef = (0, _react.useRef)();
77
+ var popRef = (0, _react.useRef)();
78
78
 
79
79
  var _useState3 = (0, _react.useState)([]),
80
80
  _useState4 = _slicedToArray(_useState3, 2),
@@ -83,11 +83,8 @@ function OkrDetailHeader(_ref) {
83
83
 
84
84
 
85
85
  var loginUserId = window.BSGlobal.loginUserInfo.Id;
86
- var context = (0, _react.useContext)(_context6.GeneralDataContext);
87
- var commonContext = (0, _react.useContext)(_context6.CommonContext);
88
- var approvalSetting = commonContext.approvalSetting,
89
- okrInfo = commonContext.okrInfo;
90
- var approveStatusColor = (0, _constant.ApproveStatusColor)(okrInfo.applyState);
86
+ var context = (0, _react.useContext)(_context7.GeneralDataContext);
87
+ var commonContext = (0, _react.useContext)(_context7.CommonContext);
91
88
  var changVisiblity = (0, _react.useCallback)( /*#__PURE__*/function () {
92
89
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(workId, visibility) {
93
90
  var visibilityScope,
@@ -136,238 +133,220 @@ function OkrDetailHeader(_ref) {
136
133
  var closeShareModal = (0, _react.useCallback)(function () {
137
134
  setShareVisible(false);
138
135
  }, []);
139
-
140
- var handleDeleteOkr = function handleDeleteOkr(selected) {
141
- (0, _requestApis.workDelete)({
142
- deleteType: selected,
143
- workId: detailInfo.workId
144
- }).then(function (resp) {
145
- if (resp.Code === 1) {
146
- _toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'));
147
-
148
- setTimeout(function () {
149
- commonContext.refreshAll();
150
- }, 500);
151
- } else {
152
- _toast["default"].Error(resp.Message);
153
- }
154
- });
155
- };
156
-
157
136
  var actions = (0, _react.useMemo)(function () {
158
137
  if (!detailInfo) {
159
138
  return [];
160
- }
161
-
162
- return (0, _actions.getOkrHeadActions)({
163
- roleType: context.generalRoleType,
164
- principalUser: context.generalPrincipalUser,
165
- visibility: context.generalVisibility.visibility,
166
- detailInfo: detailInfo,
167
- openShareModal: function () {
168
- var _openShareModal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
169
- var krss;
170
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
171
- while (1) {
172
- switch (_context2.prev = _context2.next) {
173
- case 0:
174
- _context2.next = 2;
175
- return (0, _requestApis.getKrs)({
176
- okrId: detailInfo.workId
177
- });
178
-
179
- case 2:
180
- krss = _context2.sent;
181
- setKrs(krss);
182
- setShareVisible(true);
183
-
184
- case 5:
185
- case "end":
186
- return _context2.stop();
139
+ } else {
140
+ return (0, _actions.getOkrHeadActions)({
141
+ roleType: context.generalRoleType,
142
+ principalUser: context.generalPrincipalUser,
143
+ visibility: context.generalVisibility.visibility,
144
+ detailInfo: detailInfo,
145
+ openShareModal: function () {
146
+ var _openShareModal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
147
+ var krss;
148
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
149
+ while (1) {
150
+ switch (_context2.prev = _context2.next) {
151
+ case 0:
152
+ _context2.next = 2;
153
+ return (0, _requestApis.getKrs)({
154
+ okrId: detailInfo.workId
155
+ });
156
+
157
+ case 2:
158
+ krss = _context2.sent;
159
+ setKrs(krss);
160
+ setShareVisible(true);
161
+
162
+ case 5:
163
+ case "end":
164
+ return _context2.stop();
165
+ }
187
166
  }
188
- }
189
- }, _callee2);
190
- }));
167
+ }, _callee2);
168
+ }));
191
169
 
192
- function openShareModal() {
193
- return _openShareModal.apply(this, arguments);
194
- }
195
-
196
- return openShareModal;
197
- }(),
198
- changeVisiblilty: function changeVisiblilty(visibility) {
199
- if (visibility === 4) {
200
- if (userSelectRef.current) {
201
- userSelectRef.current.open();
170
+ function openShareModal() {
171
+ return _openShareModal.apply(this, arguments);
202
172
  }
203
173
 
204
- return;
205
- }
206
-
207
- changVisiblity(detailInfo.workId, visibility);
208
- },
209
- onDeleteOkr: function onDeleteOkr(e) {
210
- deletePopRef.current.show();
211
- },
212
- onCopyOkr: function onCopyOkr() {
213
- // @ts-ignore
214
- window.openCopyOkrModal({
215
- okrId: detailInfo.workId,
216
- okrType: detailInfo.okrType
217
- });
218
- },
219
- onChangeOkrFollow: function () {
220
- var _onChangeOkrFollow = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(follow) {
221
- var res;
222
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
223
- while (1) {
224
- switch (_context3.prev = _context3.next) {
225
- case 0:
226
- _context3.next = 2;
227
- return (0, _confirm["default"])(follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Focuson') : (0, _getLocale.getLocale)('OKR_MyO_Err_Unfollow'), follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Payatten') : (0, _getLocale.getLocale)('OKR_MyO_Err_Progress'));
228
-
229
- case 2:
230
- res = _context3.sent;
174
+ return openShareModal;
175
+ }(),
176
+ changeVisiblilty: function changeVisiblilty(visibility) {
177
+ if (visibility === 4) {
178
+ if (userSelectRef.current) {
179
+ userSelectRef.current.open();
180
+ }
231
181
 
232
- if (!res) {
233
- _context3.next = 14;
234
- break;
235
- }
182
+ return;
183
+ }
236
184
 
237
- if (!follow) {
238
- _context3.next = 9;
185
+ changVisiblity(detailInfo.workId, visibility);
186
+ },
187
+ onDeleteOkr: function onDeleteOkr(e) {
188
+ popRef.current.getRef().show(e.target);
189
+ },
190
+ onCopyOkr: function onCopyOkr() {
191
+ // @ts-ignore
192
+ window.openCopyOkrModal({
193
+ okrId: detailInfo.workId,
194
+ okrType: detailInfo.okrType
195
+ });
196
+ },
197
+ onChangeOkrFollow: function () {
198
+ var _onChangeOkrFollow = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(follow) {
199
+ var res;
200
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
201
+ while (1) {
202
+ switch (_context3.prev = _context3.next) {
203
+ case 0:
204
+ _context3.next = 2;
205
+ return (0, _confirm["default"])(follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Focuson') : (0, _getLocale.getLocale)('OKR_MyO_Err_Unfollow'), follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Payatten') : (0, _getLocale.getLocale)('OKR_MyO_Err_Progress'));
206
+
207
+ case 2:
208
+ res = _context3.sent;
209
+
210
+ if (!res) {
211
+ _context3.next = 14;
212
+ break;
213
+ }
214
+
215
+ if (!follow) {
216
+ _context3.next = 9;
217
+ break;
218
+ }
219
+
220
+ _context3.next = 7;
221
+ return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
222
+
223
+ case 7:
224
+ _context3.next = 11;
239
225
  break;
240
- }
241
-
242
- _context3.next = 7;
243
- return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
244
226
 
245
- case 7:
246
- _context3.next = 11;
247
- break;
227
+ case 9:
228
+ _context3.next = 11;
229
+ return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
248
230
 
249
- case 9:
250
- _context3.next = 11;
251
- return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
231
+ case 11:
232
+ context.setGeneralRoleType(follow ? 3 : 0); // 关注
252
233
 
253
- case 11:
254
- context.setGeneralRoleType(follow ? 3 : 0); // 关注
234
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
255
235
 
256
- _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
236
+ if (!follow) {
237
+ commonContext.refreshAll();
238
+ }
257
239
 
258
- if (!follow) {
259
- commonContext.refreshAll();
260
- }
261
-
262
- case 14:
263
- case "end":
264
- return _context3.stop();
240
+ case 14:
241
+ case "end":
242
+ return _context3.stop();
243
+ }
265
244
  }
266
- }
267
- }, _callee3);
268
- }));
269
-
270
- function onChangeOkrFollow(_x3) {
271
- return _onChangeOkrFollow.apply(this, arguments);
272
- }
273
-
274
- return onChangeOkrFollow;
275
- }(),
276
- onFinishOrReOpen: function () {
277
- var _onFinishOrReOpen = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(isFinish) {
278
- var res;
279
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
280
- while (1) {
281
- switch (_context4.prev = _context4.next) {
282
- case 0:
283
- _context4.next = 2;
284
- return (0, _confirm["default"])(isFinish ? (0, _getLocale.getLocale)('OKR_MyO_Areycloseobjective') : (0, _getLocale.getLocale)('OKR_MyO_Err_Restart'));
285
-
286
- case 2:
287
- res = _context4.sent;
245
+ }, _callee3);
246
+ }));
288
247
 
289
- if (!res) {
290
- _context4.next = 13;
291
- break;
292
- }
248
+ function onChangeOkrFollow(_x3) {
249
+ return _onChangeOkrFollow.apply(this, arguments);
250
+ }
293
251
 
294
- if (!isFinish) {
295
- _context4.next = 9;
252
+ return onChangeOkrFollow;
253
+ }(),
254
+ onFinishOrReOpen: function () {
255
+ var _onFinishOrReOpen = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(isFinish) {
256
+ var res;
257
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
258
+ while (1) {
259
+ switch (_context4.prev = _context4.next) {
260
+ case 0:
261
+ _context4.next = 2;
262
+ return (0, _confirm["default"])(isFinish ? (0, _getLocale.getLocale)('OKR_MyO_Areycloseobjective') : (0, _getLocale.getLocale)('OKR_MyO_Err_Restart'));
263
+
264
+ case 2:
265
+ res = _context4.sent;
266
+
267
+ if (!res) {
268
+ _context4.next = 13;
269
+ break;
270
+ }
271
+
272
+ if (!isFinish) {
273
+ _context4.next = 9;
274
+ break;
275
+ }
276
+
277
+ _context4.next = 7;
278
+ return (0, _requestApis.close)(detailInfo.workId);
279
+
280
+ case 7:
281
+ _context4.next = 11;
296
282
  break;
297
- }
298
-
299
- _context4.next = 7;
300
- return (0, _requestApis.close)(detailInfo.workId);
301
283
 
302
- case 7:
303
- _context4.next = 11;
304
- break;
284
+ case 9:
285
+ _context4.next = 11;
286
+ return (0, _requestApis.start)(detailInfo.workId);
305
287
 
306
- case 9:
307
- _context4.next = 11;
308
- return (0, _requestApis.start)(detailInfo.workId);
288
+ case 11:
289
+ commonContext.refreshAll(); // 刷新
309
290
 
310
- case 11:
311
- commonContext.refreshAll(); // 刷新
291
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
312
292
 
313
- _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
314
-
315
- case 13:
316
- case "end":
317
- return _context4.stop();
293
+ case 13:
294
+ case "end":
295
+ return _context4.stop();
296
+ }
318
297
  }
319
- }
320
- }, _callee4);
321
- }));
322
-
323
- function onFinishOrReOpen(_x4) {
324
- return _onFinishOrReOpen.apply(this, arguments);
325
- }
326
-
327
- return onFinishOrReOpen;
328
- }(),
329
- onQuit: function () {
330
- var _onQuit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
331
- var res;
332
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
333
- while (1) {
334
- switch (_context5.prev = _context5.next) {
335
- case 0:
336
- _context5.next = 2;
337
- return (0, _confirm["default"])((0, _getLocale.getLocale)('OKR_MyO_Err_Quit'), (0, _getLocale.getLocale)('OKR_MyO_Err_Inchargec'));
338
-
339
- case 2:
340
- res = _context5.sent;
341
-
342
- if (!res) {
343
- _context5.next = 8;
344
- break;
345
- }
298
+ }, _callee4);
299
+ }));
346
300
 
347
- _context5.next = 6;
348
- return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 2);
349
-
350
- case 6:
351
- // context.setGeneralRoleType(0)
352
- commonContext.refreshAll(); // 刷新
353
-
354
- _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
301
+ function onFinishOrReOpen(_x4) {
302
+ return _onFinishOrReOpen.apply(this, arguments);
303
+ }
355
304
 
356
- case 8:
357
- case "end":
358
- return _context5.stop();
305
+ return onFinishOrReOpen;
306
+ }(),
307
+ onQuit: function () {
308
+ var _onQuit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
309
+ var res;
310
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
311
+ while (1) {
312
+ switch (_context5.prev = _context5.next) {
313
+ case 0:
314
+ _context5.next = 2;
315
+ return (0, _confirm["default"])((0, _getLocale.getLocale)('OKR_MyO_Err_Quit'), (0, _getLocale.getLocale)('OKR_MyO_Err_Inchargec'));
316
+
317
+ case 2:
318
+ res = _context5.sent;
319
+
320
+ if (!res) {
321
+ _context5.next = 8;
322
+ break;
323
+ }
324
+
325
+ _context5.next = 6;
326
+ return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 2);
327
+
328
+ case 6:
329
+ // context.setGeneralRoleType(0)
330
+ commonContext.refreshAll(); // 刷新
331
+
332
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
333
+
334
+ case 8:
335
+ case "end":
336
+ return _context5.stop();
337
+ }
359
338
  }
360
- }
361
- }, _callee5);
362
- }));
339
+ }, _callee5);
340
+ }));
363
341
 
364
- function onQuit() {
365
- return _onQuit.apply(this, arguments);
366
- }
342
+ function onQuit() {
343
+ return _onQuit.apply(this, arguments);
344
+ }
367
345
 
368
- return onQuit;
369
- }()
370
- });
346
+ return onQuit;
347
+ }()
348
+ });
349
+ }
371
350
  }, [detailInfo, context.generalRoleType, context.generalPrincipalUser, context.generalVisibility.visibility]);
372
351
  var parent = null;
373
352
 
@@ -389,8 +368,6 @@ function OkrDetailHeader(_ref) {
389
368
 
390
369
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
391
370
  actions: actions,
392
- approvalSetting: approvalSetting,
393
- detailInfo: detailInfo,
394
371
  actionComponent: /*#__PURE__*/_react["default"].createElement(_wechatBtn["default"], {
395
372
  id: detailInfo.workId,
396
373
  objType: 62,
@@ -409,14 +386,7 @@ function OkrDetailHeader(_ref) {
409
386
  krId: parent.id
410
387
  });
411
388
  }
412
- }, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null,
413
- onlyShowContent: approveStatusColor ? /*#__PURE__*/_react["default"].createElement("div", {
414
- className: "okr-detail-header-status",
415
- style: {
416
- color: approveStatusColor.color,
417
- backgroundColor: approveStatusColor.bgColor
418
- }
419
- }, (0, _constant.getApproveStatusTextMap)(okrInfo.applyState)) : null
389
+ }, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null
420
390
  }), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
421
391
  visible: shareVisible,
422
392
  onClose: closeShareModal,
@@ -434,12 +404,48 @@ function OkrDetailHeader(_ref) {
434
404
  })
435
405
  },
436
406
  zIndex: 2400
437
- }), /*#__PURE__*/_react["default"].createElement(_deleteConfirm["default"], {
438
- ref: deletePopRef,
439
- okrInfo: okrInfo,
440
- approvalSetting: approvalSetting,
441
- onConfirm: handleDeleteOkr
442
- }), /*#__PURE__*/_react["default"].createElement("div", {
407
+ }), /*#__PURE__*/_react["default"].createElement(_titaUi.PopConfirm, {
408
+ ref: popRef,
409
+ showArrow: false,
410
+ align: "top",
411
+ className: "document-mouse-event-ignore",
412
+ content: /*#__PURE__*/_react["default"].createElement(_deleteConfirm["default"], {
413
+ onConfirm: /*#__PURE__*/function () {
414
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(selected) {
415
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
416
+ while (1) {
417
+ switch (_context6.prev = _context6.next) {
418
+ case 0:
419
+ _context6.next = 2;
420
+ return (0, _requestApis.workDelete)({
421
+ deleteType: selected,
422
+ workId: detailInfo.workId
423
+ });
424
+
425
+ case 2:
426
+ _toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'));
427
+
428
+ setTimeout(function () {
429
+ commonContext.refreshAll();
430
+ }, 500);
431
+
432
+ case 4:
433
+ case "end":
434
+ return _context6.stop();
435
+ }
436
+ }
437
+ }, _callee6);
438
+ }));
439
+
440
+ return function (_x5) {
441
+ return _ref3.apply(this, arguments);
442
+ };
443
+ }(),
444
+ onCancel: function onCancel() {
445
+ return popRef.current && popRef.current.getRef().hide();
446
+ }
447
+ })
448
+ }, /*#__PURE__*/_react["default"].createElement("span", null)), /*#__PURE__*/_react["default"].createElement("div", {
443
449
  style: {
444
450
  textAlign: 'right',
445
451
  height: 0