@titaui/pc 1.12.22-beta.1 → 1.12.22-beta.13

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 (52) hide show
  1. package/lib/components/attachments-preview/index.js +6 -2
  2. package/lib/components/color-date-picker/index.css +1 -2
  3. package/lib/components/dialog-upload/index.js +1 -1
  4. package/lib/components/dynamic/components/comments-dialog/img/curEfforts.png +0 -0
  5. package/lib/components/dynamic/components/comments-dialog/img/curGood.png +0 -0
  6. package/lib/components/dynamic/components/comments-dialog/img/curGreat.png +0 -0
  7. package/lib/components/dynamic/components/comments-dialog/img/efforts.png +0 -0
  8. package/lib/components/dynamic/components/comments-dialog/img/good.png +0 -0
  9. package/lib/components/dynamic/components/comments-dialog/img/great.png +0 -0
  10. package/lib/components/dynamic/components/comments-dialog/index.css +33 -3
  11. package/lib/components/dynamic/components/comments-dialog/index.js +18 -7
  12. package/lib/components/dynamic/dynamic-item/components/header/index.js +2 -1
  13. package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +3 -14
  14. package/lib/components/dynamic/dynamic-item/components/schedule/index.js +5 -29
  15. package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +0 -1
  16. package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +95 -48
  17. package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +17 -0
  18. package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +15 -2
  19. package/lib/components/dynamic/dynamic-item/components/task-progress/index.css +41 -31
  20. package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +72 -85
  21. package/lib/components/dynamic/dynamic-item/components/task-progress/interface.js +18 -1
  22. package/lib/components/dynamic/dynamic-item/components/task-progress/render-row.js +80 -0
  23. package/lib/components/dynamic/dynamic-item/components/task-progress/request-api.js +16 -0
  24. package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +92 -8
  25. package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +42 -23
  26. package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +1 -1
  27. package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +42 -65
  28. package/lib/components/dynamic/dynamic-item/index.js +50 -44
  29. package/lib/components/import-modal/import-okr-modal/index.js +2 -1
  30. package/lib/components/import-modal/import-task-modal/search-form.js +4 -1
  31. package/lib/components/import-modal/request-api.js +1 -1
  32. package/lib/components/import-modal/search/task-relation.js +9 -5
  33. package/lib/components/import-modal/tree/okr-tree/index.js +15 -5
  34. package/lib/components/menus/components/search-colleague/index.js +3 -1
  35. package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +15 -11
  36. package/lib/components/menus/export-modules/summary-menus/menus.js +48 -36
  37. package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +2 -2
  38. package/lib/components/picker/components/panels/month-panel/index.js +2 -1
  39. package/lib/components/picker/components/panels/week-panel/index.js +6 -2
  40. package/lib/components/picker/components/panels/week-panel/utils.js +24 -2
  41. package/lib/components/picker/components/panels/week-panel/week-body.js +18 -10
  42. package/lib/components/picker/components/panels/week-panel/week-head.js +9 -7
  43. package/lib/components/picker/picker-panels.js +3 -3
  44. package/lib/components/picker/range-picker/components/select-input/index.js +9 -2
  45. package/lib/components/rate/index.css +3 -3
  46. package/lib/components/textarea/index.css +2 -2
  47. package/lib/components/textarea/index.js +1 -1
  48. package/lib/components/upvote/index.js +10 -4
  49. package/lib/components/write-summary-modal/index.css +1 -0
  50. package/lib/components/write-summary-modal/index.js +7 -6
  51. package/lib/utils/helpers.js +58 -3
  52. package/package.json +2 -2
@@ -49,7 +49,9 @@ var AttachmentsPreview = function AttachmentsPreview(props) {
49
49
  case 'delete':
50
50
  {
51
51
  onChange(attachments.filter(function (f) {
52
- return f.Id != attachments[index].Id;
52
+ var _attachments$index;
53
+
54
+ return f.Id !== attachments[index].Id || (f === null || f === void 0 ? void 0 : f.DocumentId) !== ((_attachments$index = attachments[index]) === null || _attachments$index === void 0 ? void 0 : _attachments$index.DocumentId);
53
55
  }));
54
56
  break;
55
57
  }
@@ -64,7 +66,9 @@ var AttachmentsPreview = function AttachmentsPreview(props) {
64
66
  });
