@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
@@ -27,8 +27,6 @@ var _schedule = _interopRequireDefault(require("./schedule"));
27
27
 
28
28
  var _requestApis = require("./request-apis");
29
29
 
30
- var _helper = require("./helper");
31
-
32
30
  var _okrReview = _interopRequireDefault(require("../okr-review"));
33
31
 
34
32
  var _reportList = _interopRequireDefault(require("../eReport/eReportLists/reportList"));
@@ -79,7 +77,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
79
77
 
80
78
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
81
79
 
82
- var preCls = "okr-detail"; // E周报和复盘开关
80
+ var preCls = 'okr-detail'; // E周报和复盘开关
83
81
 
84
82
  var EWorkReport = BSGlobal.OkrAdvancedSetting ? BSGlobal.OkrAdvancedSetting.KRSetting.EWorkReport : false;
85
83
  var OkrAnalyse = BSGlobal.OkrAdvancedSetting ? BSGlobal.OkrAdvancedSetting.KRSetting.OkrAnalyse : false;
@@ -98,20 +96,20 @@ function OkrDetail(props) {
98
96
  okrInfo = _useState4[0],
99
97
  setOkrInfo = _useState4[1];
100
98
 
101
- var _useState5 = (0, _react.useState)(props.activeTabKey || "okr"),
99
+ var _useState5 = (0, _react.useState)(props.activeTabKey || 'okr'),
102
100
  _useState6 = _slicedToArray(_useState5, 2),
103
101
  activeTabKey = _useState6[0],
104
102
  setActiveTabKey = _useState6[1];
105
103
 
106
104
  var drawerManagerContext = (0, _react.useContext)(_context2["default"]);
107
105
 
108
- var _useState7 = (0, _react.useState)(""),
106
+ var _useState7 = (0, _react.useState)(''),
109
107
  _useState8 = _slicedToArray(_useState7, 2),
110
108
  errorMsg = _useState8[0],
111
109
  setErrorMsg = _useState8[1];
112
110
 
113
111
  var changeTabActive = function changeTabActive(key) {
114
- if (!"okr,exec,progress,cooperation,eReport,review,baseInfo".match(key)) {
112
+ if (!'okr,exec,progress,cooperation,eReport,review,baseInfo'.match(key)) {
115
113
  return console.log("\u672A\u627E\u5230\u5BF9\u5E94\u7684tab\u9875\u7B7E: ".concat(key));
116
114
  }
117
115
 
@@ -120,7 +118,7 @@ function OkrDetail(props) {
120
118
  });
121
119
  setActiveTabKey(key);
122
120
 
123
- if (key == "cooperation") {
121
+ if (key == 'cooperation') {
124
122
  bottomReply.current.show(undefined, false);
125
123
  } else {
126
124
  bottomReply.current.hide();
@@ -175,14 +173,7 @@ function OkrDetail(props) {
175
173
  var _useState23 = (0, _react.useState)(),
176
174
  _useState24 = _slicedToArray(_useState23, 2),
177
175
  generalRoleType = _useState24[0],
178
- setGeneralRoleType = _useState24[1];
179
-
180
- var _useState25 = (0, _react.useState)({
181
- isOpen: false
182
- }),
183
- _useState26 = _slicedToArray(_useState25, 2),
184
- approvalSetting = _useState26[0],
185
- setApprovalSetting = _useState26[1]; // 计算元素的ref,用于实现 tabs 吸顶,点赞吸底
176
+ setGeneralRoleType = _useState24[1]; // 计算元素的ref,用于实现 tabs 吸顶,点赞吸底
186
177
 
187
178
 
188
179
  var tabRef = (0, _react.useRef)();
@@ -193,7 +184,7 @@ function OkrDetail(props) {
193
184
  var okrListRef = (0, _react.useRef)();
194
185
  var onAfterReply = (0, _react.useCallback)(function () {
195
186
  communicationRef && communicationRef.current && communicationRef.current.refresh();
196
- setActiveTabKey("cooperation");
187
+ setActiveTabKey('cooperation');
197
188
  }, []);
198
189
 
199
190
  var getData = function getData() {
@@ -212,18 +203,9 @@ function OkrDetail(props) {
212
203
  getData();
213
204
  };
214
205
 
215
- var getApprovalShow = function getApprovalShow() {
216
- (0, _requestApis.getOkrApprovalSettingInfo)().then(function (resp) {
217
- if (resp.Code === 1) {
218
- setApprovalSetting((0, _helper.getApprovalOpenItem)(resp.Data));
219
- }
220
- });
221
- };
222
-
223
206
  (0, _react.useEffect)(function () {
224
207
  setLoading(true);
225
208
  getData();
226
- getApprovalShow();
227
209
  }, []);
228
210
  (0, _react.useEffect)(function () {
229
211
  if (!okrInfo || !okrInfo.workId) return;
@@ -268,19 +250,19 @@ function OkrDetail(props) {
268
250
 
269
251
  var onScrollHandler = function onScrollHandler() {
270
252
  // tabs 粘顶
271
- var tabsNav = tabsContnetRef.current.querySelector(".rc-tabs-nav");
272
- if (bodyRef.current.scrollTop > 98) tabsNav.classList.add("okr-tabs-fixed-top");else tabsNav.classList.remove("okr-tabs-fixed-top");
253
+ var tabsNav = tabsContnetRef.current.querySelector('.rc-tabs-nav');
254
+ if (bodyRef.current.scrollTop > 98) tabsNav.classList.add('okr-tabs-fixed-top');else tabsNav.classList.remove('okr-tabs-fixed-top');
273
255
  };
274
256
 
275
257
  var handleContainerMouseDown = (0, _react.useCallback)(function () {
276
- if (activeTabKey == "cooperation") return;
258
+ if (activeTabKey == 'cooperation') return;
277
259
  bottomReply && bottomReply.current && bottomReply.current.hide();
278
260
  }, [activeTabKey]);
279
261
 
280
262
  var refreshKrs = function refreshKrs() {
281
- var active = activeTabKey || "okr";
263
+ var active = activeTabKey || 'okr';
282
264
 
283
- if (active == "okr") {
265
+ if (active == 'okr') {
284
266
  okrListRef.current && okrListRef.current.updateKrs();
285
267
  }
286
268
  };
@@ -294,8 +276,7 @@ function OkrDetail(props) {
294
276
  changeTabActive: changeTabActive,
295
277
  refreshAll: refreshAll,
296
278
  setOkrInfo: setOkrInfo,
297
- refreshKrs: refreshKrs,
298
- approvalSetting: approvalSetting
279
+ refreshKrs: refreshKrs
299
280
  })
300
281
  }, /*#__PURE__*/_react["default"].createElement(_context.GeneralDataContext.Provider, {
301
282
  value: {
@@ -338,7 +319,7 @@ function OkrDetail(props) {
338
319
  activeKey: activeTabKey,
339
320
  onChange: changeTabActive,
340
321
  tabBarStyle: {
341
- boxShadow: "0px 0px 24px 0px rgba(127, 145, 180, 0.2)"
322
+ boxShadow: '0px 0px 24px 0px rgba(127, 145, 180, 0.2)'
342
323
  }
343
324
  }, /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
344
325
  tab: "OKRs",
@@ -352,7 +333,7 @@ function OkrDetail(props) {
352
333
  okrInfo: okrInfo,
353
334
  ref: okrListRef
354
335
  }))), /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
355
- tab: (0, _getLocale.getLocale)("OKR_MyO_Exec_Tab_Execution"),
336
+ tab: (0, _getLocale.getLocale)('OKR_MyO_Exec_Tab_Execution'),
356
337
  key: "exec"
357
338
  }, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
358
339
  style: {
@@ -362,7 +343,7 @@ function OkrDetail(props) {
362
343
  okrId: okrId,
363
344
  okrInfo: okrInfo
364
345
  }))), /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
365
- tab: (0, _getLocale.getLocale)("Feed_Tab_Title_Progress"),
346
+ tab: (0, _getLocale.getLocale)('Feed_Tab_Title_Progress'),
366
347
  key: "progress"
367
348
  }, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
368
349
  style: {
@@ -371,7 +352,7 @@ function OkrDetail(props) {
371
352
  }, /*#__PURE__*/_react["default"].createElement(_schedule["default"], {
372
353
  okrInfo: okrInfo
373
354
  }))), /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
374
- tab: (0, _getLocale.getLocale)("OKR_MyO_KRP_nteract"),
355
+ tab: (0, _getLocale.getLocale)('OKR_MyO_KRP_nteract'),
375
356
  key: "cooperation"
376
357
  }, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
377
358
  style: {
@@ -388,7 +369,7 @@ function OkrDetail(props) {
388
369
  },
389
370
  communicationRef: communicationRef
390
371
  }))), EWorkReport && source != 861 && /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
