@titaui/pc 1.11.51 → 1.11.52-beta.11

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 (225) hide show
  1. package/lib/components/button/images/blue.svg +21 -0
  2. package/lib/components/button/images/red.svg +21 -0
  3. package/lib/components/button/images/white.svg +19 -0
  4. package/lib/components/button/rect-btn/index.js +3 -3
  5. package/lib/components/change-okr-modal/Item.js +19 -18
  6. package/lib/components/change-okr-modal/styledComponents.js +9 -9
  7. package/lib/components/checkbox/index.css +4 -0
  8. package/lib/components/contact-kefu/index.css +11 -1
  9. package/lib/components/contact-kefu/index.js +10 -4
  10. package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
  11. package/lib/components/create-okr-modal/fields/index.css +14 -3
  12. package/lib/components/create-okr-modal/fields/o-new-name.js +30 -19
  13. package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
  14. package/lib/components/create-okr-modal/index.js +200 -133
  15. package/lib/components/create-okr-modal/kr-items/index.css +23 -13
  16. package/lib/components/create-okr-modal/kr-items/krDatas.js +95 -76
  17. package/lib/components/create-okr-modal/kr-items/krItem.js +53 -56
  18. package/lib/components/create-okr-modal/style.js +5 -5
  19. package/lib/components/date-picker/BodyItem.js +3 -3
  20. package/lib/components/date-picker/CalendarHeader.js +3 -3
  21. package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
  22. package/lib/components/dynamic/constant.js +1 -1
  23. package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +8 -8
  24. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -8
  25. package/lib/components/dynamic/dynamic-list/index.js +14 -7
  26. package/lib/components/dynamic/index.js +9 -12
  27. package/lib/components/dynamic/request-api.js +7 -68
  28. package/lib/components/eReport/eReportLists/reportList.js +3 -3
  29. package/lib/components/emotions-selector/selector-pop.js +3 -3
  30. package/lib/components/ereport-list/index.js +3 -3
  31. package/lib/components/mblog/components/MblogAction.js +3 -3
  32. package/lib/components/menus/export-modules/appraisal-menus/menus.js +11 -9
  33. package/lib/components/nav-top/components/menu/index.js +18 -16
  34. package/lib/components/nav-top/index.js +2 -2
  35. package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
  36. package/lib/components/okr-detail/components/header/edit-name.js +86 -40
  37. package/lib/components/okr-detail/components/header/index.css +120 -41
  38. package/lib/components/okr-detail/components/header/index.js +36 -46
  39. package/lib/components/okr-detail/components/header/o-classify.js +152 -0
  40. package/lib/components/okr-detail/components/header/o-name.js +7 -5
  41. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
  42. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +58 -4
  43. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +159 -63
  44. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
  45. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
  46. package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +15 -13
  47. package/lib/components/okr-detail/detail-header/index.js +8 -4
  48. package/lib/components/okr-detail/e-list/index.js +2 -2
  49. package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
  50. package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
  51. package/lib/components/okr-detail/request-apis.js +73 -69
  52. package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
  53. package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
  54. package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
  55. package/lib/components/okr-flow/child-node/kr-node.js +3 -1
  56. package/lib/components/okr-flow/child-node/work-node.js +3 -1
  57. package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
  58. package/lib/components/okr-progress/components/o-progress/index.js +3 -1
  59. package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
  60. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
  61. package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
  62. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
  63. package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
  64. package/lib/components/okr-share/common-painter/utils.js +183 -36
  65. package/lib/components/okr-share/index.css +5 -4
  66. package/lib/components/okr-share/pink-card/card.js +3 -3
  67. package/lib/components/okr-share/pink-card/drawKrs.js +93 -18
  68. package/lib/components/okr-share/pink-card/index.js +20 -12
  69. package/lib/components/open-data-painter/index.js +6 -5
  70. package/lib/components/period-selector/interface.js +7 -0
  71. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
  72. package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
  73. package/lib/components/rich-editor/models/schema.js +6 -6
  74. package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
  75. package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
  76. package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
  77. package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
  78. package/lib/components/rich-editor/plugins/core/index.js +4 -4
  79. package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
  80. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
  81. package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
  82. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
  83. package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
  84. package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
  85. package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
  86. package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
  87. package/lib/components/rich-editor/react/uiProvider.js +3 -3
  88. package/lib/components/rich-editor/ui/Popup/index.js +3 -3
  89. package/lib/components/search-input/index.css +1 -1
  90. package/lib/components/search-key-handle/index.js +9 -7
  91. package/lib/components/select/Option.js +3 -3
  92. package/lib/components/select-layer/index.css +1 -1
  93. package/lib/components/task-relation-modal/helper.js +139 -2
  94. package/lib/components/task-relation-modal/image/loading.gif +0 -0
  95. package/lib/components/task-relation-modal/index.js +9 -0
  96. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
  97. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +262 -0
  98. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
  99. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
  100. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +129 -0
  101. package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
  102. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
  103. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +185 -0
  104. package/lib/components/task-relation-modal/request-api.js +28 -2
  105. package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
  106. package/lib/components/task-relation-modal/search/principal.js +36 -19
  107. package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
  108. package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
  109. package/lib/components/{dynamic/dynamic-topping/index.js → task-relation-modal/search/task-relation.js} +45 -44
  110. package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
  111. package/lib/components/{dynamic/dynamic-liking/index.js → task-relation-modal/search/work-relation.js} +43 -39
  112. package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
  113. package/lib/components/task-relation-modal/tree/category-tree/index.css +3 -3
  114. package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
  115. package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
  116. package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
  117. package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
  118. package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
  119. package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
  120. package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
  121. package/lib/components/task-relation-modal/tree/work-tree/index.css +1 -1
  122. package/lib/components/task-relation-modal/tree-node/category-node/index.css +1 -12
  123. package/lib/components/task-relation-modal/tree-node/category-node/index.js +1 -3
  124. package/lib/components/task-relation-modal/tree-node/kr-node/index.css +0 -16
  125. package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -10
  126. package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +0 -16
  127. package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +0 -4
  128. package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
  129. package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
  130. package/lib/components/task-relation-modal/work-relation/index.css +0 -0
  131. package/lib/components/task-relation-modal/work-relation/index.js +256 -0
  132. package/lib/components/tita-chart/errorBoundary/index.js +3 -3
  133. package/lib/components/tooltip/index.js +3 -0
  134. package/lib/components/tooltip/tooltip-rows/index.css +26 -0
  135. package/lib/components/{dynamic/advertise → tooltip/tooltip-rows}/index.js +65 -85
  136. package/lib/components/user-selector/category-selector-panel/index.js +6 -1
  137. package/lib/components/{dynamic/quick-operation/components/create-task/index.js → user-selector/category-selector-panel/subordinate-tree.js} +37 -20
  138. package/lib/components/user-selector/constant.js +10 -2
  139. package/lib/components/user-selector/empty/index.css +5 -0
  140. package/lib/components/user-selector/empty/index.js +9 -3
  141. package/lib/components/user-selector/export-modules/depart-search-selector/index.js +45 -17
  142. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
  143. package/lib/components/user-selector/images/no-auth.png +0 -0
  144. package/lib/components/user-selector/request-apis.js +28 -9
  145. package/lib/components/user-selector/searched-panel/index.js +21 -7
  146. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
  147. package/lib/components/wechat-btn/index.css +5 -1
  148. package/lib/components-v1/animate/AnimateChild.js +3 -3
  149. package/lib/components-v1/avatar/index.js +3 -3
  150. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
  151. package/lib/components-v1/progress/CircleProgress.js +3 -3
  152. package/lib/components-v1/select/Option.js +3 -3
  153. package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
  154. package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
  155. package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
  156. package/lib/components-v1/userSelector/components/UserItem.js +3 -3
  157. package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
  158. package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
  159. package/lib/utils/open-data.js +213 -65
  160. package/lib/utils/planDataJson.js +11115 -0
  161. package/package.json +3 -2
  162. package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
  163. package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
  164. package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
  165. package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
  166. package/lib/components/dynamic/advertise/index.css +0 -21
  167. package/lib/components/dynamic/advertise/interface.js +0 -5
  168. package/lib/components/dynamic/advertise/util.js +0 -28
  169. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
  170. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
  171. package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
  172. package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
  173. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  174. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  175. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  176. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  177. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  178. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
  179. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
  180. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
  181. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  182. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  183. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  184. package/lib/components/dynamic/dynamic-liking/item.js +0 -75
  185. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  186. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
  187. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
  188. package/lib/components/dynamic/dynamic-topping/index.css +0 -141
  189. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  190. package/lib/components/dynamic/dynamic-topping/item.js +0 -153
  191. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  192. package/lib/components/dynamic/dynamic.css +0 -173
  193. package/lib/components/dynamic/dynamic.js +0 -428
  194. package/lib/components/dynamic/export-module/index.js +0 -37
  195. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  196. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  197. package/lib/components/dynamic/my-team/img/line.png +0 -0
  198. package/lib/components/dynamic/my-team/img/team.png +0 -0
  199. package/lib/components/dynamic/my-team/index.css +0 -184
  200. package/lib/components/dynamic/my-team/index.js +0 -263
  201. package/lib/components/dynamic/my-team/request-api.js +0 -52
  202. package/lib/components/dynamic/my-team/util.js +0 -20
  203. package/lib/components/dynamic/new-ui.css +0 -192
  204. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
  205. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
  206. package/lib/components/dynamic/online-broadcast/data.js +0 -95
  207. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
  208. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  209. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  210. package/lib/components/dynamic/online-broadcast/index.css +0 -46
  211. package/lib/components/dynamic/online-broadcast/index.js +0 -61
  212. package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
  213. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  214. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
  215. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  216. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
  217. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  218. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
  219. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  220. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  221. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  222. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  223. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  224. package/lib/components/dynamic/quick-operation/index.css +0 -51
  225. package/lib/components/dynamic/quick-operation/index.js +0 -120
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _getLocale = require("../../../../utils/getLocale");
13
+
14
+ var _searchInput = _interopRequireDefault(require("../../../search-input"));
15
+
16
+ var _okrStatusSelect = _interopRequireDefault(require("../../search/okr-status-select"));
17
+
18
+ var _principal = _interopRequireDefault(require("../../search/principal"));
19
+
20
+ var _helpers = require("../../../../utils/helpers");
21
+
22
+ var _workRelation = _interopRequireDefault(require("../../search/work-relation"));
23
+
24
+ require("./index.css");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ 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); }
29
+
30
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
+
32
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
33
+
34
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
35
+
36
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
37
+
38
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
39
+
40
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
41
+
42
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
43
+
44
+ function SearchForm(props) {
45
+ var _loginUser$UserAvatar;
46
+
47
+ var loginUser = (0, _helpers.getLoginUserInfo)();
48
+ var user = {
49
+ userId: loginUser.Id,
50
+ name: loginUser.Name,
51
+ avatar: {
52
+ original: loginUser === null || loginUser === void 0 ? void 0 : (_loginUser$UserAvatar = loginUser.UserAvatar) === null || _loginUser$UserAvatar === void 0 ? void 0 : _loginUser$UserAvatar.Original,
53
+ color: '#bc97eb'
54
+ }
55
+ };
56
+ var onChange = props.onChange;
57
+
58
+ var _useState = (0, _react.useState)(0),
59
+ _useState2 = _slicedToArray(_useState, 2),
60
+ status = _useState2[0],
61
+ setStatus = _useState2[1];
62
+
63
+ var _useState3 = (0, _react.useState)([user]),
64
+ _useState4 = _slicedToArray(_useState3, 2),
65
+ users = _useState4[0],
66
+ setUsers = _useState4[1];
67
+
68
+ var _useState5 = (0, _react.useState)(""),
69
+ _useState6 = _slicedToArray(_useState5, 2),
70
+ keyWords = _useState6[0],
71
+ setKeyWords = _useState6[1];
72
+
73
+ var _useState7 = (0, _react.useState)(0),
74
+ _useState8 = _slicedToArray(_useState7, 2),
75
+ relation = _useState8[0],
76
+ setRelation = _useState8[1];
77
+
78
+ var _useState9 = (0, _react.useState)([user]),
79
+ _useState10 = _slicedToArray(_useState9, 1),
80
+ initPerson = _useState10[0];
81
+
82
+ (0, _react.useEffect)(function () {
83
+ onChange({
84
+ status: status,
85
+ keyWords: keyWords,
86
+ userIds: users.reduce(function (res, cur, index) {
87
+ return "".concat(res).concat(index == 0 ? "" : ",").concat(cur.userId);
88
+ }, ""),
89
+ relation: relation
90
+ });
91
+ }, [status, keyWords, relation, users]);
92
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
93
+ className: "rel-work-tree__search-item"
94
+ }, /*#__PURE__*/_react["default"].createElement(_okrStatusSelect["default"], {
95
+ onChange: setStatus,
96
+ initValue: status
97
+ })), /*#__PURE__*/_react["default"].createElement("div", {
98
+ className: "rel-work-tree__search-item"
99
+ }, /*#__PURE__*/_react["default"].createElement(_principal["default"], {
100
+ multiple: false,
101
+ onChange: setUsers,
102
+ position: "bottomLeft",
103
+ initValue: initPerson,
104
+ setRelation: setRelation
105
+ })), /*#__PURE__*/_react["default"].createElement("div", {
106
+ className: "rel-okr-tree__search-item"
107
+ }, /*#__PURE__*/_react["default"].createElement(_workRelation["default"], {
108
+ onChange: setRelation,
109
+ initValue: relation
110
+ })), /*#__PURE__*/_react["default"].createElement("div", {
111
+ className: "rel-work-tree__search-item-keyword"
112
+ }, /*#__PURE__*/_react["default"].createElement(_searchInput["default"], {
113
+ onSearch: setKeyWords,
114
+ placeholder: (0, _getLocale.getLocale)("Mod_Enterkeywords"),
115
+ style: {
116
+ height: 32,
117
+ width: 240
118
+ }
119
+ })));
120
+ }
121
+
122
+ var _default = SearchForm;
123
+ exports["default"] = _default;
@@ -23,7 +23,7 @@
23
23
  overflow-y: scroll;