65
67
  previewRef.current.show(i);
66
68
  } else {
67
- window.open(attachments[index].ClientUrl);
69
+ var _attachments$index2, _attachments$index3;
70
+
71
+ window.open(((_attachments$index2 = attachments[index]) === null || _attachments$index2 === void 0 ? void 0 : _attachments$index2.ClientUrl) || ((_attachments$index3 = attachments[index]) === null || _attachments$index3 === void 0 ? void 0 : _attachments$index3.PreviewUrl));
68
72
  }
69
73
 
70
74
  break;
@@ -58,9 +58,8 @@
58
58
  align-items: center;
59
59
  justify-content: center;
60
60
  border-radius: 8px;
61
- height: 36px;
61
+ height: 28px;
62
62
  font-size: 14px;
63
- font-weight: 600;
64
63
  color: #3f4755;
65
64
  line-height: 18px;
66
65
  }
@@ -113,7 +113,7 @@ var Footer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
113
113
  }
114
114
  }, /*#__PURE__*/_react["default"].createElement("span", {
115
115
  className: "tu-icon-cus-fujian"
116
- }, "\u6DFB\u52A0\u9644\u4EF6")), /*#__PURE__*/_react["default"].createElement("div", {
116
+ }, (0, _getLocale.getLocale)('Pro_newpro_Upload'))), /*#__PURE__*/_react["default"].createElement("div", {
117
117
  style: {
118
118
  flex: 1
119
119
  }
@@ -22,7 +22,7 @@
22
22
  .rate_container .rate-points {
23
23
  font-size: 16px;
24
24
  font-weight: normal;
25
- color: #3F4755;
25
+ color: #3f4755;
26
26
  line-height: 32px;
27
27
  }
28
28
 
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  .encourage_container .encourage {
36
- background: #F0F4FA;
36
+ background: #f0f4fa;
37
37
  border-radius: 12px;
38
38
  padding: 7px 12px;
39
39
  display: flex;
@@ -43,6 +43,15 @@
43
43
  cursor: pointer;
44
44
  }
45
45
 
46
+ .encourage_container .encourage .encourage-text {
47
+ color: #89919F;
48
+ }
49
+
50
+ .encourage_container .encourage img {
51
+ width: 20px;
52
+ height: 20px;
53
+ }
54
+
46
55
  .encourage_container .curEnourageGreat {
47
56
  background: rgba(246, 189, 22, 0.2);
48
57
  }
@@ -70,6 +79,27 @@
70
79
  .titleDesc {
71
80
  font-size: 12px;
72
81
  font-weight: normal;
73
- color: #A4ACB9;
82
+ color: #a4acb9;
74
83
  line-height: 18px;
75
84
  }
85
+
86
+ .remind-dialog-content .titaui-form .titaui-form-field {
87
+ margin-top: 20px;
88
+ }
89
+
90
+ .remind-dialog-content .titaui-form .titaui-form-field:first-child {
91
+ margin-top: 0;
92
+ }
93
+
94
+ .remind-text .regulation-setting-item__label {
95
+ align-items: flex-start;
96
+ margin-top: 7px;
97
+ }
98
+
99
+ .remind-dialog-content {
100
+ padding: 16px 26px 5px;
101
+ }
102
+
103
+ .remind-dialog-content .titaui-textArea {
104
+ width: 398px;
105
+ }
@@ -71,7 +71,7 @@ var RemindDialog = function RemindDialog(props) {
71
71
  encourageState = _useState6[0],
72
72
  setEencourageState = _useState6[1];
73
73
 
74
- var inputRef = (0, _react.useRef)();
74
+ var inputRef = (0, _react.useRef)(document.createElement('input'));
75
75
 
76
76
  var _onChange = function onChange(e) {
77
77
  setRemark(e);
@@ -115,13 +115,19 @@ var RemindDialog = function RemindDialog(props) {
115
115
  };
116
116
  (0, _api.setSummaryEvaluate)(params).then(function (res) {
117
117
  if (res.Code === 1) {
118
- closeDialog();
118
+ closeDialog({
119
+ remark: remark,
120
+ type: Number(evaluateType),
121
+ value: value
122
+ });
123
+
124
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
119
125
  }
120
126
  });
121
127
  };
122
128
 
123
129
  (0, _react.useEffect)(function () {
124
- if (!isUpdated) {
130
+ if (!isUpdated && visible) {
125
131
  var params = {
126
132
  objectId: feedId,
127
133
  objectType: "8",
@@ -143,21 +149,24 @@ var RemindDialog = function RemindDialog(props) {
143
149
  }
144
150
  });
145
151
  }
152
+ }, [visible]);
153
+ var onCloseHandler = (0, _react.useCallback)(function () {
154
+ closeDialog();
146
155
  }, []);
147
156
  return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
148
- visible: visible // visible={true}
149
- ,
157
+ visible: visible,
150
158
  style: {
151
159
  width: 538
152
160
  },
153
- onCancel: closeDialog,
161
+ onCancel: onCloseHandler,
154
162
  onOk: handleSubmit,
155
163
  noFooterLine: true,
164
+ destroyOnClose: true,
156
165
  noHeadLine: true,
157
166
  title: /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, (0, _getLocale.getLocale)("Rep_NewS_Evaluation")), /*#__PURE__*/_react["default"].createElement("span", {
158
167
  className: "titleDesc"
159
168
  }, (0, _getLocale.getLocale)("Rep_NewS_ComhenRatin"))),
160
- onClose: closeDialog
169
+ onClose: onCloseHandler
161
170
  }, /*#__PURE__*/_react["default"].createElement("div", {
162
171
  className: "".concat(precls, "-content")
163
172
  }, /*#__PURE__*/_react["default"].createElement(_form["default"], null, /*#__PURE__*/_react["default"].createElement(_regulationSettingItem["default"], {
@@ -173,10 +182,12 @@ var RemindDialog = function RemindDialog(props) {
173
182
  encourageState: encourageState,
174
183
  changeEncourage: changeEncourage
175
184
  })), /*#__PURE__*/_react["default"].createElement(_regulationSettingItem["default"], {
185
+ className: "remind-text",
176
186
  label: (0, _getLocale.getLocale)("Per_Ass_New_Appr_detail_Com")
177
187
  }, /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
178
188
  maxLine: 4,
179
189
  line: 4,
190
+ maxLength: 5000,
180
191
  value: remark,
181
192
  onChange: function onChange(e) {
182
193
  return _onChange(e.target.value);
@@ -75,6 +75,7 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
75
75
  _data$isCollect = data.isCollect,
76
76
  isCollect = _data$isCollect === void 0 ? false : _data$isCollect,
77
77
  feedType = data.feedType;
78
+ var isOldSummary = feedType === _constant.EFeedType.Report && !data.newSummary;
78
79
 
79
80
  var _useState = (0, _react.useState)(isTop),
80
81
  _useState2 = _slicedToArray(_useState, 2),
@@ -265,7 +266,7 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
265
266
  name: user.name,
266
267
  id: user.userId
267
268
  })
268
- })), desc, suffixContent), /*#__PURE__*/_react["default"].createElement("div", {
269
+ })), desc, suffixContent), !isOldSummary && /*#__PURE__*/_react["default"].createElement("div", {
269
270
  className: "".concat(prefix, "__more-operate")
270
271
  }, /*#__PURE__*/_react["default"].createElement(_dropSelector["default"], {
271
272
  popupPlacement: "bottomRight",
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
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
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -31,8 +33,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
31
33
 
32
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; }
33
35
 
34
- 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); }
35
-
36
36
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
37
37
 