391
- tab: (0, _getLocale.getLocale)("OKR_MyO_Ew_Tab_Eweekly"),
372
+ tab: (0, _getLocale.getLocale)('OKR_MyO_Ew_Tab_Eweekly'),
392
373
  key: "eReport"
393
374
  }, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
394
375
  style: {
@@ -400,7 +381,7 @@ function OkrDetail(props) {
400
381
  okrName: okrInfo.workName,
401
382
  isVisible: okrInfo.visibility
402
383
  }))), OkrAnalyse && /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
403
- tab: (0, _getLocale.getLocale)("OKR_MyO_KRP_Review"),
384
+ tab: (0, _getLocale.getLocale)('OKR_MyO_KRP_Review'),
404
385
  key: "review"
405
386
  }, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
406
387
  style: {
@@ -421,7 +402,7 @@ function OkrDetail(props) {
421
402
  endDate: okrInfo.endDate
422
403
  }
423
404
  }))), /*#__PURE__*/_react["default"].createElement(_tabs.TabPane, {
424
- tab: (0, _getLocale.getLocale)("Per_Ass_New_title_text_BasicIn"),
405
+ tab: (0, _getLocale.getLocale)('Per_Ass_New_title_text_BasicIn'),
425
406
  key: "baseInfo"
426
407
  }, /*#__PURE__*/_react["default"].createElement(_tabPanelContent["default"], {
427
408
  style: {
@@ -437,7 +418,7 @@ function OkrDetail(props) {
437
418
  feedId: okrInfo.feedId,
438
419
  ref: bottomReply,
439
420
  onAfterSubmit: onAfterReply,
440
- isFocusReply: props.activeTabKey === "cooperation"
421
+ isFocusReply: props.activeTabKey === 'cooperation'
441
422
  })) : /*#__PURE__*/_react["default"].createElement(_loading["default"], {
442
423
  type: "zone"
443
424
  }))));
