@titaui/pc 1.11.52 → 1.11.55

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 (117) 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/checkbox/index.css +4 -0
  6. package/lib/components/create-okr-modal/index.js +3 -1
  7. package/lib/components/dynamic/dynamic-list/index.js +14 -7
  8. package/lib/components/dynamic/index.js +9 -12
  9. package/lib/components/dynamic/request-api.js +7 -68
  10. package/lib/components/nav-top/index.js +2 -2
  11. package/lib/components/okr-detail/components/base-okr-type/confirm/confirm.js +1 -1
  12. package/lib/components/okr-detail/e-list/index.js +2 -2
  13. package/lib/components/period-selector/interface.js +7 -0
  14. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
  15. package/lib/components/search-input/index.css +1 -1
  16. package/lib/components/select-layer/index.css +1 -1
  17. package/lib/components/task-relation-modal/helper.js +139 -2
  18. package/lib/components/task-relation-modal/image/loading.gif +0 -0
  19. package/lib/components/task-relation-modal/index.js +9 -0
  20. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.css +18 -0
  21. package/lib/components/task-relation-modal/okr-relation/relation-task-model/index.js +262 -0
  22. package/lib/components/task-relation-modal/okr-relation/relation-task-model/search-form.js +135 -0
  23. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.css +0 -0
  24. package/lib/components/task-relation-modal/okr-relation/relation-work-model/index.js +129 -0
  25. package/lib/components/task-relation-modal/okr-relation/request-api.js +106 -0
  26. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +120 -0
  27. package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.js +185 -0
  28. package/lib/components/task-relation-modal/request-api.js +28 -2
  29. package/lib/components/task-relation-modal/search/okr-status-select.js +3 -3
  30. package/lib/components/task-relation-modal/search/principal.js +20 -5
  31. package/lib/components/task-relation-modal/search/search-dropdown/index.css +2 -1
  32. package/lib/components/task-relation-modal/search/search-dropdown/index.js +1 -1
  33. package/lib/components/{dynamic/dynamic-topping/index.js → task-relation-modal/search/task-relation.js} +45 -44
  34. package/lib/components/task-relation-modal/search/task-status-select.js +87 -0
  35. package/lib/components/{dynamic/dynamic-liking/index.js → task-relation-modal/search/work-relation.js} +43 -39
  36. package/lib/components/task-relation-modal/search/work-status-select.js +74 -0
  37. package/lib/components/task-relation-modal/tree/okr-tree/index.css +1 -1
  38. package/lib/components/task-relation-modal/tree/okr-tree/search-form.js +16 -2
  39. package/lib/components/task-relation-modal/tree/task-list/index.css +0 -0
  40. package/lib/components/task-relation-modal/tree/task-list/index.js +1 -0
  41. package/lib/components/task-relation-modal/tree/work-list/index.css +14 -0
  42. package/lib/components/task-relation-modal/tree/work-list/index.js +176 -0
  43. package/lib/components/task-relation-modal/tree/work-list/search-form.js +123 -0
  44. package/lib/components/task-relation-modal/tree-node/work-node/index.js +3 -1
  45. package/lib/components/task-relation-modal/work-relation/index.css +0 -0
  46. package/lib/components/task-relation-modal/work-relation/index.js +256 -0
  47. package/lib/components/tooltip/index.js +3 -0
  48. package/lib/components/tooltip/tooltip-rows/index.css +26 -0
  49. package/lib/components/{dynamic/advertise → tooltip/tooltip-rows}/index.js +65 -85
  50. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.js +46 -18
  51. package/lib/utils/planDataJson.js +11115 -0
  52. package/package.json +2 -2
  53. package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
  54. package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
  55. package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
  56. package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
  57. package/lib/components/dynamic/advertise/index.css +0 -21
  58. package/lib/components/dynamic/advertise/interface.js +0 -5
  59. package/lib/components/dynamic/advertise/util.js +0 -28
  60. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
  61. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
  62. package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
  63. package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
  64. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  65. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  66. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  67. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  68. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  69. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
  70. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
  71. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
  72. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  73. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  74. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  75. package/lib/components/dynamic/dynamic-liking/item.js +0 -75
  76. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  77. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
  78. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
  79. package/lib/components/dynamic/dynamic-topping/index.css +0 -141
  80. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  81. package/lib/components/dynamic/dynamic-topping/item.js +0 -153
  82. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  83. package/lib/components/dynamic/dynamic.css +0 -173
  84. package/lib/components/dynamic/dynamic.js +0 -428
  85. package/lib/components/dynamic/export-module/index.js +0 -37
  86. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  87. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  88. package/lib/components/dynamic/my-team/img/line.png +0 -0
  89. package/lib/components/dynamic/my-team/img/team.png +0 -0
  90. package/lib/components/dynamic/my-team/index.css +0 -184
  91. package/lib/components/dynamic/my-team/index.js +0 -263
  92. package/lib/components/dynamic/my-team/request-api.js +0 -52
  93. package/lib/components/dynamic/my-team/util.js +0 -20
  94. package/lib/components/dynamic/new-ui.css +0 -192
  95. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
  96. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
  97. package/lib/components/dynamic/online-broadcast/data.js +0 -95
  98. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
  99. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  100. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  101. package/lib/components/dynamic/online-broadcast/index.css +0 -46
  102. package/lib/components/dynamic/online-broadcast/index.js +0 -61
  103. package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
  104. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  105. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
  106. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  107. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
  108. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  109. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
  110. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  111. package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -44
  112. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  113. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  114. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  115. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  116. package/lib/components/dynamic/quick-operation/index.css +0 -51
  117. package/lib/components/dynamic/quick-operation/index.js +0 -120