24
24
  }
25
25
 
26
- .rel-work-tree__content .rc-tree-treenode {
26
+ .rel-work-tree__content .rc-tree-list .rc-tree-treenode {
27
27
  margin-bottom: 8px;
28
28
  padding-left: 28px;
29
29
  }
@@ -13,17 +13,6 @@
13
13
  top: 1px;
14
14
  }
15
15
 
16
- .rel-category-node__pointer {
17
- position: absolute;
18
- top: -23px;
19
- left: -33px;
20
- width: 27px;
21
- height: 31px;
22
- border-left: 1px solid #e9ecf0;
23
- border-bottom: 1px solid #e9ecf0;
24
- border-bottom-left-radius: 6px;
25
- }
26
-
27
16
  .rel-category-node__name {
28
17
  flex: 1;
29
18
  margin-right: 40px;
@@ -37,7 +26,7 @@
37
26
  margin-right: 4px;
38
27
  }
39
28
 
40
- .rel-category-tree .rc-tree-treenode {
29
+ .rel-category-tree .rc-tree-list .rc-tree-treenode {
41
30
  overflow: unset !important;
42
31
  }
43
32
 
@@ -83,9 +83,7 @@ function CategoryNode(props) {
83
83
  onChange: onCheckHandler,
84
84
  id: data.id,
85
85
  checked: checked
86
- })), !isParent && /*#__PURE__*/_react["default"].createElement("span", {
87
- className: "".concat(precls, "__pointer")
88
- }), /*#__PURE__*/_react["default"].createElement("span", {
86
+ })), /*#__PURE__*/_react["default"].createElement("span", {
89
87
  className: "".concat(precls, "__name")
90
88
  }, /*#__PURE__*/_react["default"].createElement("span", {
91
89
  className: (0, _classnames["default"])("".concat(precls, "__name-icon"), {
@@ -17,22 +17,6 @@
17
17
  border: 1px solid #bfc7d5;
18
18
  }
19
19
 
20
- .rel-kr-node__pointer {
21
- position: absolute;
22
- top: -26px;
23
- left: -33px;
24
- width: 27px;
25
- height: 34px;
26
- border-left: 1px solid #e9ecf0;
27
- border-bottom: 1px solid #e9ecf0;
28
- border-bottom-left-radius: 6px;
29
- }
30
-
31
- .rel-kr-node__pointer-first {
32
- height: 26px;
33
- top: -20px;
34
- }
35
-
36
20
  .rel-kr-node__name {
37
21
  flex: 1;
38
22
  margin-right: 40px;
@@ -9,8 +9,6 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
12
  var _checkbox = _interopRequireDefault(require("../../../checkbox"));
15
13
 
16
14
  var _drawerManager = _interopRequireDefault(require("../../../drawer-manager"));
@@ -35,9 +33,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
35
33
 
36
34
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
37
35
 
38
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39
-
40
- var precls = "rel-kr-node";
36
+ var precls = 'rel-kr-node';
41
37
 
42
38
  function KrNode(props) {
43
39
  var data = props.data,
@@ -53,7 +49,7 @@ function KrNode(props) {
53
49
  removeSelected = _useContext.removeSelected;
54
50
 
55
51
  var openKrDrawer = function openKrDrawer() {
56
- _drawerManager["default"].open("krDetail", {
52
+ _drawerManager["default"].open('krDetail', {
57
53
  krId: data.mileStoneId
58
54
  }, {
59
55
  zIndex: 1350
@@ -63,7 +59,7 @@ function KrNode(props) {
63
59
  var onCheckHandler = function onCheckHandler(checked) {
64
60
  if (checked) {
65
61
  addSelected({
66
- type: "kr",
62
+ type: 'kr',
67
63
  workId: data.workId,
68
64
  krId: data.mileStoneId,
69
65
  id: data.feedId,
@@ -93,14 +89,12 @@ function KrNode(props) {
93
89
  id: data.feedId,
94
90
  checked: checked
95
91
  })), /*#__PURE__*/_react["default"].createElement("span", {
96
- className: (0, _classnames["default"])("".concat(precls, "__pointer"), _defineProperty({}, "".concat(precls, "__pointer-first"), krIndex === 1))
97
- }), /*#__PURE__*/_react["default"].createElement("span", {
98
92
  className: "".concat(precls, "__name")
99
93
  }, /*#__PURE__*/_react["default"].createElement("span", {
100
94
  className: "".concat(precls, "__name-index")
101
95
  }, "KR", krIndex), /*#__PURE__*/_react["default"].createElement("span", {
102
96
  onClick: openKrDrawer
103
- }, (0, _tools.htmlDecodeByHtmlRegExp)(data.mileStoneName))), /*#__PURE__*/_react["default"].createElement("span", {
97
+ }, (0, _openData.parseString)((0, _tools.htmlDecodeByHtmlRegExp)(data.mileStoneName)))), /*#__PURE__*/_react["default"].createElement("span", {
104
98
  className: "".concat(precls, "__principle")
105
99
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
106
100
  text: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
@@ -17,22 +17,6 @@
17
17
  border: 1px solid #bfc7d5;
18
18
  }
19
19
 
20
- .rel-milestone-node__pointer {
21
- position: absolute;
22
- top: -26px;
23
- left: -33px;
24
- width: 27px;
25
- height: 34px;
26
- border-left: 1px solid #e9ecf0;
27
- border-bottom: 1px solid #e9ecf0;
28
- border-bottom-left-radius: 6px;
29
- }
30
-
31
- .rel-milestone-node__pointer-first {
32
- height: 26px;
33
- top: -20px;
34
- }
35
-
36
20
  .rel-milestone-node__name {
37
21
  flex: 1;
38
22
  margin-right: 40px;
@@ -35,8 +35,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
35
35
 
36
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
37
37
 
38
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39
-
40
38
  var precls = "rel-milestone-node";
41
39
 
42
40
  function MileStone(props) {
@@ -100,8 +98,6 @@ function MileStone(props) {
100
98
  id: data.mileStoneId,
101
99
  checked: checked
102
100
  })), /*#__PURE__*/_react["default"].createElement("span", {
103
- className: (0, _classnames["default"])("".concat(precls, "__pointer"), _defineProperty({}, "".concat(precls, "__pointer-first"), index === 1))
104
- }), /*#__PURE__*/_react["default"].createElement("span", {
105
101
  className: "".concat(precls, "__name")
106
102
  }, /*#__PURE__*/_react["default"].createElement("span", {
107
103
  className: (0, _classnames["default"])("tu-icon-licheng-s", "".concat(precls, "__name-icon"))
@@ -47,7 +47,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
47
47
 
48
48
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
49
49
 
50
- var precls = "rel-okr-node";
50
+ var precls = 'rel-okr-node';
51
51
 
52
52
  function ONode(props) {
53
53
  var data = props.data,
@@ -68,14 +68,14 @@ function ONode(props) {
68
68
  removeSelected = _useContext.removeSelected;
69
69
 
70
70
  var okrTypeIcon = {
71
- 1: "tu-icon-liebiao-geren",
72
- 2: "tu-icon-liebiao-xiashu",
73
- 3: "tu-icon-gong_si",
74
- 4: "tu-icon-liebiao-tuandui"
71
+ 1: 'tu-icon-liebiao-geren',
72
+ 2: 'tu-icon-liebiao-xiashu',
73
+ 3: 'tu-icon-gong_si',
74
+ 4: 'tu-icon-liebiao-tuandui'
75
75
  };
76
76
 
77
77
  var openOkrDrawer = function openOkrDrawer() {
78
- _drawerManager["default"].open("okrDetail", {
78
+ _drawerManager["default"].open('okrDetail', {
79
79
  okrId: data.workId
80
80
  }, {
81
81
  zIndex: 1350
@@ -85,7 +85,7 @@ function ONode(props) {
85
85
  var onCheckHandler = function onCheckHandler(checked) {
86
86
  if (checked) {
87
87
  addSelected({
88
- type: "okr",
88
+ type: 'okr',
89
89
  workId: data.workId,
90
90
  krId: 0,
91
91
  id: data.feedId,
@@ -119,7 +119,7 @@ function ONode(props) {
119
119
  className: (0, _classnames["default"])(okrTypeIcon[data.okrType], "".concat(precls, "__okr-type-icon"))
120
120
  }), /*#__PURE__*/_react["default"].createElement("span", {
121
121
  onClick: openOkrDrawer
122
- }, (0, _tools.htmlDecodeByHtmlRegExp)(data.workName))), /*#__PURE__*/_react["default"].createElement("span", {
122
+ }, (0, _openData.parseString)((0, _tools.htmlDecodeByHtmlRegExp)(data.workName)))), /*#__PURE__*/_react["default"].createElement("span", {
123
123
  className: "".concat(precls, "__principle")
124
124
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"].Text, {
125
125
  text: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
@@ -21,6 +21,8 @@ var _openData = require("../../../../utils/open-data");
21
21
 
22
22
  var _tools = require("../../../../utils/tools");
23
23
 
24
+ var _helpers = require("../../../../utils/helpers");
25
+
24
26
  var _getLocale = require("../../../../utils/getLocale");
25
27
 
26
28
  require("./index.css");
@@ -49,7 +51,7 @@ function WorkNode(props) {
49
51
  removeSelected = _useContext.removeSelected;
50
52
 
51
53
  var gotoWorkDetail = function gotoWorkDetail() {
52
- window.open("#work?work_id=".concat(data.WorkId, "&to_user_id=560000209&status=1"));
54
+ window.open("#work?work_id=".concat(data.WorkId, "&to_user_id=").concat((0, _helpers.getLoginUserInfo)().Id, "&status=1"));
53
55
  };
54
56
 
55
57
  var onCheckHandler = function onCheckHandler(checked) {
@@ -0,0 +1,256 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _dialog = _interopRequireDefault(require("../../dialog"));
13
+
14
+ var _toast = _interopRequireDefault(require("../../toast"));
15
+
16
+ var _okrTree = _interopRequireDefault(require("../tree/okr-tree"));
17
+
18
+ var _helper = require("../helper");
19
+
20
+ var _context3 = require("../context");
21
+
22
+ var _requestApi = require("../request-api");
23
+
24
+ var _getLocale = require("../../../utils/getLocale");
25
+
26
+ require("./index.css");
27
+
28
+ var _excluded = ["defaultVisible", "multiple", "onOk", "onCancel", "taskId", "isRelationOther", "lastSelected"];
29
+
30
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
+
32
+ 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); }
33
+
34
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
+
36
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
37
+
38
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
39
+
40
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
41
+
42
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
43
+
44
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
45
+
46
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
47
+
48
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
49
+
50
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
51
+
52
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
53
+
54
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
55
+
56
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
57
+
58
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
59
+
60
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
61
+
62
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
63
+
64
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
65
+
66
+ function WorkRelationModal(props) {
67
+ var _props$defaultVisible = props.defaultVisible,
68
+ defaultVisible = _props$defaultVisible === void 0 ? false : _props$defaultVisible,
69
+ _props$multiple = props.multiple,
70
+ multiple = _props$multiple === void 0 ? true : _props$multiple,
71
+ onOk = props.onOk,
72
+ _props$onCancel = props.onCancel,
73
+ onCancel = _props$onCancel === void 0 ? function () {} : _props$onCancel,
74
+ _props$taskId = props.taskId,
75
+ taskId = _props$taskId === void 0 ? 0 : _props$taskId,
76
+ _props$isRelationOthe = props.isRelationOther,
77
+ isRelationOther = _props$isRelationOthe === void 0 ? false : _props$isRelationOthe,
78
+ _props$lastSelected = props.lastSelected,
79
+ lastSelected = _props$lastSelected === void 0 ? [] : _props$lastSelected,
80
+ restProps = _objectWithoutProperties(props, _excluded);
81
+
82
+ var _useState = (0, _react.useState)(defaultVisible),
83
+ _useState2 = _slicedToArray(_useState, 2),
84
+ visible = _useState2[0],
85
+ setVisible = _useState2[1];
86
+
87
+ var _useState3 = (0, _react.useState)(lastSelected),
88
+ _useState4 = _slicedToArray(_useState3, 2),
89
+ selected = _useState4[0],
90
+ setSelected = _useState4[1];
91
+
92
+ var _useState5 = (0, _react.useState)([]),
93
+ _useState6 = _slicedToArray(_useState5, 2),
94
+ selectedRoots = _useState6[0],
95
+ setSelectedRoots = _useState6[1];
96
+
97
+ (0, _react.useEffect)(function () {
98
+ var roots = selected.reduce(function (res, cur) {
99
+ return [].concat(_toConsumableArray(res), [cur.workId]);
100
+ }, []);
101
+ setSelectedRoots(roots);
102
+ }, [selected]);
103
+
104
+ var updateRelationOthers = /*#__PURE__*/function () {
105
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
106
+ var _yield$relationWorks, Message;
107
+
108
+ return regeneratorRuntime.wrap(function _callee$(_context) {
109
+ while (1) {
110
+ switch (_context.prev = _context.next) {
111
+ case 0:
112
+ _context.next = 2;
113
+ return (0, _requestApi.relationWorks)({
114
+ TaskId: taskId,
115
+ taskRelationModels: selected.map(function (item) {
116
+ return {
117
+ WorkId: item.workId,
118
+ KrId: item.krId
119
+ };
120
+ })
121
+ });
122
+
123
+ case 2:
124
+ _yield$relationWorks = _context.sent;
125
+ Message = _yield$relationWorks.Message;
126
+
127
+ if (Message) {
128
+ _toast["default"].Error(Message);
129
+ } else {
130
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
131
+ }
132
+
133
+ case 5:
134
+ case "end":
135
+ return _context.stop();
136
+ }
137
+ }
138
+ }, _callee);
139
+ }));
140
+
141
+ return function updateRelationOthers() {
142
+ return _ref.apply(this, arguments);
143
+ };
144
+ }();
145
+
146
+ var updateRelation = /*#__PURE__*/function () {
147
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
148
+ var _selected, node, _yield$updateLable, Message;
149
+
150
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
151
+ while (1) {
152
+ switch (_context2.prev = _context2.next) {
153
+ case 0:
154
+ if (!(selected.length > 0)) {
155
+ _context2.next = 7;
156
+ break;
157
+ }
158
+
159
+ _selected = _slicedToArray(selected, 1), node = _selected[0];
160
+ _context2.next = 4;
161
+ return (0, _requestApi.updateLable)({
162
+ task_id: taskId,
163
+ lab_id: node.workId,
164
+ // 目标id 、项目id、分类id
165
+ lab_type: _helper.lableTypeMap[node.type],
166
+ mileStoneId: node.krId // kr | 里程碑id
167
+
168
+ });
169
+
170
+ case 4:
171
+ _yield$updateLable = _context2.sent;
172
+ Message = _yield$updateLable.Message;
173
+
174
+ if (Message) {
175
+ _toast["default"].Error(Message);
176
+ } else {
177
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
178
+ }
179
+
180
+ case 7:
181
+ case "end":
182
+ return _context2.stop();
183
+ }
184
+ }
185
+ }, _callee2);
186
+ }));
187
+
188
+ return function updateRelation() {
189
+ return _ref2.apply(this, arguments);
190
+ };
191
+ }();
192
+
193
+ var onOkHandler = function onOkHandler() {
194
+ if (taskId) {
195
+ isRelationOther && updateRelationOthers();
196
+ !isRelationOther && updateRelation();
197
+ }
198
+
199
+ setVisible(false);
200
+ onOk && onOk(selected);
201
+ setSelected([]);
202
+ };
203
+
204
+ var onCancelHandler = function onCancelHandler() {
205
+ setVisible(false);
206
+ onCancel && onCancel();
207
+ };
208
+
209
+ var addSelected = function addSelected(node) {
210
+ if (multiple) {
211
+ setSelected([].concat(_toConsumableArray(selected), [node]));
212
+ } else {
213
+ setSelected([node]);
214
+ }
215
+ };
216
+
217
+ var removeSelected = function removeSelected(id) {
218
+ var newSelected = selected.filter(function (item) {
219
+ return item.id !== id;
220
+ });
221
+ setSelected(_toConsumableArray(newSelected));
222
+ };
223
+
224
+ return /*#__PURE__*/_react["default"].createElement(_dialog["default"], _extends({
225
+ title: '关联 OKR',
226
+ visible: visible,
227
+ onOk: onOkHandler,
228
+ onCancel: onCancelHandler,
229
+ onClose: onCancelHandler,
230
+ style: {
231
+ height: "590px"
232
+ },
233
+ width: 840,
234
+ noFooterLine: true // getContainer={getContainer}
235
+ ,
236
+ extraClass: ["pull-screen-ignore", "tita-user-pop"],
237
+ destroyOnClose: false
238
+ }, restProps), /*#__PURE__*/_react["default"].createElement(_context3.Context.Provider, {
239
+ value: {
240
+ multiple: multiple,
241
+ selected: selected,
242
+ selectedRoots: selectedRoots,
243
+ addSelected: addSelected,
244
+ removeSelected: removeSelected
245
+ }
246
+ }, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
247
+ className: "".concat(_helper.preCls, "__content")
248
+ }, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], null)), selected.length > 0 && multiple && /*#__PURE__*/_react["default"].createElement("div", {
249
+ className: "".concat(_helper.preCls, "__select")
250
+ }, "\u5DF2\u9009", /*#__PURE__*/_react["default"].createElement("span", {
251
+ className: "".concat(_helper.preCls, "__select-count")
252
+ }, selected.length), "\u9879"))));
253
+ }
254
+
255
+ var _default = WorkRelationModal;
256
+ exports["default"] = _default;
@@ -37,7 +37,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
37
37
  var _super = _createSuper(ErrorBoundary);
38
38
 
39
39
  function ErrorBoundary() {
40
- var _this;
40
+ var _temp, _this;
41
41
 
42
42
  _classCallCheck(this, ErrorBoundary);
43
43
 
@@ -45,7 +45,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
45
45
  args[_key] = arguments[_key];
46
46
  }
47
47
 
48
- return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
48
+ return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
49
49
  hasError: false
50
50
  }, _this.renderError = function (e) {
51
51
  var errorTemplate = _this.props.errorTemplate;
@@ -55,7 +55,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
55
55
  // fallback
56
56
  return errorTemplate && typeof errorTemplate === "function" ? errorTemplate(e) : /*#__PURE__*/_react["default"].createElement("h5", null, "\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A", e.message);
57
57
  }
58
- }, _assertThisInitialized(_this)));
58
+ }, _temp));
59
59
  }
60
60
 
61
61
  _createClass(ErrorBoundary, [{
@@ -11,11 +11,14 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
11
11
 
12
12
  var _tooltipText = _interopRequireDefault(require("./tooltip-text"));
13
13
 
14
+ var _tooltipRows = _interopRequireDefault(require("./tooltip-rows"));
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
 
16
18
  // export const TooltipText = _TooltipText;
17
19
  // export const ErrorToolTip = _ErrorTip;
18
20
  _tooltip["default"].Text = _tooltipText["default"];
19
21
  _tooltip["default"].Error = _errorTip["default"];
22
+ _tooltip["default"].Rows = _tooltipRows["default"];
20
23
  var _default = _tooltip["default"];
21
24
  exports["default"] = _default;