@titaui/pc 1.12.0-beta.1 → 1.12.1

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 (218) hide show
  1. package/lib/components/avatar/name-avatar/index.css +1 -0
  2. package/lib/components/avatar/name-avatar/index.js +22 -13
  3. package/lib/components/avatar/text-avatar/index.css +2 -2
  4. package/lib/components/avatar/text-avatar/index.js +6 -6
  5. package/lib/components/button/images/blue.svg +21 -0
  6. package/lib/components/button/images/red.svg +21 -0
  7. package/lib/components/button/images/white.svg +19 -0
  8. package/lib/components/button/rect-btn/index.css +45 -11
  9. package/lib/components/button/rect-btn/index.js +12 -6
  10. package/lib/components/change-okr-modal/index.js +7 -6
  11. package/lib/components/checkbox/index.css +7 -3
  12. package/lib/{pages/aha2021 → components/contact-kefu}/img/canceled.svg +0 -0
  13. package/lib/{pages/aha2021 → components/contact-kefu}/img/kefu.svg +0 -0
  14. package/lib/{pages/aha2021 → components/contact-kefu}/img/not-try.png +0 -0
  15. package/lib/components/contact-kefu/img/notice.png +0 -0
  16. package/lib/{pages/aha2021 → components/contact-kefu}/img/try.png +0 -0
  17. package/lib/components/contact-kefu/index.css +95 -0
  18. package/lib/components/{dynamic/advertise → contact-kefu}/index.js +59 -77
  19. package/lib/components/create-okr-modal/index.js +48 -42
  20. package/lib/components/create-okr-modal/request-api.js +1 -1
  21. package/lib/components/dialog-confirm/index.css +2 -2
  22. package/lib/components/drawer/headerAction.js +5 -1
  23. package/lib/components/drawer/headerDrop.js +42 -4
  24. package/lib/components/drawer/index.css +33 -0
  25. package/lib/components/drawer/index.js +26 -3
  26. package/lib/components/dynamic/constant.js +38 -33
  27. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +48 -10
  28. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +4 -2
  29. package/lib/components/dynamic/dynamic-list/index.js +14 -7
  30. package/lib/components/dynamic/index.js +9 -12
  31. package/lib/components/dynamic/request-api.js +7 -68
  32. package/lib/components/e-priority/index.css +4 -4
  33. package/lib/components/e-priority/index.js +10 -2
  34. package/lib/components/form/form-fields/radios/index.css +4 -0
  35. package/lib/components/form/form-fields/radios/index.js +4 -3
  36. package/lib/components/mblog/components/MblogContent.js +5 -2
  37. package/lib/components/nav-top/components/menu/img/new.svg +30 -0
  38. package/lib/components/nav-top/components/menu/img/wecome-temp.png +0 -0
  39. package/lib/components/nav-top/components/menu/index.css +91 -0
  40. package/lib/components/nav-top/components/menu/index.js +72 -24
  41. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +2 -1
  42. package/lib/components/nav-top/components/user-message/components/todos/index.css +1 -0
  43. package/lib/components/nav-top/index.js +8 -4
  44. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
  45. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
  46. package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
  47. package/lib/components/okr-detail/components/base-okr-type/index.css +4 -0
  48. package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -0
  49. package/lib/components/okr-detail/components/header/index.js +10 -3
  50. package/lib/components/okr-detail/components/header/o-name.js +10 -3
  51. package/lib/components/okr-detail/components/o-classify.js +5 -1
  52. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +16 -16
  53. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
  54. package/lib/components/okr-detail/detail-header/constant.js +53 -0
  55. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +111 -54
  56. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +63 -0
  57. package/lib/components/okr-detail/detail-header/index.css +11 -0
  58. package/lib/components/okr-detail/detail-header/index.js +228 -234
  59. package/lib/components/okr-detail/e-list/index.js +2 -2
  60. package/lib/components/okr-detail/helper.js +108 -0
  61. package/lib/components/okr-detail/index.js +21 -4
  62. package/lib/components/okr-detail/okr-list/index.js +13 -6
  63. package/lib/components/okr-detail/request-apis.js +14 -8
  64. package/lib/components/okr-flow/child-node/index.css +1 -1
  65. package/lib/components/okr-flow/export-modal/index.js +66 -3
  66. package/lib/components/okr-period-selector/index.js +9 -5
  67. package/lib/components/okr-period-selector/select-cycle.js +23 -19
  68. package/lib/components/operation-records/index.js +1 -1
  69. package/lib/components/operation-records/style.js +1 -1
  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/radio/index.css +3 -3
  73. package/lib/components/search-input/index.css +1 -1
  74. package/lib/components/select-layer/index.css +1 -1
  75. package/lib/components/survey-model/index.js +3 -0
  76. package/lib/components/task-relation-modal/helper.js +139 -2
  77. package/lib/components/task-relation-modal/image/loading.gif +0 -0
  78. package/lib/components/task-relation-modal/index.js +9 -1
  79. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
  80. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +262 -0
  81. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
  82. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
  83. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +129 -0
  84. package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
  85. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
  86. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +185 -0
  87. package/lib/components/task-relation-modal/request-api.js +30 -3
  88. package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
  89. package/lib/components/task-relation-modal/search/principal.js +36 -19
  90. package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
  91. package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
  92. package/lib/components/{dynamic/dynamic-topping/index.js → task-relation-modal/search/task-relation.js} +45 -44
  93. package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
  94. package/lib/components/{dynamic/dynamic-liking/index.js → task-relation-modal/search/work-relation.js} +43 -39
  95. package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
  96. package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
  97. package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
  98. package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
  99. package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
  100. package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
  101. package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
  102. package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
  103. package/lib/components/task-relation-modal/tree-node/category-node/index.css +0 -11
  104. package/lib/components/task-relation-modal/tree-node/category-node/index.js +1 -3
  105. package/lib/components/task-relation-modal/tree-node/kr-node/index.css +0 -16
  106. package/lib/components/task-relation-modal/tree-node/kr-node/index.js +0 -6
  107. package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +0 -16
  108. package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +0 -4
  109. package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
  110. package/lib/components/task-relation-modal/work-relation/index.css +0 -0
  111. package/lib/components/task-relation-modal/work-relation/index.js +256 -0
  112. package/lib/components/task-tree/index.js +1 -7
  113. package/lib/components/task-tree/task-item-node/constant.js +39 -22
  114. package/lib/components/task-tree/task-item-node/e-status-dropdown.js +38 -8
  115. package/lib/components/task-tree/task-item-node/e-task.js +24 -24
  116. package/lib/components/task-tree/task-item-node/index.css +28 -18
  117. package/lib/components/task-tree/task-tree.css +1 -1
  118. package/lib/components/textarea/index.css +142 -0
  119. package/lib/components/textarea/index.js +262 -0
  120. package/lib/components/time-picker/time-picker.js +34 -102
  121. package/lib/components/time-picker/timer-picker-input.js +0 -6
  122. package/lib/components/toast/index.js +5 -3
  123. package/lib/components/tooltip/index.js +3 -0
  124. package/lib/components/tooltip/tooltip-rows/index.css +26 -0
  125. package/lib/components/tooltip/tooltip-rows/index.js +106 -0
  126. package/lib/components/user-selector/category-selector-panel/index.js +6 -1
  127. package/lib/components/{dynamic/quick-operation/components/create-task/index.js → user-selector/category-selector-panel/subordinate-tree.js} +37 -20
  128. package/lib/components/user-selector/constant.js +10 -2
  129. package/lib/components/user-selector/empty/index.css +5 -0
  130. package/lib/components/user-selector/empty/index.js +9 -3
  131. package/lib/components/user-selector/export-modules/depart-search-selector/index.js +45 -17
  132. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
  133. package/lib/components/user-selector/images/no-auth.png +0 -0
  134. package/lib/components/user-selector/request-apis.js +28 -9
  135. package/lib/components/user-selector/searched-panel/index.js +21 -7
  136. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
  137. package/lib/components-v1/radio/radio.js +1 -1
  138. package/lib/index.js +48 -0
  139. package/lib/pages/aha2021/index.css +1 -26
  140. package/lib/pages/aha2021/index.js +3 -82
  141. package/lib/pages/new-okr-list/header/common.js +52 -0
  142. package/lib/pages/new-okr-list/header/index.css +45 -0
  143. package/lib/pages/new-okr-list/header/index.js +40 -16
  144. package/lib/pages/new-okr-list/header/operate-record.js +136 -0
  145. package/lib/pages/new-okr-list/index.js +4 -2
  146. package/lib/pages/new-okr-list/list/index.js +19 -2
  147. package/lib/pages/new-okr-list/request-api.js +8 -2
  148. package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
  149. package/lib/utils/format-time.js +8 -1
  150. package/lib/utils/open-data.js +5 -1
  151. package/lib/utils/planDataJson.js +11115 -0
  152. package/package.json +2 -2
  153. package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
  154. package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
  155. package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
  156. package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
  157. package/lib/components/dynamic/advertise/index.css +0 -21
  158. package/lib/components/dynamic/advertise/interface.js +0 -5
  159. package/lib/components/dynamic/advertise/util.js +0 -28
  160. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
  161. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
  162. package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
  163. package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
  164. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  165. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  166. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  167. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  168. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  169. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
  170. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
  171. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
  172. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  173. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  174. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  175. package/lib/components/dynamic/dynamic-liking/item.js +0 -75
  176. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  177. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
  178. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
  179. package/lib/components/dynamic/dynamic-topping/index.css +0 -141
  180. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  181. package/lib/components/dynamic/dynamic-topping/item.js +0 -153
  182. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  183. package/lib/components/dynamic/dynamic.css +0 -173
  184. package/lib/components/dynamic/dynamic.js +0 -428
  185. package/lib/components/dynamic/export-module/index.js +0 -37
  186. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  187. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  188. package/lib/components/dynamic/my-team/img/line.png +0 -0
  189. package/lib/components/dynamic/my-team/img/team.png +0 -0
  190. package/lib/components/dynamic/my-team/index.css +0 -184
  191. package/lib/components/dynamic/my-team/index.js +0 -263
  192. package/lib/components/dynamic/my-team/request-api.js +0 -52
  193. package/lib/components/dynamic/my-team/util.js +0 -20
  194. package/lib/components/dynamic/new-ui.css +0 -192
  195. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
  196. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
  197. package/lib/components/dynamic/online-broadcast/data.js +0 -77
  198. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
  199. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  200. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  201. package/lib/components/dynamic/online-broadcast/index.css +0 -46
  202. package/lib/components/dynamic/online-broadcast/index.js +0 -61
  203. package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
  204. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  205. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
  206. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  207. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
  208. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  209. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
  210. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  211. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  212. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  213. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  214. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  215. package/lib/components/dynamic/quick-operation/index.css +0 -51
  216. package/lib/components/dynamic/quick-operation/index.js +0 -120
  217. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
  218. package/lib/components/task-tree/mock.js +0 -944