38
38
  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."); }
@@ -59,17 +59,6 @@ var OkrProgress = function OkrProgress(_ref) {
59
59
  rowsData = _useState2[0],
60
60
  setRowsData = _useState2[1];
61
61
 
62
- var renderTitle = (0, _react.useMemo)(function () {
63
- if (type === 'day') {
64
- return (0, _getLocale.getLocale)('Rep_NewS_ToOKRpro');
65
- } else if (type === 'week') {
66
- return (0, _getLocale.getLocale)('Rep_NewS_ThisOKRprogr');
67
- } else if (type === 'month') {
68
- return (0, _getLocale.getLocale)('Rep_NewS_TmonOKRpro');
69
- }
70
-
71
- return '';
72
- }, [type]);
73
62
  var renderTable = (0, _react.useMemo)(function () {
74
63
  return /*#__PURE__*/_react["default"].createElement("table", null, /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", {
75
64
  className: "".concat(prefix, "__table-title")
@@ -134,7 +123,7 @@ var OkrProgress = function OkrProgress(_ref) {
134
123
  })));
135
124
  }, [rowsData]);
136
125
  (0, _react.useEffect)(function () {
137
- if (_typeof(data) !== 'object' && data !== '') {
126
+ if (typeof data === 'string' && data !== '') {
138
127
  setRowsData(JSON.parse(data));
139
128
  }
140
129
  }, [data]);
@@ -1,51 +1,27 @@
1
1
  "use strict";
2
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
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports["default"] = exports.Schedule = void 0;
9
7
 
10
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = _interopRequireDefault(require("react"));
11
9
 
12
10
  require("./index.css");
13
11
 
14
- 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); }
15
-
16
- 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; }
17
-
18
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
-
20
- 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."); }
21
-
22
- 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); }
23
-
24
- 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; }
25
-
26
- 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; }
27
-
28
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
13
 