@@ -0,0 +1,120 @@
1
+ .okr-relation-tree__empty {
2
+ height: 384px;
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ color: #A4ACB9;
7
+ }
8
+
9
+ .okr-relation-tree__header {
10
+ font-size: 12px;
11
+ font-weight: 400;
12
+ color: #A4ACB9;
13
+ position: relative;
14
+ display: flex;
15
+ align-items: center;
16
+ margin-bottom: 11px;
17
+ }
18
+
19
+ .okr-relation-tree__header-name {
20
+ width: 332px;
21
+ margin-left: 12px;
22
+ }
23
+
24
+ .okr-relation-tree__header-status {
25
+ width: 60px;
26
+ margin-left: 40px;
27
+ }
28
+
29
+ .okr-relation-tree__header-principer {
30
+ width: 60px;
31
+ margin-left: 40px;
32
+ }
33
+
34
+ .okr-relation-tree__header-time {
35
+ width: 176px;
36
+ margin-left: 40px;
37
+ text-align: right;
38
+ }
39
+
40
+ .okr-relation-tree__header::after {
41
+ content: '';
42
+ display: block;
43
+ position: absolute;
44
+ bottom: -11px;
45
+ width: 100%;
46
+ height: 1px;
47
+ background-color: #e9ecf0;
48
+ }
49
+
50
+ .okr-relation-tree__content {
51
+ margin-right: -32px;
52
+ margin-left: -4px;
53
+ height: 305px;
54
+ font-size: 14px;
55
+ font-weight: 400;
56
+ line-height: 22px;
57
+ }
58
+
59
+ .okr-relation-tree__content-item {
60
+ width: 776px;
61
+ display: flex;
62
+ align-items: flex-start;
63
+ padding: 6px 4px;
64
+ border-radius: 8px;
65
+ margin-top: 12px;
66
+ }
67
+
68
+ .okr-relation-tree__content-item:nth-of-type(1) {
69
+ margin-top: 9px;
70
+ }
71
+
72
+ .okr-relation-tree__content-item:hover {
73
+ background-color: #f0f4fa;
74
+ }
75
+
76
+ .okr-relation-tree__content-item-name {
77
+ cursor: pointer;
78
+ display: -webkit-box;
79
+ overflow: hidden;
80
+ text-overflow: ellipsis;
81
+ word-break: break-all;
82
+ -webkit-box-orient: vertical;
83
+ -webkit-line-clamp: 2;
84
+ width: 332px;
85
+ margin-left: 12px;
86
+ }
87
+
88
+ .okr-relation-tree__content-item-name:hover {
89
+ color: #2879ff;
90
+ }
91
+
92
+ .okr-relation-tree__content-item-name:focus-within {
93
+ color: red;
94
+ }
95
+
96
+ .okr-relation-tree__content-item-status {
97
+ width: 60px;
98
+ margin-left: 40px;
99
+ }
100
+
101
+ .okr-relation-tree__content-item-principer {
102
+ width: 60px;
103
+ margin-left: 40px;
104
+ }
105
+
106
+ .okr-relation-tree__content-item-time {
107
+ width: 176px;
108
+ margin-left: 40px;
109
+ text-align: right;
110
+ }
111
+
112
+ .okr-relation-tree__content-pagination {
113
+ margin-top: 14px;
114
+ }
115
+
116
+ .okr-relation-tree__checkbox {
117
+ height: 22px;
118
+ display: inline-flex;
119
+ align-items: center;
120
+ }
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.TaskTree = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _checkbox = _interopRequireDefault(require("../../../../checkbox"));
11
+
12
+ var _helper = require("../../../helper");
13
+
14
+ var _openData = require("../../../../../utils/open-data");
15
+
16
+ var _tools = require("../../../../../utils/tools");
17
+
18
+ var _tooltipText = _interopRequireDefault(require("../../../../tooltip/tooltip-text"));
19
+
20
+ var _helpers = require("../../../../../utils/helpers");
21
+
22
+ var _scrollbar = _interopRequireDefault(require("../../../../scrollbar"));
23
+
24
+ var _radio = _interopRequireDefault(require("../../../radio"));
25
+
26
+ require("./index.css");
27
+
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
+
30
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
31
+
32
+ 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."); }
33
+
34
+ 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); }
35
+
36
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
37
+
38
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
39
+
40
+ 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; }
41
+
42
+ var preCls = 'okr-relation-tree';
43
+
44
+ var TaskTree = function TaskTree(_ref) {
45
+ var data = _ref.data,
46
+ selected = _ref.selected,
47
+ multiple = _ref.multiple,
48
+ setSelected = _ref.setSelected,
49
+ pageSize = _ref.pageSize,
50
+ _ref$isWork = _ref.isWork,
51
+ isWork = _ref$isWork === void 0 ? false : _ref$isWork;
52
+ var scrollStyle = {
53
+ height: '100%',
54
+ backgroundColor: 'transparent',
55
+ width: '100%'
56
+ };
57
+
58
+ var handleName = function handleName(id) {
59
+ if (isWork) {
60
+ window.open("#work?work_id=".concat(id, "&to_user_id=").concat((0, _helpers.getLoginUserInfo)().Id, "&status=1"));
61
+ } else {
62
+ window.Talent.app.vent.trigger('global-pull-screen', id, 'task');
63
+ }
64
+ };
65
+
66
+ var handlerCheckAll = function handlerCheckAll(checked) {
67
+ if (checked) {
68
+ var ids = [];
69
+ data.forEach(function (item) {
70
+ var obj = {};
71
+ obj['id'] = item.id;
72
+ ids.push(obj);
73
+ });
74
+ setSelected(ids);
75
+ } else {
76
+ setSelected([]);
77
+ }
78
+ };
79
+
80
+ var isSelectedAll = function isSelectedAll() {
81
+ if (selected.length === pageSize) {
82
+ return true;
83
+ } else {
84
+ return false;
85
+ }
86
+ };
87
+
88
+ var onCheckHandler = function onCheckHandler(checked, id) {
89
+ if (checked) {
90
+ if (multiple) {
91
+ setSelected([{
92
+ id: id
93
+ }].concat(_toConsumableArray(selected)));
94
+ } else {
95
+ setSelected([{
96
+ id: id
97
+ }]);
98
+ }
99
+ } else {
100
+ if (multiple) {
101
+ var newArr = selected.filter(function (item) {
102
+ return item.id !== id;
103
+ });
104
+ setSelected(newArr);
105
+ } else {
106
+ setSelected([]);
107
+ }
108
+ }
109
+ };
110
+
111
+ var hasId = function hasId(id) {
112
+ if (!id) return false;
113
+ return !!selected.find(function (item) {
114
+ return item.id === id;
115
+ });
116
+ };
117
+
118
+ if (!(data !== null && data !== void 0 && data.length)) return /*#__PURE__*/_react["default"].createElement("div", {
119
+ className: "".concat(preCls, "__empty")
120
+ }, "\u6682\u65E0", isWork ? '项目' : '任务', "\u6570\u636E");
121
+ return /*#__PURE__*/_react["default"].createElement("div", {
122
+ className: preCls
123
+ }, /*#__PURE__*/_react["default"].createElement("div", {
124
+ className: "".concat(preCls, "__header")
125
+ }, multiple && /*#__PURE__*/_react["default"].createElement("span", {
126
+ className: "".concat(preCls, "__checkbox")
127
+ }, /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
128
+ onChange: handlerCheckAll,
129
+ name: 'all',
130
+ checked: isSelectedAll()
131
+ })), /*#__PURE__*/_react["default"].createElement("span", {
132
+ className: "".concat(preCls, "__header-name")
133
+ }, isWork ? '项目' : '任务'), /*#__PURE__*/_react["default"].createElement("span", {
134
+ className: "".concat(preCls, "__header-status")
135
+ }, "\u72B6\u6001"), /*#__PURE__*/_react["default"].createElement("span", {
136
+ className: "".concat(preCls, "__header-principer")
137
+ }, "\u8D1F\u8D23\u4EBA"), /*#__PURE__*/_react["default"].createElement("span", {
138
+ className: "".concat(preCls, "__header-time")
139
+ }, "\u8D77\u6B62\u65F6\u95F4")), /*#__PURE__*/_react["default"].createElement("div", {
140
+ className: "".concat(preCls, "__content")
141
+ }, /*#__PURE__*/_react["default"].createElement(_scrollbar["default"].Mask, {
142
+ style: scrollStyle,
143
+ maskHeight: 16
144
+ }, data.map(function (item) {
145
+ var _item$principalUser, _item$principalUser2, _item$principalUser3, _item$principalUser4;
146
+
147
+ return /*#__PURE__*/_react["default"].createElement("div", {
148
+ className: "".concat(preCls, "__content-item"),
149
+ key: item.id
150
+ }, multiple && /*#__PURE__*/_react["default"].createElement("span", {
151
+ className: "".concat(preCls, "__checkbox")
152
+ }, /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
153
+ onChange: onCheckHandler,
154
+ name: item.id,
155
+ checked: hasId(item.id)
156
+ })), !multiple && /*#__PURE__*/_react["default"].createElement("span", {
157
+ className: "".concat(preCls, "__checkbox")
158
+ }, /*#__PURE__*/_react["default"].createElement(_radio["default"], {
159
+ onChange: onCheckHandler,
160
+ id: item.id,
161
+ checked: hasId(item.id)
162
+ })), /*#__PURE__*/_react["default"].createElement("div", {
163
+ className: "".concat(preCls, "__content-item-name"),
164
+ onClick: function onClick() {
165
+ return handleName(item.id);
166
+ }
167
+ }, (0, _tools.htmlDecodeByRegExp)(item.name)), /*#__PURE__*/_react["default"].createElement("div", {
168
+ className: "".concat(preCls, "__content-item-status")
169
+ }, item.status), /*#__PURE__*/_react["default"].createElement("div", {
170
+ className: "".concat(preCls, "__content-item-principer")
171
+ }, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
172
+ maxWidth: 60,
173
+ text: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
174
+ name: (item === null || item === void 0 ? void 0 : (_item$principalUser = item.principalUser) === null || _item$principalUser === void 0 ? void 0 : _item$principalUser.name) || (item === null || item === void 0 ? void 0 : (_item$principalUser2 = item.principalUser) === null || _item$principalUser2 === void 0 ? void 0 : _item$principalUser2.Name),
175
+ id: (item === null || item === void 0 ? void 0 : (_item$principalUser3 = item.principalUser) === null || _item$principalUser3 === void 0 ? void 0 : _item$principalUser3.id) || (item === null || item === void 0 ? void 0 : (_item$principalUser4 = item.principalUser) === null || _item$principalUser4 === void 0 ? void 0 : _item$principalUser4.UserId)
176
+ })
177
+ })), /*#__PURE__*/_react["default"].createElement("div", {
178
+ className: "".concat(preCls, "__content-item-time")
179
+ }, (0, _helper.formatDateStr)(item.startDate), " -", ' ', (0, _helper.formatDateStr)(item.endDate)));
180
+ }))));
181
+ };
182
+
183
+ exports.TaskTree = TaskTree;
184
+ var _default = TaskTree;
185
+ exports["default"] = _default;
@@ -3,10 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.updateLable = exports.relationWorks = exports.okrSearch = exports.getWorks = exports.getUserById = exports.getCategory = void 0;
6
+ exports.workData = exports.updateLable = exports.relationWorks = exports.okrSearch = exports.getWorks = exports.getUserById = exports.getCategory = void 0;
7
7
 