@@ -43,8 +43,6 @@ var _auth = require("../../../utils/auth");
43
43
 
44
44
  var _getLocale = require("../../../utils/getLocale");
45
45
 
46
- var _helper = require("../helper");
47
-
48
46
  require("./index.css");
49
47
 
50
48
  var _excluded = ["mileStoneId"];
@@ -98,6 +96,7 @@ var preCls = "okr-detail-okrs-list";
98
96
 
99
97
  var treeDataFormate = function treeDataFormate(nodes) {
100
98
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "kr";
99
+ var canEditOkr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
101
100
  var formateNodes = [];
102
101
  nodes.forEach(function (it, index) {
103
102
  var title = "";
@@ -109,7 +108,8 @@ var treeDataFormate = function treeDataFormate(nodes) {
109
108
  title: title,
110
109
  isLeaf: true,
111
110
  nodeType: type,
112
- data: it
111
+ data: it,
112
+ canEditOkr: canEditOkr
113
113
  });
114
114
  });
115
115
  return formateNodes;
@@ -153,8 +153,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
153
153
  setShowOkrEvalute = _useContext.setShowOkrEvalute;
154
154
 
155
155
  var _useContext2 = (0, _react.useContext)(_context2.CommonContext),
156
- refreshAll = _useContext2.refreshAll,
157
- approvalSetting = _useContext2.approvalSetting;
156
+ refreshAll = _useContext2.refreshAll;
158
157
 
159
158
  var parentId = generalParent.parentId,
160
159
  parentOkr = generalParent.parentOkr,
@@ -275,9 +274,9 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
275
274
  updateKrs();
276
275
  }, []);