30
14
  var prefix = "titaui-dynamic-summary-schedule";
31
15
 
32
16
  var Schedule = function Schedule(_ref) {
33
- var value = _ref.value,
34
- date = _ref.date,
35
- id = _ref.id;
36
-
37
- var _useState = (0, _react.useState)(value),
38
- _useState2 = _slicedToArray(_useState, 2),
39
- content = _useState2[0],
40
- setContent = _useState2[1];
41
-
17
+ var value = _ref.value;
42
18
  return /*#__PURE__*/_react["default"].createElement("div", {
43
19
  className: prefix
44
- }, content && /*#__PURE__*/_react["default"].createElement("div", {
20
+ }, value && /*#__PURE__*/_react["default"].createElement("div", {
45
21
  className: "".concat(prefix, "__content")
46
22
  }, /*#__PURE__*/_react["default"].createElement("div", {
47
23
  className: "".concat(prefix, "__content-text")
48
- }, content)), !content && /*#__PURE__*/_react["default"].createElement("div", {
24
+ }, value)), !value && /*#__PURE__*/_react["default"].createElement("div", {
49
25
  className: "".concat(prefix, "__no-progress")
50
26
  }, "-"));
51
27
  };
@@ -15,7 +15,6 @@
15
15
 
16
16
  .titaui-dynamic-new-summary-header-left .titaui-pc-avator-container {
17
17
  display: inline-flex;
18
- align-items: center;
19
18
  }
20
19
 
21
20
  .titaui-dynamic-new-summary-header-right {
@@ -41,14 +41,24 @@ var _evalute = _interopRequireDefault(require("./img/evalute.png"));
41
41
 
42
42
  require("./index.css");
43
43
 
44
+ var _requestApi2 = require("./request-api");
45
+
44
46
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
45
47
 
46
48
  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); }
47
49
 
48
50
  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; }
49
51
 
52
+ 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; }
53
+
54
+ 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; }
55
+
50
56
  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; }
51
57
 
58
+ 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); } }
59
+
60
+ 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); }); }; }
61
+
52
62
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
53
63
 
54
64
  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."); }
@@ -69,18 +79,20 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
69
79
  _ref$showDelete = _ref.showDelete,
70
80
  showDelete = _ref$showDelete === void 0 ? false : _ref$showDelete,
71
81
  _ref$showEdit = _ref.showEdit,
72
- showEdit = _ref$showEdit === void 0 ? true : _ref$showEdit,
82
+ showEdit = _ref$showEdit === void 0 ? false : _ref$showEdit,
73
83
  _ref$showCollect = _ref.showCollect,
74
- showCollect = _ref$showCollect === void 0 ? false : _ref$showCollect,
84
+ showCollect = _ref$showCollect === void 0 ? true : _ref$showCollect,
75
85
  _ref$showOperateRecor = _ref.showOperateRecord,
76
- showOperateRecord = _ref$showOperateRecor === void 0 ? true : _ref$showOperateRecor,
86
+ showOperateRecord = _ref$showOperateRecor === void 0 ? false : _ref$showOperateRecor,
77
87
  data = _ref.data,
78
88
  _ref$desc = _ref.desc,