@@ -0,0 +1,176 @@
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 _pagination = _interopRequireDefault(require("../../../pagination"));
13
+
14
+ var _helper = require("../../helper");
15
+
16
+ var _searchForm = _interopRequireDefault(require("./search-form"));
17
+
18
+ var _taskTree = require("../../okr-relation/tree/task-tree");
19
+
20
+ var _loading = _interopRequireDefault(require("../../image/loading.gif"));
21
+
22
+ var _requestApi = require("../../request-api");
23
+
24
+ require("./index.css");
25
+
26
+ var _excluded = ["selected", "setSelected", "multiple"];
27
+
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
+
30
+ 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); }
31
+
32
+ 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; }
33
+
34
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
35
+
36
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
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
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
41
+
42
+ 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."); }
43
+
44
+ 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); }
45
+
46
+ 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; }
47
+
48
+ 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; }
49
+
50
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
51
+
52
+ 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; }
53
+
54
+ 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; }
55
+
56
+ var preCls = 'relation-work';
57
+
58
+ function WorkList(props) {
59
+ var selected = props.selected,
60
+ setSelected = props.setSelected,
61
+ _props$multiple = props.multiple,
62
+ multiple = _props$multiple === void 0 ? true : _props$multiple,
63
+ restProps = _objectWithoutProperties(props, _excluded);
64
+
65
+ var _useState = (0, _react.useState)([]),
66
+ _useState2 = _slicedToArray(_useState, 2),
67
+ taskData = _useState2[0],
68
+ setTaskData = _useState2[1]; // const [selected, setSelected] = useState(lastSelected)
69
+
70
+
71
+ var _useState3 = (0, _react.useState)({}),
72
+ _useState4 = _slicedToArray(_useState3, 2),
73
+ query = _useState4[0],
74
+ setQuery = _useState4[1];
75
+
76
+ var _useState5 = (0, _react.useState)(1),
77
+ _useState6 = _slicedToArray(_useState5, 2),
78
+ total = _useState6[0],
79
+ setTotal = _useState6[1];
80
+
81
+ var _useState7 = (0, _react.useState)(10),
82
+ _useState8 = _slicedToArray(_useState7, 2),
83
+ pageSize = _useState8[0],
84
+ setPageSize = _useState8[1];
85
+
86
+ var _useState9 = (0, _react.useState)(1),
87
+ _useState10 = _slicedToArray(_useState9, 2),
88
+ pageNum = _useState10[0],
89
+ setPageNum = _useState10[1];
90
+
91
+ var _useState11 = (0, _react.useState)(false),
92
+ _useState12 = _slicedToArray(_useState11, 2),
93
+ isQuery = _useState12[0],
94
+ setIsQuery = _useState12[1];
95
+
96
+ var _useState13 = (0, _react.useState)(false),
97
+ _useState14 = _slicedToArray(_useState13, 2),
98
+ lodaing = _useState14[0],
99
+ setLoading = _useState14[1];
100
+
101
+ var formatData = function formatData(data) {
102
+ var newData = [];
103
+ data.forEach(function (item) {
104
+ var obj = {};
105
+ obj['id'] = item === null || item === void 0 ? void 0 : item.workId;
106
+ obj['name'] = item === null || item === void 0 ? void 0 : item.workName;
107
+ obj['status'] = (0, _helper.workStatus)()[item === null || item === void 0 ? void 0 : item.status] || (item === null || item === void 0 ? void 0 : item.status);
108
+ obj['principalUser'] = item === null || item === void 0 ? void 0 : item.principalUser;
109
+ obj['startDate'] = item === null || item === void 0 ? void 0 : item.startDate;
110
+ obj['endDate'] = item === null || item === void 0 ? void 0 : item.endDate;
111
+ newData.push(obj);
112
+ });
113
+ return newData || [];
114
+ };
115
+
116
+ var onPageChangeHandler = function onPageChangeHandler(current, pageSize) {
117
+ setSelected([]);
118
+ setPageNum(current);
119
+ setPageSize(pageSize);
120
+ };
121
+
122
+ var getWorkData = function getWorkData() {
123
+ setLoading(true);
124
+ (0, _requestApi.workData)(query, pageNum, pageSize).then(function (res) {
125
+ setLoading(false);
126
+
127
+ if (!!res.Code) {
128
+ var _res$Data = res.Data,
129
+ works = _res$Data.works,
130
+ _total = _res$Data.total;
131
+ var newData = formatData(works);
132
+ setTaskData(newData);
133
+ setTotal(_total);
134
+ }
135
+ });
136
+ };
137
+
138
+ (0, _react.useEffect)(function () {
139
+ isQuery && getWorkData();
140
+ }, [query, pageNum, pageSize]);
141
+
142
+ var onQueryChangeHandler = function onQueryChangeHandler(values) {
143
+ setIsQuery(true);
144
+ setPageNum(1);
145
+ setQuery(_objectSpread(_objectSpread({}, query), values));
146
+ };
147
+
148
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_searchForm["default"], {
149
+ onChange: onQueryChangeHandler
150
+ }), lodaing ? /*#__PURE__*/_react["default"].createElement("div", {
151
+ className: "".concat(preCls, "__content-empty")
152
+ }, /*#__PURE__*/_react["default"].createElement("img", {
153
+ src: _loading["default"],
154
+ alt: ""
155
+ })) : /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
156
+ className: "".concat(preCls, "__content-tree")
157
+ }, /*#__PURE__*/_react["default"].createElement(_taskTree.TaskTree, {
158
+ selected: selected,
159
+ setSelected: setSelected,
160
+ data: taskData,
161
+ multiple: multiple,
162
+ isWork: true,
163
+ pageSize: pageSize
164
+ })), !!total && /*#__PURE__*/_react["default"].createElement("div", {
165
+ className: "".concat(preCls, "__content-pagination")
166
+ }, /*#__PURE__*/_react["default"].createElement(_pagination["default"], {
167
+ size: "sm",
168
+ total: total,
169
+ onChange: onPageChangeHandler,
170
+ current: pageNum,
171
+ pageSize: pageSize
172
+ }))));
173
+ }
174
+
175
+ var _default = WorkList;
176
+ exports["default"] = _default;
@@ -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;
@@ -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;
@@ -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,8 +33,6 @@ 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
36
  var precls = "rel-kr-node";
41
37
 
42
38
  function KrNode(props) {
@@ -93,8 +89,6 @@ 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")
@@ -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"))
@@ -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) {