277
276
  (0, _react.useEffect)(function () {
278
- var strucKrs = treeDataFormate(pureKrs, "kr");
277
+ var strucKrs = treeDataFormate(pureKrs, "kr", canEditOkr);
279
278
  setKrs(strucKrs);
280
- }, [pureKrs]);
279
+ }, [pureKrs, canEditOkr]);
281
280
 
282
281
  var onAddKrHandler = function onAddKrHandler(kr) {
283
282
  refreshAll();
@@ -443,11 +442,9 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
443
442
  padding: "0 32px 0 18px"
444
443
  }, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
445
444
  data: krs,
446
- approvalSetting: approvalSetting,
447
- okrInfo: okrInfo,
448
- draggable: canEditOkr && (okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState) === _helper.EApproveStatus.UnderApproval,
445
+ draggable: canEditOkr,
449
446
  onDrop: onOkrItemDropHandler
450
- }))), (canEditOkr || isInnerUser) && (0, _helper.getApprovalOkr)(approvalSetting, "createOkr", okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes) && /*#__PURE__*/_react["default"].createElement("div", {
447
+ }))), (canEditOkr || isInnerUser) && /*#__PURE__*/_react["default"].createElement("div", {
451
448
  ref: wrapperRef,
452
449
  className: (0, _classnames["default"])("".concat(preCls, "__addkr"))
453
450
  }, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, createKrShow ? /*#__PURE__*/_react["default"].createElement(_createKrItem["default"], {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.workDelete = exports.updateVisibility = exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.updateProgressDesc = exports.updateProgress = exports.updateParentId = exports.updateOkrVisibility = exports.updateOkrPrincipal = exports.updateOkrName = exports.updateOScore = exports.updateOCommitType = exports.updateOClassify = exports.updateKrProgressAndStatus = exports.updateKrPrincipal = exports.updateKrName = exports.updateKrDate = exports.updateConfidenceIndex = exports.updateClassify = exports.updateChildOkrWeight = exports.transferPrincipal = exports.start = exports.setTaskPriority = exports.saveODesc = exports.remindAction = exports.krChangeOrder = exports.getRelWorks = exports.getRelProgress = exports.getProgress = exports.getPraiseComments = exports.getOrg = exports.getOkrUsers = exports.getOkrDetail = exports.getOkrApprovalSettingInfo = exports.getKrsByCondition = exports.getKrs = exports.getFeedById = exports.deleteUser = exports.deleteProgressDesc = exports.deleteKr = exports.createNewKr = exports.close = exports.cancelRel = exports.cancelPraise = exports.cancelParentOkr = exports.addUserRelation = exports.addUser = exports.addPraise = exports.addComment = void 0;
6
+ exports.workDelete = exports.updateVisibility = exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.updateProgressDesc = exports.updateProgress = exports.updateParentId = exports.updateOkrVisibility = exports.updateOkrPrincipal = exports.updateOkrName = exports.updateOScore = exports.updateOCommitType = exports.updateOClassify = exports.updateKrProgressAndStatus = exports.updateKrPrincipal = exports.updateKrName = exports.updateKrDate = exports.updateConfidenceIndex = exports.updateClassify = exports.updateChildOkrWeight = exports.transferPrincipal = exports.start = exports.setTaskPriority = exports.saveODesc = exports.remindAction = exports.krChangeOrder = exports.getRelWorks = exports.getRelProgress = exports.getProgress = exports.getPraiseComments = exports.getOrg = exports.getOkrUsers = exports.getOkrDetail = exports.getKrsByCondition = exports.getKrs = exports.getFeedById = exports.deleteUser = exports.deleteProgressDesc = exports.deleteKr = exports.createNewKr = exports.close = exports.cancelRel = exports.cancelPraise = exports.cancelParentOkr = exports.addUserRelation = exports.addUser = exports.addPraise = exports.addComment = void 0;
7
7
 
8
8
  var _qs = _interopRequireDefault(require("qs"));
9
9
 
@@ -110,12 +110,6 @@ var getOkrDetail = function getOkrDetail(_ref5) {
110
110
 
111
111
  exports.getOkrDetail = getOkrDetail;
112
112
 
113
- var getOkrApprovalSettingInfo = function getOkrApprovalSettingInfo() {
114
- return (0, _request.rget)("v1")("WorkManageSetting/GetOkrApproval");
115
- };
116
-
117
- exports.getOkrApprovalSettingInfo = getOkrApprovalSettingInfo;
118
-
119
113
  var updateClassify = function updateClassify(_ref6) {
120
114
  var okrId = _ref6.okrId,
121
115
  okrClassify = _ref6.okrClassify;
@@ -413,7 +407,7 @@ var deleteUser = function deleteUser(delUserId, okrId, relation) {
413
407
  exports.deleteUser = deleteUser;
414
408
 
415
409
  var workDelete = function workDelete(data) {
416
- return (0, _request.rdelete)("v1")("okr/deleteV2?workId=".concat(data.workId), {
410
+ return (0, _request.rdelete)("v2")("work/deleteV2?workId=".concat(data.workId), {
417
411
  data: data
418
412
  });
419
413
  };
@@ -421,7 +415,7 @@ var workDelete = function workDelete(data) {
421
415
  exports.workDelete = workDelete;
422
416
 
423
417
  var start = function start(okrId) {
424
- return (0, _request.rpost)("v1")("okr/Start", {
418
+ return (0, _request.rpost)("v1")("Work/Start", {
425
419
  work_id: okrId
426
420
  }, {
427
421
  headers: {
@@ -434,7 +428,7 @@ var start = function start(okrId) {
434
428
  exports.start = start;
435
429
 
436
430
  var close = function close(okrId) {
437
- return (0, _request.rpost)("v1")("okr/Close", {
431
+ return (0, _request.rpost)("v1")("Work/Close", {
438
432
  work_id: okrId
439
433
  }, {
440
434
  headers: {
@@ -58,7 +58,7 @@
58
58
 
59
59
  .titaui-okr-flow--node__kr {
60
60
  border: 1px solid rgba(90, 216, 166, 0.5);
61
- background: #EEFBF6;
61
+ background: #eefbf6;
62
62
  height: 96px;
63
63
  }
64
64
 
@@ -98,7 +98,7 @@
98
98
  flex: 1;
99
99
  font-size: 13px;
100
100
  font-weight: 400;
101
- color: #3F4755;
101
+ color: #3f4755;
102
102
  }
103
103
 
104
104
  .titaui-okr-flow--node-kr-progress {
@@ -202,7 +202,7 @@
202
202
  line-height: 24px;
203
203
  font-size: 12px;
204
204
  font-family: PingFangSC-Regular, PingFang SC;
205
- color: #6F7886;
205
+ color: #6f7886;
206
206
  }
207
207
 
208
208
  .titaui-okr-flow--node-weight:before {
@@ -224,7 +224,7 @@
224
224
  align-items: center;
225
225
  font-size: 12px;
226
226
  line-height: 24px;
227
- color: #6F7886;
227
+ color: #6f7886;
228
228
  }
229
229
 
230
230
  .titaui-okr-flow--node-progress .t-c-progress-circle {
@@ -413,7 +413,7 @@
413
413
  }
414
414
 
415
415
  .titaui-okr-flow__dark .titaui-okr-flow--node-status__normal {
416
- color: #1FA7FF;
416
+ color: #1fa7ff;
417
417
  background: #3b4e6e;
418
418
  }
419
419
 
@@ -432,7 +432,7 @@
432
432
  }
433
433
 
434
434
  .titaui-okr-flow__dark .titaui-okr-flow--node-kr-status__normal {
435
- color: #1FA7FF;
435
+ color: #1fa7ff;
436
436
  background: #3b4e6e;
437
437
  }
438
438
 
@@ -65,7 +65,7 @@ function WorkNode(_ref) {
65
65
  darkTheme = _ref.darkTheme;
66
66
  var workId = data.workId,
67
67
  _data$workName = data.workName,
68
- workName = _data$workName === void 0 ? "" : _data$workName,
68
+ workName = _data$workName === void 0 ? '' : _data$workName,
69
69
  okrType = data.okrType,
70
70
  departmentId = data.departmentId,
71
71
  departmentName = data.departmentName,
@@ -101,7 +101,7 @@ function WorkNode(_ref) {
101
101
 
102
102
  var getOkrTypeMap = function getOkrTypeMap() {
103
103
  return {
104
- 1: (0, _getLocale.getLocale)("OKR_MyO_Pop_Individual"),
104
+ 1: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
105
105
  // 2: <OpenDepartmentName id={departmentId} name={departmentName} />,
106
106
  2: /*#__PURE__*/_react["default"].createElement("img", {
107
107
  src: darkTheme ? whiteImg : departUrl,
@@ -110,8 +110,8 @@ function WorkNode(_ref) {
110
110
  },
111
111
  width: imgWidth
112
112
  }),
113
- 3: (0, _getLocale.getLocale)("OKR_MyO_Pop_Company"),
114
- 4: groupName || (0, _getLocale.getLocale)("OKR_MyO_Text_Team")
113
+ 3: (0, _getLocale.getLocale)('OKR_MyO_Pop_Company'),
114
+ 4: groupName || (0, _getLocale.getLocale)('OKR_MyO_Text_Team')
115
115
  };
116
116
  };
117
117
 
@@ -122,7 +122,7 @@ function WorkNode(_ref) {
122
122
  while (1) {
123
123
  switch (_context.prev = _context.next) {
124
124
  case 0:
125
- name = departmentName || "默认部门";
125
+ name = departmentName || '默认部门';
126
126
 
127
127
  if (!(0, _bsGlobal.isWx)()) {
128
128
  _context.next = 5;
@@ -133,15 +133,15 @@ function WorkNode(_ref) {
133
133
  return (0, _openDataPainter.getOpenData)({
134
134
  id: departmentId,
135
135
  name: departmentName,
136
- type: "departmentName"
136
+ type: 'departmentName'
137
137
  });
138
138
 
139
139
  case 4:
140
140
  name = _context.sent;
141
141
 
142
142
  case 5:
143
- getCanvasImg("white", name);
144
- getCanvasImg("dark", name);
143
+ getCanvasImg('white', name);
144
+ getCanvasImg('dark', name);
145
145
 
146
146
  case 7:
147
147
  case "end":
@@ -157,11 +157,11 @@ function WorkNode(_ref) {
157
157
  }();
158
158
 
159
159
  var getCanvasImg = function getCanvasImg() {
160
- var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "white";
160
+ var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'white';
161
161
  var name = arguments.length > 1 ? arguments[1] : undefined;
162
- var canvas = document.createElement("canvas");
163
- var ctx = canvas.getContext("2d");
164
- var font = "normal 12px/24px -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei";
162
+ var canvas = document.createElement('canvas');
163
+ var ctx = canvas.getContext('2d');
164
+ var font = 'normal 12px/24px -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei';
165
165
  ctx.font = font; // const fitStr = fittingString(ctx, name, 92);
166
166
 
167
167
  var _ctx$measureText = ctx.measureText(name),
@@ -170,11 +170,11 @@ function WorkNode(_ref) {
170
170
  var actualWidth = Math.min(width, 92);
171
171
  (0, _openDataPainter.setSize)(canvas, ctx, actualWidth, 24);
172
172
  setImgWidth(actualWidth);
173
- ctx.textBaseline = "middle";
173
+ ctx.textBaseline = 'middle';
174
174
  ctx.font = font;
175
- ctx.fillStyle = theme == "white" ? "#FFFFFF" : "#6f7886";
175
+ ctx.fillStyle = theme == 'white' ? '#FFFFFF' : '#6f7886';
176
176
  ctx.fillText(name, 0, 12);
177
- theme == "white" ? setWhiteImg(canvas.toDataURL()) : setDepartUrl(canvas.toDataURL());
177
+ theme == 'white' ? setWhiteImg(canvas.toDataURL()) : setDepartUrl(canvas.toDataURL());
178
178
  };
179
179
 
180
180
  (0, _react.useEffect)(function () {
@@ -184,13 +184,13 @@ function WorkNode(_ref) {
184
184
  }, []);
185
185
 
186
186
  var openODetail = function openODetail(id) {
187
- _drawerManager["default"].open("okrDetail", {
187
+ _drawerManager["default"].open('okrDetail', {
188
188
  okrId: workId
189
189
  });
190
190
  };
191
191
 
192
192
  var openKr = function openKr(id) {
193
- _drawerManager["default"].open("krDetail", {
193
+ _drawerManager["default"].open('krDetail', {
194
194
  krId: id
195
195
  });
196
196
  };
@@ -206,7 +206,7 @@ function WorkNode(_ref) {
206
206
 
207
207
  switch (cycleTypeCopy) {
208
208
  case 0:
209
- return (0, _getLocale.getLocale)("Mod_Customization");
209
+ return (0, _getLocale.getLocale)('Mod_Customization');
210
210
 
211
211
  case 1:
212
212
  return "".concat(annualNum, "\u5E74");
@@ -221,15 +221,15 @@ function WorkNode(_ref) {
221
221
  return "".concat(yqmnum, "-").concat((yqmnum + 1) % 12 || 12, "\u6708");
222
222
 
223
223
  case 5:
224
- return "".concat(yqmnum == 1 ? "" : "", "\u534A\u5E74");
224
+ return "".concat(yqmnum == 1 ? '' : '', "\u534A\u5E74");
225
225
 
226
226
  case -1:
227
- return KrIndex ? "KR".concat(KrIndex) : "KR";
227
+ return KrIndex ? "KR".concat(KrIndex) : 'KR';
228
228
  }
229
229
  }; // 1:正常 2:有风险 3:过期 4:完成 5:过期完成 ,
230
230
 
231
231
 
232
- var riskLevelSuffix = ["normal", "normal", "risk", "expired", "complete", "complete_over", "normal"];
232
+ var riskLevelSuffix = ['normal', 'normal', 'risk', 'expired', 'complete', 'complete_over', 'normal'];
233
233
  if (!MapOkrVisible) return /*#__PURE__*/_react["default"].createElement("div", {
234
234
  className: (0, _classnames["default"])("".concat(_precls["default"], "--node"), "".concat(_precls["default"], "--node__private"))
235
235
  });
@@ -87,7 +87,7 @@ var ExportMapModal = function ExportMapModal(props) {
87
87
  mapInstance = _useState2[0],
88
88
  setMapInstance = _useState2[1];
89
89
 
90
- var _useState3 = (0, _react.useState)("none"),
90
+ var _useState3 = (0, _react.useState)('none'),
91
91
  _useState4 = _slicedToArray(_useState3, 2),
92
92
  bgColor = _useState4[0],
93
93
  setBgColor = _useState4[1];
@@ -123,12 +123,12 @@ var ExportMapModal = function ExportMapModal(props) {
123
123
  while (1) {
124
124
  switch (_context.prev = _context.next) {
125
125
  case 0:
126
- okrMapRef = document.querySelector(".titaui-okr-flow__export") || document.createElement("div");
126
+ okrMapRef = document.querySelector('.titaui-okr-flow__export') || document.createElement('div');
127
127
  width = okrMapRef.clientWidth; // 获取dom 宽度
128
128
 
129
129
  height = okrMapRef.clientHeight; // 获取dom 高度
130
130
 
131
- canvas = document.createElement("canvas"); // 创建一个canvas节点
131
+ canvas = document.createElement('canvas'); // 创建一个canvas节点
132
132
 
133
133
  scale = 20; // 定义任意放大倍数 支持小数
134
134
 
@@ -165,36 +165,50 @@ var ExportMapModal = function ExportMapModal(props) {
165
165
  }
166
166
  }
167
167
 
168
- var imgUrl = result.toDataURL("image/png"); // 得到图片的base64编码数据
168
+ var imgUrl = result.toDataURL('image/png'); // 得到图片的base64编码数据
169
+ // @ts-ignore
169
170
 
170
171
  // 得到图片的base64编码数据
171
- (0, _requestApis.getBase64DownloadUrl)(imgUrl.split(",")[1]).then(function (url) {
172
- var image = new Image();
173
- image.setAttribute("crossOrigin", "anonymous");
172
+ // @ts-ignore
173
+ window.titaTracker && window.titaTracker("action").record({
174
+ actionName: '我得到了图片' + imgUrl,
175
+ actionGroup: 'okr地图图片',
176
+ productName: 'okr地图导出'
177
+ });
178
+ (0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
179
+ var image = new Image(); // @ts-ignore
180
+
181
+ // @ts-ignore
182
+ window.titaTracker && window.titaTracker("action").record({
183
+ actionName: '我获得了地址' + url.Data.obj,
184
+ actionGroup: 'okr地图接口',
185
+ productName: 'okr地图导出'
186
+ });
187
+ image.setAttribute('crossOrigin', 'anonymous');
174
188
 
175
189
  image.onload = function () {
176
190
  if (!url.Data.obj) {
177
- _toast["default"].Error("导出失败,请稍后重试", {
191
+ _toast["default"].Error('导出失败,请稍后重试', {
178
192
  canClose: false
179
193
  });
180
194
  }
181
195
 
182
- var a = document.createElement("a"); // 生成一个a元素
196
+ var a = document.createElement('a'); // 生成一个a元素
183
197
 
184
198
  // 生成一个a元素
185
- var event = new MouseEvent("click"); // 创建一个单击事件
199
+ var event = new MouseEvent('click'); // 创建一个单击事件
186
200
 
187
201
  // 创建一个单击事件
188
- a.download = "okr地图"; // 设置图片名称
202
+ a.download = 'okr地图'; // 设置图片名称
189
203
 
190
204
  // 设置图片名称
191
- a.href = url.Data.obj; // 将生成的URL设置为a.href属性
205
+ a.href = url.Data.obj; // 将生成的URL设置为a
192
206
 
193
- // 将生成的URL设置为a.href属性
207
+ // 将生成的URL设置为a
194
208
  a.dispatchEvent(event); // 触发a的单击事件
195
209
 
196
210
  // 触发a的单击事件
197
- _toast["default"].Success("导出成功");
211
+ _toast["default"].Success('导出成功');
198
212
 
199
213
  setIsExport(false);
200
214
 
@@ -228,7 +242,7 @@ var ExportMapModal = function ExportMapModal(props) {
228
242
 
229
243
  var confirmHandler = function confirmHandler() {
230
244
  if (isExport) {
231
- _toast["default"].Warning("正在导出中", {
245
+ _toast["default"].Warning('正在导出中', {
232
246
  canClose: true
233
247
  });
234
248
 
@@ -244,7 +258,7 @@ var ExportMapModal = function ExportMapModal(props) {
244
258
  };
245
259
 
246
260
  var colorChangeHandler = function colorChangeHandler(colors) {
247
- setBgColor(colors ? colors.color : "none");
261
+ setBgColor(colors ? colors.color : 'none');
248
262
  };
249
263
 
250
264
  var NodeDebug = function NodeDebug() {
@@ -261,7 +275,7 @@ var ExportMapModal = function ExportMapModal(props) {
261
275
  };
262
276
 
263
277
  return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
264
- title: (0, _getLocale.getLocale)("OKR_Ali_Exportmap"),
278
+ title: (0, _getLocale.getLocale)('OKR_Ali_Exportmap'),
265
279
  noFooterLine: true,
266
280
  visible: visible,
267
281
  width: "1000px",
@@ -277,7 +291,7 @@ var ExportMapModal = function ExportMapModal(props) {
277
291
  style: {
278
292
  marginRight: 10
279
293
  }
280
- }, (0, _getLocale.getLocale)("OKR_Ali_Selectbackground")), /*#__PURE__*/_react["default"].createElement(_rcColorPicker["default"], {
294
+ }, (0, _getLocale.getLocale)('OKR_Ali_Selectbackground')), /*#__PURE__*/_react["default"].createElement(_rcColorPicker["default"], {
281
295
  animation: "slide-up",
282
296
  color: "#FFFFFF",
283
297
  onChange: colorChangeHandler,
@@ -308,7 +322,7 @@ var ExportMapModal = function ExportMapModal(props) {
308
322
  paneMoveable: false,
309
323
  style: {
310
324
  height: 600,
311
- width: "100%",
325
+ width: '100%',
312
326
  background: bgColor
313
327
  }
314
328
  }, /*#__PURE__*/_react["default"].createElement(NodeDebug, null)))))));