79
89
  desc = _ref$desc === void 0 ? "" : _ref$desc,
80
90
  user = _ref.user,
81
91
  _ref$suffixContent = _ref.suffixContent,
82
92
  suffixContent = _ref$suffixContent === void 0 ? "" : _ref$suffixContent,
83
- canEvaluate = _ref.canEvaluate;
93
+ canEvaluate = _ref.canEvaluate,
94
+ _ref$setEvaluates = _ref.setEvaluates,
95
+ setEvaluates = _ref$setEvaluates === void 0 ? function () {} : _ref$setEvaluates;
84
96
  var createDate = data.createDate,
85
97
  feedId = data.feedId,
86
98
  _data$isCollect = data.isCollect,
@@ -131,43 +143,43 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
131
143
  setSelectVisible(false);
132
144
  };
133
145
 
134
- var onChangeHandler = function onChangeHandler(name) {
135
- if (name === "collect") {
136
- if (nowIsCollect) {
137
- (0, _requestApi.cancelCollectDynamic)({
138
- feedId: feedId
139
- }).then(function (resp) {
140
- if (resp.Code === 1) {
141
- setNowIsCollect(!nowIsCollect);
142
- setSelectVisible(false);
143
-
144
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
145
- canClose: false
146
- });
147
- } else {
148
- _toast["default"].Error(resp.Message, {
149
- canClose: false
150
- });
151
- }
152
- });
153
- } else {
154
- (0, _requestApi.collectDynamic)({
155
- feedId: feedId
156
- }).then(function (resp) {
157
- if (resp.Code === 1) {
158
- setNowIsCollect(!nowIsCollect);
159
- setSelectVisible(false);
160
-
161
- _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
162
- canClose: false
163
- });
164
- } else {
165
- _toast["default"].Error(resp.Message, {
166
- canClose: false
167
- });
168
- }
169
- });
170
- }
146
+ var onChangeHandler = function onChangeHandler(name) {};
147
+
148
+ var handleCollectClick = function handleCollectClick() {
149
+ if (nowIsCollect) {
150
+ (0, _requestApi.cancelCollectDynamic)({
151
+ feedId: feedId
152
+ }).then(function (resp) {
153
+ if (resp.Code === 1) {
154
+ setNowIsCollect(!nowIsCollect);
155
+ setSelectVisible(false);
156
+
157
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
158
+ canClose: false
159
+ });
160
+ } else {
161
+ _toast["default"].Error(resp.Message, {
162
+ canClose: false
163
+ });
164
+ }
165
+ });
166
+ } else {
167
+ (0, _requestApi.collectDynamic)({
168
+ feedId: feedId
169
+ }).then(function (resp) {
170
+ if (resp.Code === 1) {
171
+ setNowIsCollect(!nowIsCollect);
172
+ setSelectVisible(false);
173
+
174
+ _toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"), {
175
+ canClose: false
176
+ });
177
+ } else {
178
+ _toast["default"].Error(resp.Message, {
179
+ canClose: false
180
+ });
181
+ }
182
+ });
171
183
  }
172
184
  };
173
185
 
@@ -209,9 +221,43 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
209
221
  window.open("#/summary/template?isCreate=false&hideNavTop=true&reportType=".concat(reportType, "&currentTime=").concat(dailyDate), "_blank");
210
222
  };
211
223
 
212
- var handleCloseEvaluateDialog = function handleCloseEvaluateDialog() {
213
- setEvaluateVisible(false);
214
- };
224
+ var handleCloseEvaluateDialog = /*#__PURE__*/function () {
225
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(params) {
226
+ var _user;
227
+
228
+ return regeneratorRuntime.wrap(function _callee$(_context) {
229
+ while (1) {
230
+ switch (_context.prev = _context.next) {
231
+ case 0:
232
+ if (!params) {
233
+ _context.next = 5;
234
+ break;
235
+ }
236
+
237
+ _context.next = 3;
238
+ return (0, _requestApi2.getUserById)(loginUserId);
239
+
240
+ case 3:
241
+ _user = _context.sent;
242
+ setEvaluates([_objectSpread(_objectSpread({}, params), {}, {
243
+ user: _user
244
+ })]);
245
+
246
+ case 5:
247
+ setEvaluateVisible(false);
248
+
249
+ case 6:
250
+ case "end":
251
+ return _context.stop();
252
+ }
253
+ }
254
+ }, _callee);
255
+ }));
256
+
257
+ return function handleCloseEvaluateDialog(_x) {
258
+ return _ref2.apply(this, arguments);
259
+ };
260
+ }();
215
261
 