8
8
  var _request = require("../../utils/request");
9
9
 
10
+ var _helpers = require("../../utils/helpers");
11
+
10
12
  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; }
11
13
 
12
14
  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; }
@@ -79,4 +81,28 @@ var getUserById = function getUserById(userId) {
79
81
  });
80
82
  };
81
83
 
82
- exports.getUserById = getUserById;
84
+ exports.getUserById = getUserById;
85
+
86
+ var workData = function workData(params, pageNum, pageSize) {
87
+ var _params$keyWords2 = params.keyWords,
88
+ keyWords = _params$keyWords2 === void 0 ? "" : _params$keyWords2,
89
+ _params$status = params.status,
90
+ status = _params$status === void 0 ? 0 : _params$status,
91
+ _params$relation = params.relation,
92
+ relation = _params$relation === void 0 ? 0 : _params$relation,
93
+ userIds = params.userIds;
94
+ var url = "work/list?toUserId=".concat(userIds || (0, _helpers.getLoginUserInfo)().Id);
95
+ return (0, _request.rpost)("v1")(url, {
96
+ keyWords: keyWords,
97
+ orderType: 1,
98
+ pageNum: pageNum,
99
+ pageSize: pageSize,
100
+ relation: relation,
101
+ status: status,
102
+ userIds: userIds
103
+ }).then(function (res) {
104
+ return res;
105
+ });
106
+ };
107
+
108
+ exports.workData = workData;
@@ -37,7 +37,7 @@ function OkrStatusSelect(props) {
37
37
  var onChange = props.onChange,
38
38
  initValue = props.initValue;
39
39
 
40
- var _useState = (0, _react.useState)((0, _getLocale.getLocale)("OKR_MyO_Butt_AllStates")),
40
+ var _useState = (0, _react.useState)((0, _getLocale.getLocale)("OKR_MyO_E_From_AllStates")),
41
41
  _useState2 = _slicedToArray(_useState, 2),
42
42
  selectText = _useState2[0],
43
43
  setSelectText = _useState2[1];
@@ -48,13 +48,13 @@ function OkrStatusSelect(props) {
48
48
  };
49
49
 
50
50
  var selectOptions = [{
51
- label: (0, _getLocale.getLocale)("OKR_MyO_Butt_AllStates"),
51
+ label: (0, _getLocale.getLocale)("OKR_MyO_E_From_AllStates"),
52
52
  value: 0
53
53
  }, {
54
54
  label: (0, _getLocale.getLocale)("Per_MyRe_text_Inprogress"),
55
55
  value: 1
56
56
  }, {
57
- label: (0, _getLocale.getLocale)("OKR_MyO_Butt_Hasended"),
57
+ label: (0, _getLocale.getLocale)("Pro_page_Sta_Completed"),
58
58
  value: 2
59
59
  }];
60
60
  return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
@@ -41,7 +41,9 @@ function Principal(props) {
41
41
  initValue = _props$initValue === void 0 ? [] : _props$initValue,
42
42
  setRelation = props.setRelation,
43
43
  _props$position = props.position,
44
- position = _props$position === void 0 ? "bottom" : _props$position;
44
+ position = _props$position === void 0 ? "bottom" : _props$position,
45
+ _props$multiple = props.multiple,
46
+ multiple = _props$multiple === void 0 ? true : _props$multiple;
45
47
 
46
48
  var _useState = (0, _react.useState)(initValue),
47
49
  _useState2 = _slicedToArray(_useState, 2),
@@ -60,17 +62,29 @@ function Principal(props) {
60
62
 
61
63
  var userSelectorRef = (0, _react.useRef)(document.createElement("div"));
62
64
 
65
+ var singleSelect = function singleSelect(users) {
66
+ var _users$;
67
+
68
+ if (multiple || !users || !((_users$ = users[0]) !== null && _users$ !== void 0 && _users$.data)) return;
69
+ var user = users[0];
70
+ var data = user.data;
71
+ setUsers([{
72
+ avatar: data.avatar,
73
+ name: data.name,
74
+ userId: data.userId
75
+ }]);
76
+ };
77
+
63
78
  var onSelectUser = function onSelectUser(_ref) {
64
79
  var users = _ref.users;
65
- return setUsers(users);
80
+ setUsers(users);
66
81
  };
67
82
 
68
83
  (0, _react.useEffect)(function () {
69
84
  setIsInit(true);
70
85
  }, []);
71
86
  (0, _react.useEffect)(function () {
72
- setRelation(0);
73
- console.log(users);
87
+ setRelation(0); // console.log(users);
74
88
 
75
89
  if (users.length > 0) {
76
90
  var text = ""; // 我在拼name
@@ -92,10 +106,11 @@ function Principal(props) {
92
106
  return /*#__PURE__*/_react["default"].createElement("div", {
93
107
  ref: userSelectorRef
94
108
  }, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
95
- multiple: true,
109
+ multiple: multiple,
96
110
  selectNodes: {
97
111
  users: users
98
112
  },
113
+ onSelect: singleSelect,
99
114
  onOk: onSelectUser,
100
115
  position: position,
101
116
  disabledDepartSelect: true,
@@ -6,7 +6,7 @@
6
6
  border: 1px solid #e9ecf0;
7
7
  padding: 7px 28px 7px 12px;
8
8
  position: relative;
9
- border-radius: 4px;
9
+ border-radius: 16px;
10
10
  font-size: 0;
11
11
  cursor: pointer;
12
12
  transition: color 0.3s ease, border 0.3s ease;
@@ -41,6 +41,7 @@
41
41
  }
42
42
 
43
43
  .titaui-search-dropdown .tu-icon-sort-down {
44
+ color: #6F7886;
44
45
  font-size: 14px;
45
46
  position: absolute;
46
47
  right: 12px;
@@ -24,7 +24,7 @@ function SearchDropDown(props) {
24
24
  maxWidth: maxWidth
25
25
  }
26
26
  }, children), /*#__PURE__*/_react["default"].createElement("span", {
27
- className: "tu-icon-sort-down"
27
+ className: "".concat(preCls, "__icon tu-icon-sort-down")
28
28
  }));
29
29
  }
30
30
 
@@ -9,15 +9,11 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
- var _item = _interopRequireDefault(require("./item"));
15
-
16
- var _requestApi = require("./request-api");
17
-
18
12
  var _getLocale = require("../../../utils/getLocale");
19
13
 
20
- require("./index.css");
14
+ var _selectLayer = _interopRequireDefault(require("../../select-layer"));
15
+
16
+ require("./search-dropdown/index.css");
21
17
 
22
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
19
 
@@ -37,46 +33,51 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
37
33
 
38
34
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
35
 
40
- var preCls = "danamic-topping";
36
+ function Relation(props) {
37
+ var onChange = props.onChange,
38
+ initValue = props.initValue;
41
39
 
42
- var DynamicTop = function DynamicTop() {
43
- var _useState = (0, _react.useState)([]),
40
+ var _useState = (0, _react.useState)((0, _getLocale.getLocale)("Pro_page_Plan_FullRange")),
44
41
  _useState2 = _slicedToArray(_useState, 2),
45
- toppingData = _useState2[0],
46
- setToppingData = _useState2[1];
47
-
48
- var getData = function getData() {
49
- (0, _requestApi.getDynamicTop)().then(function (res) {
50
- if (res.Code === 1) {
51
- setToppingData(res.Data);
52
- }
53
- });
54
- }; // @ts-ignore
55
-
42
+ selectText = _useState2[0],
43
+ setSelectText = _useState2[1];
56
44
 
57
- window.reFreshDynamicTopping = getData;
58
45
  (0, _react.useEffect)(function () {
59
- getData();
60
- }, []);
61
- if (!toppingData || toppingData.length === 0) return null;
62
- return /*#__PURE__*/_react["default"].createElement("div", {
63
- className: (0, _classnames["default"])("".concat(preCls))
46
+ if (initValue === 0) {
47
+ setSelectText((0, _getLocale.getLocale)("Pro_page_Plan_FullRange"));
48
+ }
49
+ }, [initValue]);
50
+
51
+ var onChangeHandler = function onChangeHandler(key) {
52
+ setSelectText(key.label);
53
+ onChange(key.value);
54
+ };
55
+
56
+ var selectOptions = [{
57
+ label: (0, _getLocale.getLocale)("Pro_page_Plan_FullRange"),
58
+ value: 0
59
+ }, {
60
+ label: (0, _getLocale.getLocale)("OKR_Menu_Title03_Owned"),
61
+ value: 1
62
+ }, {
63
+ label: (0, _getLocale.getLocale)("OKR_Menu_Title_Collaborator"),
64
+ value: 2
65
+ }, {
66
+ label: (0, _getLocale.getLocale)("Data_Idistributed"),
67
+ value: 3
68
+ }];
69
+ return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
70
+ onChangeSelect: onChangeHandler,
71
+ items: selectOptions,
72
+ initValue: initValue
64
73
  }, /*#__PURE__*/_react["default"].createElement("div", {
65
- className: (0, _classnames["default"])("".concat(preCls, "-header"))
66
- }, /*#__PURE__*/_react["default"].createElement("img", {
67
- className: (0, _classnames["default"])("".concat(preCls, "-header-image")),
68
- src: require("./image/top-icon.svg")
69
- }), /*#__PURE__*/_react["default"].createElement("span", {
70
- className: (0, _classnames["default"])("".concat(preCls, "-header-text"))
71
- }, (0, _getLocale.getLocale)("OKR_MyO_Topfeeds"))), toppingData.map(function (item, index) {
72
- if (index > 2) return;
73
- return /*#__PURE__*/_react["default"].createElement(_item["default"], {
74
- key: index,
75
- refresh: getData,
76
- data: item
77
- });
78
- }));
79
- };
80
-
81
- var _default = DynamicTop;
74
+ className: "titaui-search-dropdown"
75
+ }, /*#__PURE__*/_react["default"].createElement("span", {
76
+ className: "titaui-search-dropdown__text"
77
+ }, selectText), /*#__PURE__*/_react["default"].createElement("span", {
78
+ className: "tu-icon-sort-down"
79
+ })));
80
+ }
81
+
82
+ var _default = Relation;
82
83
  exports["default"] = _default;
