@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
@@ -51,7 +51,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
51
51
 
52
52
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
53
 
54
- var prefixCls = "titaui-user-message";
54
+ var prefixCls = 'titaui-user-message';
55
55
 
56
56
  function UserMessage() {
57
57
  var _useState = (0, _react.useState)(0),
@@ -79,7 +79,7 @@ function UserMessage() {
79
79
  preData = _useState10[0],
80
80
  setPreData = _useState10[1];
81
81
 
82
- var _useState11 = (0, _react.useState)("todos"),
82
+ var _useState11 = (0, _react.useState)('todos'),
83
83
  _useState12 = _slicedToArray(_useState11, 2),
84
84
  firstTab = _useState12[0],
85
85
  setFirstTab = _useState12[1];
@@ -96,16 +96,16 @@ function UserMessage() {
96
96
  setAllData(res.Data.indicators);
97
97
  var indicators = res.Data.indicators;
98
98
  var todos = indicators.find(function (item) {
99
- return item.type === "todoIndicator";
99
+ return item.type === 'todoIndicator';
100
100
  });
101
101
  var informs = indicators.find(function (item) {
102
- return item.type === "messageIndicator";
102
+ return item.type === 'messageIndicator';
103
103
  });
104
104
  var replys = indicators.find(function (item) {
105
- return item.type === "mLeaveandComment";
105
+ return item.type === 'mLeaveandComment';
106
106
  });
107
107
  var reminds = indicators.find(function (item) {
108
- return item.type === "Tx";
108
+ return item.type === 'Tx';
109
109
  });
110
110
  var total = 0; // @与回复的数量在通知里面包含了
111
111
 
@@ -125,17 +125,17 @@ function UserMessage() {
125
125
  setInfosNum(total);
126
126
 
127
127
  if (todos && todos.value) {
128
- setFirstTab("todos");
128
+ setFirstTab('todos');
129
129
  } else if (informs && !replys && informs.value) {
130
- setFirstTab("informs");
130
+ setFirstTab('informs');
131
131
  } else if (replys && informs.value - replys.value === 0) {
132
- setFirstTab("replys");
132
+ setFirstTab('replys');
133
133
  } else if (replys && informs.value - replys.value > 0) {
134
- setFirstTab("informs");
134
+ setFirstTab('informs');
135
135
  } else if (reminds && reminds.value) {
136
- setFirstTab("reminds");
136
+ setFirstTab('reminds');
137
137
  } else {
138
- setFirstTab("todos");
138
+ setFirstTab('todos');
139
139
  } // 判断是企业勋章
140
140
 
141
141
 
@@ -148,7 +148,7 @@ function UserMessage() {
148
148
  } // upaas 勋章
149
149
 
150
150
 
151
- var medalDetail = (0, _bsGlobal.getBSGlobal)("medalDetail");
151
+ var medalDetail = (0, _bsGlobal.getBSGlobal)('medalDetail');
152
152
 
153
153
  if (medalDetail) {
154
154
  window.util.upaasMedal()(medalDetail);
@@ -156,7 +156,7 @@ function UserMessage() {
156
156
 
157
157
 
158
158
  var mRedPackIndicator = indicators.filter(function (item) {
159
- return item.type === "mRedPackIndicator";
159
+ return item.type === 'mRedPackIndicator';
160
160
  });
161
161
 
162
162
  if (mRedPackIndicator.length > 0) {
@@ -165,10 +165,10 @@ function UserMessage() {
165
165
 
166
166
 
167
167
  var blessIndicator = indicators.filter(function (item) {
168
- return item.type === "mZhufu";
168
+ return item.type === 'mZhufu';
169
169
  });
170
170
  var weeklyReportIndicator = indicators.filter(function (item) {
171
- return item.type === "mWeekStatisticIndicator";
171
+ return item.type === 'mWeekStatisticIndicator';
172
172
  });
173
173
 
174
174
  if (blessIndicator.length === 1) {
@@ -185,11 +185,11 @@ function UserMessage() {
185
185
  if (weeklyReportIndicator.length) {
186
186
  var _window;
187
187
 
188
- (_window = window) === null || _window === void 0 ? void 0 : _window.Talent.app.vent.trigger("open-weekly-report-modal");
188
+ (_window = window) === null || _window === void 0 ? void 0 : _window.Talent.app.vent.trigger('open-weekly-report-modal');
189
189
  }
190
190
 
191
191
  var feedInfo = indicators.find(function (item) {
192
- return item.type === "feedAboutMeIndicator";
192
+ return item.type === 'feedAboutMeIndicator';
193
193
  });
194
194
 
195
195
  if (feedInfo) {
@@ -206,7 +206,10 @@ function UserMessage() {
206
206
  (0, _react.useEffect)(function () {
207
207
  setPreData(infosNum);
208
208
  handleIntervalRequestMessageInfo();
209
- setInterval(handleIntervalRequestMessageInfo, 15000);
209
+ var interval = setInterval(handleIntervalRequestMessageInfo, 15000);
210
+ return function () {
211
+ return clearInterval(interval);
212
+ };
210
213
  }, []);
211
214
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
212
215
  popup: /*#__PURE__*/_react["default"].createElement(_msg["default"], {
@@ -227,7 +230,7 @@ function UserMessage() {
227
230
  condition: infosNum !== 0
228
231
  }, /*#__PURE__*/_react["default"].createElement("div", {
229
232
  className: (0, _classnames["default"])("".concat(prefixCls, "__msg-total"))
230
- }, infosNum > 100 ? "99+" : infosNum)), /*#__PURE__*/_react["default"].createElement("img", {
233
+ }, infosNum > 100 ? '99+' : infosNum)), /*#__PURE__*/_react["default"].createElement("img", {
231
234
  src: _bell3x["default"],
232
235
  className: (0, _classnames["default"])(_defineProperty({}, "".concat(prefixCls, "__msg-dot"), infosNum !== preData)),
233
236
  alt: ""
@@ -15,8 +15,6 @@ var _bsGlobal = require("../../utils/bs-global");
15
15
 
16
16
  var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"));
17
17
 
18
- var _useGlobalValue = _interopRequireDefault(require("./useGlobalValue"));
19
-
20
18
  var _menu = _interopRequireDefault(require("./components/menu"));
21
19
 
22
20
  var _userMessage = _interopRequireDefault(require("./components/user-message"));
@@ -27,12 +25,12 @@ var _version = _interopRequireDefault(require("./components/version"));
27
25
 
28
26
  var _utils = require("./utils");
29
27
 
28
+ require("./index.css");
29
+
30
30
  var _request = require("../../utils/request");
31
31
 
32
32
  var _toast = _interopRequireDefault(require("../toast"));
33
33
 
34
- require("./index.css");
35
-
36
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
35
 
38
36
  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); }
@@ -172,7 +170,5 @@ var NavTop = function NavTop() {
172
170
  }, /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null)));
173
171
  };
174
172
 
175
- var _default = NavTop; // @ts-ignore
176
-
177
- exports["default"] = _default;
178
- NavTop.useGlobalValue = _useGlobalValue["default"];
173
+ var _default = NavTop;
174
+ exports["default"] = _default;
@@ -81,6 +81,8 @@ var getMessages = function getMessages() {
81
81
  _axios["default"].interceptors.response.use(function (response) {
82
82
  return response;
83
83
  }, function (error) {
84
+ var _error$response;
85
+
84
86
  if (error.response) {
85
87
  switch (error.response.status) {
86
88
  case 401:
@@ -88,7 +90,7 @@ var getMessages = function getMessages() {
88
90
  }
89
91
  }
90
92
 
91
- return Promise.reject(error.response.data);
93
+ return Promise.reject(error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.data);
92
94
  });
93
95
 
94
96
  return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/RemindV2/Get?dateTime=").concat(year, "/").concat(month, "/").concat(date)).then(function (resp) {
@@ -13,10 +13,6 @@ var _okrPeriodSelector = _interopRequireDefault(require("../../../../okr-period-
13
13
 
14
14
  var _getLocale = require("../../../../../utils/getLocale");
15
15
 
16
- var _context = require("../../../context");
17
-
18
- var _helper = require("../../../helper");
19
-
20
16
  require("./index.css");
21
17
 
22
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -44,22 +40,14 @@ var DateCycle = function DateCycle(_ref) {
44
40
  _ref$canEdit = _ref.canEdit,
45
41
  canEdit = _ref$canEdit === void 0 ? false : _ref$canEdit;
46
42
 
47
- var _useContext = (0, _react.useContext)(_context.CommonContext),
48
- okrInfo = _useContext.okrInfo,
49
- approvalSetting = _useContext.approvalSetting;
50
-
51
- var canCycleEdit = canEdit && (0, _helper.getApprovalOkr)(approvalSetting, "changeOkrTime", okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes);
52
-
53
43
  var _useState = (0, _react.useState)(false),
54
44
  _useState2 = _slicedToArray(_useState, 2),
55
45
  isFocus = _useState2[0],
56
46
  setIsFocus = _useState2[1];
57
47
 
58
48
  var handleButtonFocus = (0, _react.useCallback)(function () {
59
- if (canCycleEdit) {
60
- setIsFocus(true);
61
- }
62
- }, [canCycleEdit]);
49
+ canEdit && setIsFocus(true);
50
+ }, [canEdit]);
63
51
  var handleButtonBlur = (0, _react.useCallback)(function () {
64
52
  setIsFocus(false);
65
53
  }, []);
@@ -69,10 +57,9 @@ var DateCycle = function DateCycle(_ref) {
69
57
  clickCallback = _ref2.clickCallback,
70
58
  text = _ref2.text;
71
59
  return /*#__PURE__*/_react["default"].createElement("button", {
72
- type: "button",
73
60
  onFocus: handleButtonFocus,
74
61
  onBlur: handleButtonBlur,
75
- className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!canCycleEdit && "base-info-date-cycle__button--disable"),
62
+ className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!canEdit && "base-info-date-cycle__button--disable"),
76
63
  ref: btnRef,
77
64
  onClick: clickCallback
78
65
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -91,13 +78,10 @@ var DateCycle = function DateCycle(_ref) {
91
78
  cycle: cycle,
92
79
  setCycle: setCycle,
93
80
  okrId: okrId,
94
- canEdit: canCycleEdit,
81
+ canEdit: canEdit,
95
82
  getCycleRange: true
96
83
  }));
97
84
  };
98
85
 
99
- DateCycle.defaultProps = {
100
- canEdit: false
101
- };
102
86
  var _default = DateCycle;
103
87
  exports["default"] = _default;
@@ -21,10 +21,6 @@ var _popConfirm = _interopRequireDefault(require("../../../../../components-v1/p
21
21
 
22
22
  var _getLocale = require("../../../../../utils/getLocale");
23
23
 
24
- var _context2 = require("../../../context");
25
-
26
- var _helper = require("../../../helper");
27
-
28
24
  require("./index.css");
29
25
 
30
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -64,10 +60,6 @@ var Principal = function Principal(_ref) {
64
60
  selectUser = _useState2[0],
65
61
  setSelectUser = _useState2[1];
66
62
 
67
- var _useContext = (0, _react.useContext)(_context2.CommonContext),
68
- okrInfo = _useContext.okrInfo,
69
- approvalSetting = _useContext.approvalSetting;
70
-
71
63
  var handleSelected = function handleSelected(_ref2) {
72
64
  var _ref3 = _slicedToArray(_ref2, 1),
73
65
  user = _ref3[0];
@@ -122,7 +114,7 @@ var Principal = function Principal(_ref) {
122
114
  }, (0, _getLocale.getLocale)("Mod_Owner")), /*#__PURE__*/_react["default"].createElement("div", {
123
115
  className: "base-info-other-infos__principal-user",
124
116
  ref: selectUserRef
125
- }, canEdit && (0, _helper.getApprovalOkr)(approvalSetting, "changeOkrName", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes) ? /*#__PURE__*/_react["default"].createElement(_popConfirm["default"], {
117
+ }, canEdit ? /*#__PURE__*/_react["default"].createElement(_popConfirm["default"], {
126
118
  ref: popConfirmRef,
127
119
  showArrow: false,
128
120
  style: {
@@ -31,8 +31,6 @@ var _progress = _interopRequireDefault(require("../../../progress"));
31
31
 
32
32
  var _utils = require("../../../progress/utils");
33
33
 
34
- var _helper = require("../../helper");
35
-
36
34
  var _tooltip = _interopRequireDefault(require("../../../tooltip"));
37
35
 
38
36
  var _auth = require("../../../../utils/auth");
@@ -87,8 +85,6 @@ function Header(props) {
87
85
  setGeneralOkrClassify = _useContext.setGeneralOkrClassify,
88
86
  showOkrEvalute = _useContext.showOkrEvalute;
89
87
 
90
- var commonContext = (0, _react.useContext)(_context.CommonContext);
91
- var approvalSetting = commonContext.approvalSetting;
92
88
  var showOScore = (_window = window) === null || _window === void 0 ? void 0 : (_window$BSGlobal = _window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$OkrA = _window$BSGlobal.OkrAdvancedSetting) === null || _window$BSGlobal$OkrA === void 0 ? void 0 : (_window$BSGlobal$OkrA2 = _window$BSGlobal$OkrA.KRSetting) === null || _window$BSGlobal$OkrA2 === void 0 ? void 0 : _window$BSGlobal$OkrA2.OScore;
93
89
  var _okrInfo$progressGrow = okrInfo.progressGrow,
94
90
  progressGrow = _okrInfo$progressGrow === void 0 ? 0 : _okrInfo$progressGrow,
@@ -160,7 +156,7 @@ function Header(props) {
160
156
  }, /*#__PURE__*/_react["default"].createElement("div", {
161
157
  className: "".concat(precls, "__avatar")
162
158
  }, /*#__PURE__*/_react["default"].createElement(_oAvatar["default"], {
163
- editable: editable && (okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState) !== 1,
159
+ editable: editable,
164
160
  okrId: okrInfo.workId
165
161
  })), /*#__PURE__*/_react["default"].createElement("div", {
166
162
  className: "".concat(precls, "__content")
@@ -168,10 +164,7 @@ function Header(props) {
168
164
  editable: editable,
169
165
  okrName: okrName,
170
166
  setIsEdit: setIsEdit,
171
- okrStatus: okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.status,
172
- OkrAndKrApprovalTypes: okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes,
173
- applyState: okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState,
174
- approvalSetting: approvalSetting
167
+ okrStatus: okrInfo.status
175
168
  }, /*#__PURE__*/_react["default"].createElement(_oClassify["default"], {
176
169
  editable: editable,
177
170
  okrId: okrInfo.workId,
@@ -194,7 +187,7 @@ function Header(props) {
194
187
  })), /*#__PURE__*/_react["default"].createElement("span", {
195
188
  className: "".concat(precls, "__action-item")
196
189
  }, /*#__PURE__*/_react["default"].createElement(_oCycle["default"], {
197
- editable: editable && (0, _helper.getApprovalOkr)(approvalSetting, "changeOkrTime", okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes),
190
+ editable: editable,
198
191
  okrId: okrInfo.workId
199
192
  })), /*#__PURE__*/_react["default"].createElement("span", {
200
193
  className: "".concat(precls, "__action-item")
@@ -13,8 +13,6 @@ var _getLocale = require("../../../../utils/getLocale");
13
13
 
14
14
  var _tools = require("../../../../utils/tools");
15
15
 
16
- var _helper = require("../../helper");
17
-
18
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
17
 
20
18
  function OName(props) {
@@ -22,16 +20,11 @@ function OName(props) {
22
20
  okrName = props.okrName,
23
21
  setIsEdit = props.setIsEdit,
24
22
  okrStatus = props.okrStatus,
25
- children = props.children,
26
- approvalSetting = props.approvalSetting,
27
- applyState = props.applyState,
28
- OkrAndKrApprovalTypes = props.OkrAndKrApprovalTypes;
23
+ children = props.children;
29
24
 
30
25
  var handleEditClick = function handleEditClick() {
31
- if ((0, _helper.getApprovalOkr)(approvalSetting, "changeOkrName", applyState, OkrAndKrApprovalTypes)) {
32
- if (editable) {
33
- setIsEdit(true);
34
- }
26
+ if (editable) {
27
+ setIsEdit(true);
35
28
  }
36
29
  };
37
30
 
@@ -84,11 +84,7 @@ function OClassify(props) {
84
84
 
85
85
  case 5:
86
86
  res = _context.sent;
87
-
88
- if (onOkrClassifyChange) {
89
- onOkrClassifyChange(select);
90
- }
91
-
87
+ onOkrClassifyChange(select);
92
88
  setVisible(false);
93
89
 
94
90
  _toast["default"].Success("修改成功", {
@@ -43,7 +43,7 @@ function _default(props) {
43
43
  hasAuth = props.hasAuth,
44
44
  status = props.status;
45
45
 
46
- var _useState = (0, _react.useState)("1"),
46
+ var _useState = (0, _react.useState)('1'),
47
47
  _useState2 = _slicedToArray(_useState, 2),
48
48
  level = _useState2[0],
49
49
  setLevel = _useState2[1];
@@ -59,7 +59,7 @@ function _default(props) {
59
59
  return /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
60
60
  onChange: onMenuClickHandler,
61
61
  checked: level,
62
- canEdit: hasAuth && status !== "5",
62
+ canEdit: hasAuth && status !== '5',
63
63
  limitHeight: false,
64
64
  trigger: /*#__PURE__*/_react["default"].createElement("span", {
65
65
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p").concat(level))
@@ -68,21 +68,21 @@ function _default(props) {
68
68
  name: "1"
69
69
  }, /*#__PURE__*/_react["default"].createElement("span", {
70
70
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p1 ").concat(_precls["default"], "__e-task-node-select-priority"))
71
- }), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Highest")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
71
+ }), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Highest')), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
72
72
  name: "2"
73
73
  }, /*#__PURE__*/_react["default"].createElement("span", {
74
74
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p2 ").concat(_precls["default"], "__e-task-node-select-priority"))
75
- }), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_High")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
75
+ }), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_High')), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
76
76
  name: "3"
77
77
  }, /*#__PURE__*/_react["default"].createElement("span", {
78
78
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p3 ").concat(_precls["default"], "__e-task-node-select-priority"))
79
- }), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Middle")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
79
+ }), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Middle')), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
80
80
  name: "4"
81
81
  }, /*#__PURE__*/_react["default"].createElement("span", {
82
82
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p4 ").concat(_precls["default"], "__e-task-node-select-priority"))
83
- }), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Low")), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
83
+ }), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Low')), /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
84
84
  name: "5"
85
85
  }, /*#__PURE__*/_react["default"].createElement("span", {
86
86
  className: (0, _classnames["default"])("".concat(_precls["default"], "__e-task-node-priority-p5 ").concat(_precls["default"], "__e-task-node-select-priority"))
87
- }), (0, _getLocale.getLocale)("OKR_MyO_E_Butt_Verylow")));
87
+ }), (0, _getLocale.getLocale)('OKR_MyO_E_Butt_Verylow')));
88
88
  }
@@ -47,8 +47,6 @@ var _EditKrWightModal = _interopRequireDefault(require("../../../../../edit-kr-w
47
47
 
48
48
  var _okrProgressModal = _interopRequireDefault(require("../../../../../okr-progress-modal"));
49
49
 
50
- var _helper = require("../../../../helper");
51
-
52
50
  var _getLocale = require("../../../../../../utils/getLocale");
53
51
 
54
52
  require("./index.css");
@@ -96,12 +94,12 @@ function _default(props) {
96
94
  var data = props.data,
97
95
  index = props.index,
98
96
  title = props.title,
99
- key = props.key;
97
+ key = props.key,
98
+ canEditOkr = props.canEditOkr;
100
99
 
101
100
  var _useContext = (0, _react.useContext)(_context2.CommonContext),
102
101
  refreshAll = _useContext.refreshAll,
103
- okrInfo = _useContext.okrInfo,
104
- approvalSetting = _useContext.approvalSetting;
102
+ okrInfo = _useContext.okrInfo;
105
103
 
106
104
  var _useState = (0, _react.useState)(data.confidenceIndex),
107
105
  _useState2 = _slicedToArray(_useState, 2),
@@ -158,7 +156,7 @@ function _default(props) {
158
156
  var hasAuth = new _auth.KRAuth({
159
157
  user: data.user,
160
158
  createUserId: data.createUserId
161
- }).hasAuth();
159
+ }).hasAuth() || canEditOkr;
162
160
  var livetime = okrInfo.status != 2;
163
161
  return hasAuth && livetime;
164
162
  }),
@@ -303,9 +301,7 @@ function _default(props) {
303
301
  _drawerManager["default"].open("krDetail", {
304
302
  krId: data.mileStoneId
305
303
  });
306
- }; // console.log('okrInfo',okrInfo?.OkrAndKrApprovalTypes)
307
- // console.log('data',data?.KrApprovalTypes)
308
-
304
+ };
309
305
 
310
306
  return /*#__PURE__*/_react["default"].createElement("div", {
311
307
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node"))
@@ -320,7 +316,7 @@ function _default(props) {
320
316
  }, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("span", {
321
317
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-title"))
322
318
  }, /*#__PURE__*/_react["default"].createElement(_editableInput["default"], {
323
- editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, "changeOkrName", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes),
319
+ editable: krCanEdit,
324
320
  defaultValue: krName,
325
321
  emptyMessage: "KR\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",
326
322
  onKeyDown: onKrNameChangeHandler,
@@ -334,10 +330,10 @@ function _default(props) {
334
330
  name: user.name,
335
331
  id: user.userId,
336
332
  width: 68,
337
- editable: krCanEdit && okrInfo.applyState !== _helper.EApproveStatus.UnderApproval,
333
+ editable: krCanEdit,
338
334
  onEditUser: onEditUserHandler,
339
335
  nameTips: function nameTips(name) {
340
- return /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_Text_Owner'), name);
336
+ return /*#__PURE__*/_react["default"].createElement("span", null, "\u8D1F\u8D23\u4EBA\uFF1A", name);
341
337
  }
342
338
  })), showKrWeight && /*#__PURE__*/_react["default"].createElement(OkrRowColumn, {
343
339
  width: 60,
@@ -353,7 +349,7 @@ function _default(props) {
353
349
  marginLeft: 16
354
350
  }, /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
355
351
  data: data,
356
- editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, "changeOkrTime", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes)
352
+ editable: krCanEdit
357
353
  })), /*#__PURE__*/_react["default"].createElement("div", {
358
354
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-actions"))
359
355
  }, showHeart && /*#__PURE__*/_react["default"].createElement("div", {
@@ -382,7 +378,7 @@ function _default(props) {
382
378
  evaluateValue: evaluateValue,
383
379
  setEvaluateValue: onEvaluateChangeHanler,
384
380
  isEvaluate: isEvaluate
385
- })), krCanEdit && okrInfo.applyState !== _helper.EApproveStatus.UnderApproval && /*#__PURE__*/_react["default"].createElement("div", {
381
+ })), krCanEdit && /*#__PURE__*/_react["default"].createElement("div", {
386
382
  className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-delete")),
387
383
  onClick: function onClick() {
388
384
  return setDeleteModalVisible(true);
@@ -15,6 +15,10 @@ var _requestApis = require("../../../../request-apis");
15
15
 
16
16
  var _rangePickerPop = _interopRequireDefault(require("../../../../../range-picker-pop"));
17
17
 
18
+ var _toast = _interopRequireDefault(require("../../../../../toast"));
19
+
20
+ var _getLocale = require("../../../../../../utils/getLocale");
21
+
18
22
  require("./index.css");
19
23
 
20
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -68,6 +72,12 @@ function _default(props) {
68
72
  kr: data,
69
73
  startDate: startDate,
70
74
  endDate: endDate
75
+ }).then(function (resp) {
76
+ if (resp.Code === 1) {
77
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
78
+ } else {
79
+ _toast["default"].Error(resp.Message);
80
+ }
71
81
  });
72
82
  rangePicker.current.setRange({
73
83
  startDate: startDate,
@@ -22,8 +22,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
22
22
  var addShareButton = function addShareButton(_ref, actions) {
23
23
  var openShareModal = _ref.openShareModal;
24
24
  actions.push({
25
- icon: "tu-icon-fenxiang",
26
- title: (0, _getLocale.getLocale)("OKR_MyO_Share"),
25
+ icon: 'tu-icon-fenxiang',
26
+ title: (0, _getLocale.getLocale)('OKR_MyO_Share'),
27
27
  onClick: openShareModal
28
28
  });
29
29
  };
@@ -34,22 +34,22 @@ var addVisibilityButton = function addVisibilityButton(_ref2, actions) {
34
34
  detailInfo = _ref2.detailInfo,
35
35
  changeVisiblilty = _ref2.changeVisiblilty;
36
36
  var children = [{
37
- title: (0, _getLocale.getLocale)("OKR_MyO_Pop_Public"),
37
+ title: (0, _getLocale.getLocale)('OKR_MyO_Pop_Public'),
38
38
  onClick: function onClick() {
39
39
  return changeVisiblilty(1);
40
40
  }
41
41
  }, {
42
- title: (0, _getLocale.getLocale)("OKR_MyO_From_Associatedmem"),
42
+ title: (0, _getLocale.getLocale)('OKR_MyO_From_Associatedmem'),
43
43
  onClick: function onClick() {
44
44
  return changeVisiblilty(2);
45
45
  }
46
46
  }, {
47
- title: (0, _getLocale.getLocale)("OKR_MyO_Pop_Directrep"),
47
+ title: (0, _getLocale.getLocale)('OKR_MyO_Pop_Directrep'),
48
48
  onClick: function onClick() {
49
49
  return changeVisiblilty(3);
50
50
  }
51
51
  }, {
52
- title: (0, _getLocale.getLocale)("OKR_MyO_Pop_Specified"),
52
+ title: (0, _getLocale.getLocale)('OKR_MyO_Pop_Specified'),
53
53
  onClick: function onClick() {
54
54
  return changeVisiblilty(4);
55
55
  }
@@ -58,8 +58,8 @@ var addVisibilityButton = function addVisibilityButton(_ref2, actions) {
58
58
  var editable = auth.hasAuth() && detailInfo.status === _enums.OkrStatus.inProgress;
59
59
 
60
60
  actions.push({
61
- icon: visibility !== 1 ? "tu-icon-simi-icon" : "tu-icon-gongkai",
62
- title: children[visibility - 1].title + (0, _getLocale.getLocale)("OKR_MyO_Text_Visible"),
61
+ icon: visibility !== 1 ? 'tu-icon-simi-icon' : 'tu-icon-gongkai',
62
+ title: children[visibility - 1].title + (0, _getLocale.getLocale)('OKR_MyO_Text_Visible'),
63
63
  children: editable ? children : null
64
64
  });
65
65
  };
@@ -69,7 +69,7 @@ var addFollowButton = function addFollowButton(_ref3, actions) {
69
69
  onChangeOkrFollow = _ref3.onChangeOkrFollow;
70
70
 
71
71
  // 未开启关注目标功能
72
- if (!(0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting.TargetFollowers) {
72
+ if (!(0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting.TargetFollowers) {
73
73
  return;
74
74
  } // 是负责人或是内部成员不能关注目标
75
75
 
@@ -81,8 +81,8 @@ var addFollowButton = function addFollowButton(_ref3, actions) {
81
81
 
82
82
  if (roleType === _enums.OkrRole.follower) {
83
83
  actions.push({
84
- icon: "okr-drawer-header-followed",
85
- title: (0, _getLocale.getLocale)("OKR_MyO_Butt_Unfollow"),
84
+ icon: 'okr-drawer-header-followed',
85
+ title: (0, _getLocale.getLocale)('OKR_MyO_Butt_Unfollow'),
86
86
  onClick: function onClick() {
87
87
  return onChangeOkrFollow(false);
88
88
  }
@@ -92,8 +92,8 @@ var addFollowButton = function addFollowButton(_ref3, actions) {
92
92
 
93
93
 
94
94
  actions.push({
95
- icon: "tu-icon-APP-shoucang",
96
- title: "关注目标",
95
+ icon: 'tu-icon-APP-shoucang',
96
+ title: '关注目标',
97
97
  onClick: function onClick() {
98
98
  return onChangeOkrFollow(true);
99
99
  }
@@ -106,8 +106,8 @@ var addExitButton = function addExitButton(_ref4, actions) {
106
106
 
107
107
  if (roleType === _enums.OkrRole.member) {
108
108
  actions.push({
109
- icon: "tu-icon-tuichu",
110
- title: (0, _getLocale.getLocale)("Pro_Admin_pop_Withdraw"),
109
+ icon: 'tu-icon-tuichu',
110
+ title: (0, _getLocale.getLocale)('Pro_Admin_pop_Withdraw'),
111
111
  onClick: onQuit
112
112
  });
113
113
  }
@@ -121,16 +121,16 @@ var addFinishOrReopenButton = function addFinishOrReopenButton(_ref5, actions) {
121
121
 
122
122
  if (detailInfo.status === _enums.OkrStatus.inProgress) {
123
123
  actions.push({
124
- icon: "tu-icon-liebiao-jieshu",
125
- title: (0, _getLocale.getLocale)("OKR_MyO_EndObjective"),
124
+ icon: 'tu-icon-liebiao-jieshu',
125
+ title: (0, _getLocale.getLocale)('OKR_MyO_EndObjective'),
126
126
  onClick: function onClick() {
127
127
  return onFinishOrReOpen(true);
128
128
  }
129
129
  });
130
130
  } else {
131
131
  actions.push({
132
- icon: "tu-icon-gengxin1",
133
- title: "重启目标",
132
+ icon: 'tu-icon-gengxin1',
133
+ title: '重启目标',
134
134
  onClick: function onClick() {
135
135
  return onFinishOrReOpen(false);
136
136
  }
@@ -141,8 +141,8 @@ var addFinishOrReopenButton = function addFinishOrReopenButton(_ref5, actions) {
141
141
  var addCopyButton = function addCopyButton(_ref6, actions) {
142
142
  var onCopyOkr = _ref6.onCopyOkr;
143
143
  actions.push({
144
- icon: "tu-icon-liebiao-fuzhi",
145
- title: (0, _getLocale.getLocale)("OKR_MyO_Butt_CopyObjective"),
144
+ icon: 'tu-icon-liebiao-fuzhi',
145
+ title: (0, _getLocale.getLocale)('OKR_MyO_Butt_CopyObjective'),
146
146
  onClick: function onClick() {
147
147
  return onCopyOkr();
148
148
  }
@@ -154,8 +154,8 @@ var addDeleteButton = function addDeleteButton(_ref7, actions) {
154
154
  onDeleteOkr = _ref7.onDeleteOkr;
155
155
  if (!auth.hasAuth()) return;
156
156
  actions.push({
157
- icon: "tu-icon-del",
158
- title: (0, _getLocale.getLocale)("OKR_MyO_Butt_DeleteO"),
157
+ icon: 'tu-icon-del',
158
+ title: (0, _getLocale.getLocale)('OKR_MyO_Butt_DeleteO'),
159
159
  onClick: onDeleteOkr
160
160
  });
161
161
  }; // const addDetailButton: ActionDealFunction = ({ detailInfo }, actions) => {