216
262
  var renderDialogConfirm = (0, _react.useMemo)(function () {
217
263
  return /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
@@ -300,13 +346,14 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
300
346
  }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
301
347
  condition: showCollect
302
348
  }, /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
303
- name: "collect"
349
+ name: "collect",
350
+ onClick: handleCollectClick
304
351
  }, /*#__PURE__*/_react["default"].createElement("div", {
305
352
  className: "".concat(prefix, "__more-operate-selection")
306
353
  }, /*#__PURE__*/_react["default"].createElement("i", {
307
354
  className: (0, _classnames["default"])("tu-icon-APP-shoucang", "".concat(prefix, "__more-operate-selection-icon"))
308
355
  }), nowIsCollect ? (0, _getLocale.getLocale)("Mod_CancCollection") : (0, _getLocale.getLocale)("Mod_Collection")))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
309
- condition: showEdit && !showCollect && (user.id || user.userId) === loginUserId
356
+ condition: showEdit && data.isEdit
310
357
  }, /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
311
358
  name: "edit",
312
359
  onClick: handleClickEdit
@@ -315,7 +362,7 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
315
362
  }, /*#__PURE__*/_react["default"].createElement("i", {
316
363
  className: (0, _classnames["default"])("tu-icon-bianji3", "".concat(prefix, "__more-operate-selection-icon"))
317
364
  }), (0, _getLocale.getLocale)("Mod_Editor")))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
318
- condition: showOperateRecord && !showCollect
365
+ condition: showOperateRecord
319
366
  }, /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
320
367
  name: "record",
321
368
  onClick: handleOpenOperateRecord
@@ -324,7 +371,7 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
324
371
  }, /*#__PURE__*/_react["default"].createElement("i", {
325
372
  className: (0, _classnames["default"])("tu-icon-jinzhan-s", "".concat(prefix, "__more-operate-selection-icon"))
326
373
  }), (0, _getLocale.getLocale)("Per_details_OperationRecord")))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
327
- condition: showDelete && !showCollect && (user.id || user.userId) === loginUserId
374
+ condition: showDelete && data.isEdit
328
375
  }, /*#__PURE__*/_react["default"].createElement(_dropSelector.Item, {
329
376
  name: "delete",
330
377
  onClick: handleDeleteClick
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getUserById = void 0;
7
+
8
+ var _request = require("../../../../../utils/request");
9
+
10
+ // @ts-ignore
11
+ var getUserById = function getUserById(userId) {
12
+ return (0, _request.rget)("v2")("user/GetById?touserid=".concat(userId)).then(function (res) {
13
+ return res.Data;
14
+ });
15
+ };
16
+
17
+ exports.getUserById = getUserById;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.EStatusStatus2ClassType = void 0;
6
+ exports.EStatusStatus2ClassType = exports.EObjType = void 0;
7
7
  var EStatusStatus2ClassType = {
8
8
  2: "tu-icon-finished",
9
9
  1: "tu-icon-running",
@@ -13,4 +13,17 @@ var EStatusStatus2ClassType = {
13
13
  0: "tu-icon-notstart",
14
14
  5: "tu-icon-jiantou-right"
15
15
  };
16
- exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
16
+ exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
17
+ var EObjType;
18
+ exports.EObjType = EObjType;
19
+
20
+ (function (EObjType) {
21
+ EObjType[EObjType["Project"] = 4] = "Project";
22
+ EObjType[EObjType["Task"] = 7] = "Task";
23
+ EObjType[EObjType["O"] = 62] = "O";
24
+ EObjType[EObjType["Kr"] = 65] = "Kr";
25
+ EObjType[EObjType["Assess"] = 23] = "Assess";
26
+ EObjType[EObjType["MileStone"] = 27] = "MileStone";
27
+ EObjType[EObjType["KanBan"] = 66] = "KanBan";
28
+ EObjType[EObjType["Report"] = 8] = "Report";
29
+ })(EObjType || (exports.EObjType = EObjType = {}));