@@ -0,0 +1,87 @@
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 _selectLayer = _interopRequireDefault(require("../../select-layer"));
13
+
14
+ var _getLocale = require("../../../utils/getLocale");
15
+
16
+ require("./search-dropdown/index.css");
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ 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); }
21
+
22
+ 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; }
23
+
24
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
25
+
26
+ 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."); }
27
+
28
+ 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); }
29
+
30
+ 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; }
31
+
32
+ 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; }
33
+
34
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
+
36
+ function TaskStatusSelect(props) {
37
+ var onChange = props.onChange,
38
+ initValue = props.initValue;
39
+
40
+ var _useState = (0, _react.useState)((0, _getLocale.getLocale)('OKR_MyO_E_From_AllStates')),
41
+ _useState2 = _slicedToArray(_useState, 2),
42
+ selectText = _useState2[0],
43
+ setSelectText = _useState2[1];
44
+
45
+ var onChangeHandler = function onChangeHandler(key) {
46
+ setSelectText(key.label);
47
+ onChange(key.value);
48
+ };
49
+
50
+ var selectOptions = [{
51
+ label: (0, _getLocale.getLocale)('OKR_MyO_E_From_AllStates'),
52
+ value: 10 //理应是不传
53
+
54
+ }, {
55
+ label: (0, _getLocale.getLocale)('Pro_page_Sta_Completed'),
56
+ value: 2
57
+ }, {
58
+ label: (0, _getLocale.getLocale)('Per_MyRe_text_Inprogress'),
59
+ value: 1
60
+ }, {
61
+ label: (0, _getLocale.getLocale)('OKR_MyO_E_From_Cancelled'),
62
+ value: 4
63
+ }, {
64
+ label: (0, _getLocale.getLocale)('OKR_MyO_E_From_Delayed'),
65
+ value: 3
66
+ }, {
67
+ label: (0, _getLocale.getLocale)('OKR_MyO_E_From_Suspended'),
68
+ value: 6
69
+ }, {
70
+ label: (0, _getLocale.getLocale)('OKR_MyO_E_From_NotStarted'),
71
+ value: 0
72
+ }];
73
+ return /*#__PURE__*/_react["default"].createElement(_selectLayer["default"], {
74
+ onChangeSelect: onChangeHandler,
75
+ items: selectOptions,
76
+ initValue: initValue
77
+ }, /*#__PURE__*/_react["default"].createElement("div", {
78
+ className: "titaui-search-dropdown"
79
+ }, /*#__PURE__*/_react["default"].createElement("span", {
80
+ className: "titaui-search-dropdown__text"
81
+ }, selectText), /*#__PURE__*/_react["default"].createElement("span", {
82
+ className: "tu-icon-sort-down"
83
+ })));
84
+ }
85
+
86
+ var _default = TaskStatusSelect;
87
+ exports["default"] = _default;