@titaui/pc 1.10.9 → 1.10.10

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 (87) hide show
  1. package/lib/components/change-okr-modal/index.js +108 -87
  2. package/lib/components/communication/CommunicationRecord.js +21 -15
  3. package/lib/components/communication/index.css +50 -10
  4. package/lib/components/communication/index.js +67 -28
  5. package/lib/components/communication/style.js +8 -6
  6. package/lib/components/create-okr-modal/fields/okr-parent.js +1 -5
  7. package/lib/components/dynamic/components/obj-status/index.css +3 -19
  8. package/lib/components/dynamic/components/obj-status/index.js +7 -8
  9. package/lib/components/dynamic/components/obj-status/utils.js +37 -0
  10. package/lib/components/dynamic/components/percent/index.css +1 -1
  11. package/lib/components/dynamic/components/title/index.css +21 -22
  12. package/lib/components/dynamic/components/title/index.js +20 -8
  13. package/lib/components/dynamic/dynamic-item/components/header/index.css +8 -7
  14. package/lib/components/dynamic/dynamic-item/components/header/index.js +12 -6
  15. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-kr.png +0 -0
  16. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align-o.png +0 -0
  17. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.png +0 -0
  18. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +41 -32
  19. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +49 -31
  20. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +6 -34
  21. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +6 -32
  22. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +59 -19
  23. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +27 -19
  24. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +52 -41
  25. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +53 -43
  26. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +41 -29
  27. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +23 -29
  28. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +33 -16
  29. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +11 -24
  30. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.css +26 -41
  31. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/index.js +10 -29
  32. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.css +26 -41
  33. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/index.js +13 -30
  34. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +15 -57
  35. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +31 -80
  36. package/lib/components/dynamic/dynamic-item/dynamic-progress/utils.js +72 -0
  37. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +36 -29
  38. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +10 -23
  39. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-kr.png +0 -0
  40. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-o.png +0 -0
  41. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-project.png +0 -0
  42. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela-task.png +0 -0
  43. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-rela.svg +23 -0
  44. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +52 -35
  45. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +55 -35
  46. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +20 -18
  47. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +11 -17
  48. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +21 -23
  49. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +31 -27
  50. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +4 -4
  51. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +8 -18
  52. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +6 -21
  53. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +6 -36
  54. package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/dynamic-share-course.png +0 -0
  55. package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.css +11 -19
  56. package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/index.js +9 -25
  57. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +34 -30
  58. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +10 -24
  59. package/lib/components/dynamic/dynamic-item/index.css +4 -4
  60. package/lib/components/dynamic/dynamic-item/index.js +38 -8
  61. package/lib/components/dynamic/img/dynamic-point.svg +13 -0
  62. package/lib/components/dynamic/util.js +41 -81
  63. package/lib/components/file-list/components/single-file/index.css +9 -8
  64. package/lib/components/file-list/components/single-file/index.js +1 -1
  65. package/lib/components/follower-visitor/index.js +6 -4
  66. package/lib/components/mblog/context.js +3 -1
  67. package/lib/components/mblog/index.css +7 -0
  68. package/lib/components/mblog/index.js +31 -4
  69. package/lib/components/mblog/style.js +4 -4
  70. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +21 -12
  71. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-empty.js +7 -4
  72. package/lib/components/okr-detail/okr-list/index.js +1 -5
  73. package/lib/components/progress/circle-progress/index.css +1 -0
  74. package/lib/components/progress/circle-progress/index.js +8 -3
  75. package/lib/components/search-key-handle/index.js +7 -2
  76. package/lib/utils/bs-global.js +13 -9
  77. package/lib/utils/tools.js +11 -2
  78. package/package.json +1 -1
  79. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +0 -22
  80. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +0 -22
  81. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
  82. package/lib/components/dynamic/dynamic-item/dynamic-okrs-communication/img/okrs-icon.png +0 -0
  83. package/lib/components/dynamic/dynamic-item/dynamic-plan-communication/img/plan-icon.png +0 -0
  84. package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
  85. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +0 -22
  86. package/lib/components/dynamic/dynamic-item/dynamic-share-to-dynamic/img/guanlian.png +0 -0
  87. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-icon.png +0 -0
@@ -25,6 +25,8 @@ var _constant = require("./constant");
25
25
 
26
26
  var _getLocale = require("../../utils/getLocale");
27
27
 
28
+ var _tools = require("../../utils/tools");
29
+
28
30
  require("./index.css");
29
31
 
30
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -78,13 +80,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
78
80
  var pageSize = 20;
79
81
 
80
82
  function parseUser(toUser) {
83
+ if (!toUser || JSON.stringify(toUser) === '{}') return {};
81
84
  return {
82
85
  Name: toUser.name,
83
86
  Id: toUser.userId,
84
87
  DepartmentId: 0,
85
88
  Email: toUser.email,
86
89
  UserAvatar: toUser.avatar,
87
- Department: ""
90
+ Department: ''
88
91
  };
89
92
  } // ChangeOKR 是伴随父组件的出现而出现的, 构造阶段就已经有所有的数据
90
93
 
@@ -113,11 +116,11 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
113
116
  status: null,
114
117
  cycle: null,
115
118
  type: null,
116
- users: [user],
119
+ users: JSON.stringify(user) === '{}' ? [] : [user],
117
120
  // 构造之后这里还是空的
118
121
  departments: [],
119
122
  data: [],
120
- keywords: "",
123
+ keywords: '',
121
124
  loadingMore: false,
122
125
  isEnd: false,
123
126
  nextPage: 1,
@@ -141,7 +144,7 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
141
144
  this.setState({
142
145
  users: [user],
143
146
  data: [],
144
- keywords: ""
147
+ keywords: ''
145
148
  });
146
149
  }
147
150
  }
@@ -155,20 +158,20 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
155
158
  // 首次加载的时候 需要把 cycle 通过 cycleType 与 yqmNum 合并出来
156
159
 
157
160
  var url = (0, _requestV.getApiUrl)("customizequery/condition/get?dataKey=".concat(this.DATA_KEY, "&pageId=").concat(this.PAGE_ID));
158
- (0, _requestV.taker)(url, "GET").then(function (res) {
161
+ (0, _requestV.taker)(url, 'GET').then(function (res) {
159
162
  // condition 设置完筛选条件 然后再调用 getData()
160
163
  if (res.Code === 1) {
161
164
  var _res$Data = res.Data,
162
165
  cycleType = _res$Data.cycleType,
163
166
  yqmNum = _res$Data.yqmNum,
164
167
  annualNum = _res$Data.annualNum,
165
- okrType = _res$Data.okrType,
166
168
  status = _res$Data.status,
167
169
  users = _res$Data.users;
170
+ var okrType = res.Data.okrType;
168
171
  var cycle;
169
- cycleType || "";
172
+ cycleType || '';
170
173
 
171
- if (cycleType == 1 || cycleType == -1) {
174
+ if (cycleType === 1 || cycleType === -1) {
172
175
  cycle = "".concat(cycleType);
173
176
  } else {
174
177
  cycle = cycleType ? "".concat(cycleType, ",").concat(yqmNum) : null;
@@ -176,7 +179,7 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
176
179
 
177
180
  var year = annualNum || null; // status = status || 0;
178
181
 
179
- okrType = okrType == undefined ? null : okrType;
182
+ okrType = okrType === undefined ? null : okrType;
180
183
 
181
184
  if (!_this2.KRSetting.OkrTypeSetting) {
182
185
  okrType = null;
@@ -188,8 +191,8 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
188
191
  year: year,
189
192
  status: status,
190
193
  type: okrType,
191
- users: [user],
192
- keywords: "",
194
+ users: JSON.stringify(user) === '{}' ? [] : [user],
195
+ keywords: '',
193
196
  nextPage: 1
194
197
  }, function () {
195
198
  return _this2.getListData();
@@ -209,9 +212,9 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
209
212
  Id: id,
210
213
  DepartmentId: 0,
211
214
  Email: email,
212
- Department: "",
213
- UserAvatar: "",
214
- keywords: "",
215
+ Department: '',
216
+ UserAvatar: '',
217
+ keywords: '',
215
218
  nextPage: 1
216
219
  };
217
220
  })
@@ -239,13 +242,15 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
239
242
  isEnd = _this$state.isEnd,
240
243
  departments = _this$state.departments,
241
244
  keywords = _this$state.keywords,
242
- remembered = _this$state.remembered;
245
+ remembered = _this$state.remembered; // container
246
+
243
247
  var _this$props = this.props,
244
248
  className = _this$props.className,
245
249
  okrPopType = _this$props.okrPopType,
246
250
  parentId = _this$props.parentId,
247
- container = _this$props.container,
248
- hideCancelBtn = _this$props.hideCancelBtn;
251
+ hideCancelBtn = _this$props.hideCancelBtn,
252
+ alilgn = _this$props.alilgn,
253
+ autoAdjust = _this$props.autoAdjust;
249
254
  var activeItem = selected || {
250
255
  workId: parentId
251
256
  };
@@ -258,8 +263,8 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
258
263
  ref: function ref(r) {
259
264
  return _this3.pop = r;
260
265
  },
261
- align: this.props.alilgn,
262
- autoAdjust: this.props.autoAdjust,
266
+ align: alilgn,
267
+ autoAdjust: autoAdjust,
263
268
  onBeforeShow: this.onBeforeShow,
264
269
  onAfterShow: this.onAfterShow,
265
270
  onBeforeHide: this.onBeforeShow,
@@ -272,7 +277,7 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
272
277
  }, /*#__PURE__*/_react["default"].createElement(_styledComponents.Header, null, (0, _constant.getPopType)()[okrPopType], /*#__PURE__*/_react["default"].createElement("i", {
273
278
  className: "tu-icon-close",
274
279
  style: {
275
- cursor: "pointer"
280
+ cursor: 'pointer'
276
281
  },
277
282
  onClick: this.hide
278
283
  })), /*#__PURE__*/_react["default"].createElement(_styledComponents.Body, null, /*#__PURE__*/_react["default"].createElement(_Filter["default"], {
@@ -291,11 +296,10 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
291
296
  ref: function ref(r) {
292
297
  return _this3.list = r;
293
298
  }
294
- }, data.map(function (d, i) {
299
+ }, data.map(function (d) {
295
300
  return /*#__PURE__*/_react["default"].createElement(_Item["default"], {
296
301
  data: d,
297
302
  keywords: keywords,
298
- key: "".concat(d.workId).concat(i),
299
303
  active: activeItem,
300
304
  onSelect: function onSelect(data) {
301
305
  return _this3.handleSelect(data);
@@ -306,21 +310,21 @@ var ChangeOkr = /*#__PURE__*/function (_PureComponent) {
306
310
  onClick: function onClick() {
307
311
  return _this3.getListData(true);
308
312
  }
309
- }, loadingMore ? "".concat((0, _getLocale.getLocale)("Mod_loading"), "\u2026") : (0, _getLocale.getLocale)("OKR_MyO_Butt_Loadmore"), /*#__PURE__*/_react["default"].createElement("i", {
313
+ }, loadingMore ? "".concat((0, _getLocale.getLocale)('Mod_loading'), "\u2026") : (0, _getLocale.getLocale)('OKR_MyO_Butt_Loadmore'), /*#__PURE__*/_react["default"].createElement("i", {
310
314
  className: "tu-icon-arrow-down"
311
- }))), !!data.length && isEnd && /*#__PURE__*/_react["default"].createElement(_styledComponents.NoMore, null, (0, _getLocale.getLocale)("Mod_Nomore"), "\uFF5E"))), /*#__PURE__*/_react["default"].createElement(_styledComponents.Footer, null, okrPopType === 1 && parentId != 0 && !hideCancelBtn && /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
315
+ }))), !!data.length && isEnd && /*#__PURE__*/_react["default"].createElement(_styledComponents.NoMore, null, (0, _getLocale.getLocale)('Mod_Nomore'), "\uFF5E"))), /*#__PURE__*/_react["default"].createElement(_styledComponents.Footer, null, okrPopType === 1 && parentId !== 0 && !hideCancelBtn && /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
312
316
  type: "confirm",
313
317
  onClick: this.handleUnConnect
314
- }, (0, _getLocale.getLocale)("OKR_MyO_Text_Cancel")), /*#__PURE__*/_react["default"].createElement(_styledComponents.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
318
+ }, (0, _getLocale.getLocale)('OKR_MyO_Text_Cancel')), /*#__PURE__*/_react["default"].createElement(_styledComponents.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
315
319
  onClick: this.hide
316
- }, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
320
+ }, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_styledComponents.Button, {
317
321
  style: {
318
322
  marginLeft: 15
319
323
  },
320
- disabled: !selected && parentId == 0,
324
+ disabled: !selected && parentId === 0,
321
325
  type: "confirm",
322
326
  onClick: this.handleConfirm
323
- }, (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine"))))));
327
+ }, (0, _getLocale.getLocale)('OKR_MyO_Butt_Determine'))))));
324
328
  }
325
329
  }]);
326
330
 
@@ -335,9 +339,9 @@ ChangeOkr.defaultProps = {
335
339
  var _initialiseProps = function _initialiseProps() {
336
340
  var _this4 = this;
337
341
 
338
- this.PAGE_ID = this.props.okrPopType == 1 ? 40001 : 40011;
342
+ this.PAGE_ID = this.props.okrPopType === 1 ? 40001 : 40011;
339
343
  this.DATA_KEY = "62_".concat((0, _bsGlobal.getUserInfo)().Id);
340
- this.KRSetting = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting;
344
+ this.KRSetting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting;
341
345
  this.page = 1;
342
346
  this.moveX = 0;
343
347
  this.pending = false;
@@ -363,9 +367,9 @@ var _initialiseProps = function _initialiseProps() {
363
367
  });
364
368
  }
365
369
 
366
- if (okrPopType == 1) {
370
+ if (okrPopType === 1) {
367
371
  _this4.setState({
368
- keywords: "",
372
+ keywords: '',
369
373
  nextPage: 1
370
374
  });
371
375
  }
@@ -386,21 +390,21 @@ var _initialiseProps = function _initialiseProps() {
386
390
  };
387
391
 
388
392
  this.onBeforeShow = function () {
389
- var p = document.querySelector(".okr-panel-changeOkrPop"); // @ts-ignore
393
+ var p = document.querySelector('.okr-panel-changeOkrPop'); // @ts-ignore
390
394
 
391
395
  p && (p.style.transform = "translate(".concat(_this4.moveX, "px,-20px) scale(0)"));
392
396
  };
393
397
 
394
398
  this.onAfterShow = function () {
395
- var p = document.querySelector(".okr-panel-changeOkrPop"); // @ts-ignore
399
+ var p = document.querySelector('.okr-panel-changeOkrPop'); // @ts-ignore
396
400
 
397
- p && (p.style.transform = "translate(0,0) scale(1)");
401
+ p && (p.style.transform = 'translate(0,0) scale(1)');
398
402
  };
399
403
 
400
404
  this.handleFilterChange = function (propName, value) {
401
405
  var _this4$setState;
402
406
 
403
- if (propName == "clear") {
407
+ if (propName === 'clear') {
404
408
  _this4.setState({
405
409
  users: [],
406
410
  departments: [],
@@ -419,7 +423,7 @@ var _initialiseProps = function _initialiseProps() {
419
423
 
420
424
  _this4.setState((_this4$setState = {}, _defineProperty(_this4$setState, propName, value), _defineProperty(_this4$setState, "nextPage", 1), _defineProperty(_this4$setState, "remembered", false), _this4$setState), _this4.getListData);
421
425
 
422
- if (propName == "remembered" && value) {
426
+ if (propName === 'remembered' && value) {
423
427
  _this4.setState(_defineProperty({}, propName, value));
424
428
 
425
429
  _this4.saveCondition(_this4.state.users, _this4.state.departments);
@@ -427,7 +431,7 @@ var _initialiseProps = function _initialiseProps() {
427
431
  return;
428
432
  }
429
433
 
430
- if (propName == "remembered" && !value) {
434
+ if (propName === 'remembered' && !value) {
431
435
  _this4.setState(_defineProperty({}, propName, value));
432
436
 
433
437
  _this4.deleteCondition();
@@ -435,7 +439,7 @@ var _initialiseProps = function _initialiseProps() {
435
439
  };
436
440
 
437
441
  this.saveCondition = function (users, depts) {
438
- var url = (0, _requestV.getApiUrl)("customizequery/condition/save");
442
+ var url = (0, _requestV.getApiUrl)('customizequery/condition/save');
439
443
  var departmentIdsArr = depts.map(function (item) {
440
444
  return item.Id;
441
445
  });
@@ -449,31 +453,31 @@ var _initialiseProps = function _initialiseProps() {
449
453
  // 用户ID_项目ID_里程碑ID
450
454
  pageId: _this4.PAGE_ID,
451
455
  // 列表页Id
452
- startTime: "",
456
+ startTime: '',
453
457
  // 开始时间
454
- endTime: "",
458
+ endTime: '',
455
459
  // 结束时间
456
- departmentIds: departmentIdsArr.join(","),
460
+ departmentIds: departmentIdsArr.join(','),
457
461
  // 部门id
458
462
  userObjects: [{
459
- Id: "",
460
- Name: "",
461
- Email: "",
463
+ Id: '',
464
+ Name: '',
465
+ Email: '',
462
466
  Relation: 0
463
467
  }],
464
468
  // 用户id
465
- scope: "",
466
- // 范围
467
- categoryIds: "",
469
+ scope: '',
470
+ //范围
471
+ categoryIds: '',
468
472
  // 分类
469
- sortType: "",
473
+ sortType: '',
470
474
  // 排序
471
475
  annualNum: year,
472
476
  // 0 -1 undefined 1999
473
477
  status: status,
474
478
  okrType: type,
475
- cycleType: cycle ? "".concat(cycle).split(",")[0] : null,
476
- yqmNum: cycle ? "".concat(cycle).split(",")[1] : null
479
+ cycleType: cycle ? "".concat(cycle).split(',')[0] : null,
480
+ yqmNum: cycle ? "".concat(cycle).split(',')[1] : null
477
481
  };
478
482
  data.userObjects = [];
479
483
  users.forEach(function (item) {
@@ -484,21 +488,23 @@ var _initialiseProps = function _initialiseProps() {
484
488
  Relation: 0
485
489
  });
486
490
  });
487
- (0, _requestV.taker)(url, "POST", data);
491
+ (0, _requestV.taker)(url, 'POST', data);
488
492
  };
489
493
 
490
494
  this.deleteCondition = function () {
491
495
  var url = (0, _requestV.getApiUrl)("customizequery/condition/delete?dataKey=".concat(_this4.DATA_KEY, "&pageId=").concat(_this4.PAGE_ID));
492
- (0, _requestV.taker)(url, "DELETE", {});
496
+ (0, _requestV.taker)(url, 'DELETE', {});
493
497
  };
494
498
 
495
499
  this.scollListToTop = function () {
496
- _this4.list && (_this4.list.scrollTop = 0);
500
+ if (_this4.list) {
501
+ _this4.list.scrollTop = 0;
502
+ }
497
503
  };
498
504
 
499
505
  this.getListData = /*#__PURE__*/function () {
500
506
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(isLoading) {
501
- var _this4$state2, status, cycle, year, keywords, type, users, departments, data, nextPage, url;
507
+ var _this4$state2, keywords, type, users, departments, data, nextPage, toUserId, _this4$state3, status, cycle, year, okrPopType, url;
502
508
 
503
509
  return regeneratorRuntime.wrap(function _callee$(_context) {
504
510
  while (1) {
@@ -512,11 +518,13 @@ var _initialiseProps = function _initialiseProps() {
512
518
  return _context.abrupt("return");
513
519
 
514
520
  case 2:
515
- _this4$state2 = _this4.state, status = _this4$state2.status, cycle = _this4$state2.cycle, year = _this4$state2.year, keywords = _this4$state2.keywords, type = _this4$state2.type, users = _this4$state2.users, departments = _this4$state2.departments, data = _this4$state2.data, nextPage = _this4$state2.nextPage;
516
- cycle = cycle || "-1";
521
+ _this4$state2 = _this4.state, keywords = _this4$state2.keywords, type = _this4$state2.type, users = _this4$state2.users, departments = _this4$state2.departments, data = _this4$state2.data, nextPage = _this4$state2.nextPage, toUserId = _this4$state2.toUserId;
522
+ _this4$state3 = _this4.state, status = _this4$state3.status, cycle = _this4$state3.cycle, year = _this4$state3.year;
523
+ okrPopType = _this4.props.okrPopType;
524
+ cycle = cycle || '-1';
517
525
  year = year || -1;
518
526
  status = status || 0;
519
- url = (0, _requestV.getApiUrl)("okr/search");
527
+ url = (0, _requestV.getApiUrl)('okr/search');
520
528
  _this4.pending = true;
521
529
 
522
530
  if (isLoading) {
@@ -529,38 +537,38 @@ var _initialiseProps = function _initialiseProps() {
529
537
  _this4.page = 1;
530
538
  }
531
539
 
532
- (0, _requestV.taker)(url, "POST", {
540
+ (0, _requestV.taker)(url, 'POST', {
533
541
  // 优秀!
534
542
 
535
543
  /**
536
544
  * pageNum: 0
537
545
  * pageSize: 20
538
546
  */
539
- cycleType: "".concat(cycle).split(",")[0],
540
- yqmNum: "".concat(cycle).split(",")[1] || 0,
547
+ cycleType: "".concat(cycle).split(',')[0],
548
+ yqmNum: "".concat(cycle).split(',')[1] || 0,
541
549
  // 如果是 undefined 就控制成 0 说明没有第二条件
542
550
  annualNum: year,
543
- pageNum: nextPage == 0 ? 1 : _this4.page,
551
+ pageNum: nextPage === 0 ? 1 : _this4.page,
544
552
  // pageNum 最小是1
545
553
  pageSize: pageSize,
546
554
  status: status,
547
555
  keywords: keywords,
548
- okrType: type == -1 ? "" : type,
549
- orderType: 13,
550
- // 13:按人员排序
556
+ okrType: type === -1 ? '' : type,
557
+ orderType: 1,
558
+ // 13:按人员排序 1按照创建时间最晚排序
551
559
  departmentIds: departments.map(function (d) {
552
560
  return d.Id;
553
- }).join(","),
561
+ }).join(','),
554
562
  userIds: users.map(function (u) {
555
563
  return u.Id;
556
- }).join(","),
557
- searchKr: _this4.props.okrPopType,
564
+ }).join(','),
565
+ searchKr: okrPopType,
558
566
  // 是否搜索KR:默认为0-不搜索,1-只有对齐目标弹层可以搜索KR
559
- toUserId: _this4.state.toUserId
567
+ toUserId: toUserId
560
568
  }).then(function (res) {
561
569
  _this4.pending = false;
562
570
  var resData = res && res.Data && res.Data.works || [];
563
- var isRefresh = _this4.page == 1;
571
+ var isRefresh = _this4.page === 1;
564
572
 
565
573
  _this4.setState({
566
574
  nextPage: res.Data.nextPage,
@@ -568,16 +576,24 @@ var _initialiseProps = function _initialiseProps() {
568
576
  data: isRefresh ? resData : [].concat(_toConsumableArray(data), _toConsumableArray(resData)),
569
577
  isEnd: res.Data.nextPage === 0
570
578
  }, function () {
571
- isRefresh && _this4.scollListToTop();
579
+ console.log(_this4.state.data);
580
+
581
+ if (isRefresh) {
582
+ _this4.scollListToTop();
583
+ }
572
584
  });
573
- })["catch"](function (e) {
585
+ })["catch"](function () {
574
586
  _this4.pending = false;
575
- _this4.state.loadingMore && _this4.setState({
576
- loadingMore: false
577
- });
587
+ var loadingMore = _this4.state.loadingMore;
588
+
589
+ if (loadingMore) {
590
+ _this4.setState({
591
+ loadingMore: false
592
+ });
593
+ }
578
594
  });
579
595
 
580
- case 10:
596
+ case 12:
581
597
  case "end":
582
598
  return _context.stop();
583
599
  }
@@ -601,7 +617,7 @@ var _initialiseProps = function _initialiseProps() {
601
617
  selectData.workId = 0;
602
618
  }
603
619
 
604
- if (selected && (selectData.workId && selected.workId && selectData.workId == selected.workId || selectData.mileStoneId && selected.mileStoneId && selectData.mileStoneId == selected.mileStoneId)) return;
620
+ if (selected && (selectData.workId && selected.workId && selectData.workId === selected.workId || selectData.mileStoneId && selected.mileStoneId && selectData.mileStoneId === selected.mileStoneId)) return;
605
621
 
606
622
  _this4.setState({
607
623
  selected: selectData,
@@ -610,9 +626,12 @@ var _initialiseProps = function _initialiseProps() {
610
626
  };
611
627
 
612
628
  this.handleConfirm = function () {
613
- var _this4$state3 = _this4.state,
614
- selected = _this4$state3.selected,
615
- selectOkr = _this4$state3.selectOkr;
629
+ var _this4$state4 = _this4.state,
630
+ selected = _this4$state4.selected,
631
+ selectOkr = _this4$state4.selectOkr;
632
+ var _this4$props2 = _this4.props,
633
+ onConfirm = _this4$props2.onConfirm,
634
+ parentId = _this4$props2.parentId;
616
635
  var parentType = selected && selected.mileStoneId ? 2 : 1; // 临时注入
617
636
 
618
637
  var data = _objectSpread(_objectSpread({}, selected), {}, {
@@ -621,28 +640,30 @@ var _initialiseProps = function _initialiseProps() {
621
640
 
622
641
 
623
642
  data.parentType = parentType;
643
+ data.workName = (0, _tools.htmlToText)(data.workName);
624
644
 
625
- if (selected && (selected.workId || selected.mileStoneId) != _this4.props.parentId) {
626
- _this4.props.onConfirm(data);
645
+ if (selected && (selected.workId || selected.mileStoneId) !== parentId) {
646
+ onConfirm(data);
627
647
  }
628
648
 
629
649
  _this4.hide();
630
650
  };
631
651
 
632
652
  this.handleUnConnect = function () {
633
- // 取消关联对齐目标
634
- _this4.props.onConfirm({
653
+ var onConfirm = _this4.props.onConfirm; // 取消关联对齐目标
654
+
655
+ onConfirm({
635
656
  workId: 0,
636
- workName: "",
657
+ workName: '',
637
658
  mileStoneId: 0,
638
- mileStoneName: "",
659
+ mileStoneName: '',
639
660
  parentType: 0
640
661
  });
641
662
 
642
663
  _this4.setState({
643
664
  selected: {
644
665
  workId: 0,
645
- workName: ""
666
+ workName: ''
646
667
  }
647
668
  });
648
669
 
@@ -11,7 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _reactTooltip = _interopRequireDefault(require("react-tooltip"));
13
13
 
14
- var _avatar = _interopRequireDefault(require("../../components-v1/avatar"));
14
+ var _avatar = _interopRequireDefault(require("../avatar"));
15
15
 
16
16
  var _Portals = _interopRequireDefault(require("../../components-v1/portals/Portals"));
17
17
 
@@ -64,7 +64,11 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
64
64
  return /*#__PURE__*/_react["default"].createElement(_style.CommunicationItem, {
65
65
  className: className
66
66
  }, /*#__PURE__*/_react["default"].createElement(_avatar["default"], {
67
- size: _avatar["default"].size(7),
67
+ size: {
68
+ width: 28,
69
+ fontSize: 14,
70
+ textNum: 1
71
+ },
68
72
  name: communicationTrack.publishUser.name,
69
73
  src: communicationTrack.publishUser.avatar.small,
70
74
  color: communicationTrack.publishUser.avatar.color,
@@ -72,14 +76,18 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
72
76
  }), /*#__PURE__*/_react["default"].createElement(_style.CommunicationDetail, null, /*#__PURE__*/_react["default"].createElement("p", {
73
77
  style: {
74
78
  color: "#3a4247",
75
- wordBreak: "break-all"
79
+ wordBreak: "break-all",
80
+ display: 'flex',
81
+ alignItems: 'center'
76
82
  }
77
83
  }, communicationTrack.commentType != 2 ? /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
78
84
  userName: communicationTrack.publishUser.name,
79
85
  userId: communicationTrack.publishUser.userId
80
86
  }), /*#__PURE__*/_react["default"].createElement("span", {
81
- className: "".concat(prefix, "__communication-colon")
82
- }, "\uFF1A")) : /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
87
+ className: "".concat(prefix, "__communication-time")
88
+ }, /*#__PURE__*/_react["default"].createElement("span", {
89
+ className: "".concat(prefix, "__communication-time-point")
90
+ }, "\xB7"), communicationTrack.createDate)) : /*#__PURE__*/_react["default"].createElement("span", null, /*#__PURE__*/_react["default"].createElement(_ConvertUserName["default"], {
83
91
  userName: communicationTrack.publishUser.name,
84
92
  userId: communicationTrack.publishUser.userId
85
93
  }), /*#__PURE__*/_react["default"].createElement("span", {
@@ -88,25 +96,23 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
88
96
  userName: communicationTrack.parentUser.name,
89
97
  userId: communicationTrack.parentUser.userId
90
98
  }), /*#__PURE__*/_react["default"].createElement("span", {
91
- className: "".concat(prefix, "__communication-colon")
92
- }, "\uFF1A"), /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
99
+ className: "".concat(prefix, "__communication-time")
100
+ }, /*#__PURE__*/_react["default"].createElement("span", {
101
+ className: "".concat(prefix, "__communication-time-point")
102
+ }, "\xB7"), communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_Portals["default"], null, /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
93
103
  html: true,
94
104
  className: "tt-react-tooltip",
95
105
  place: "top",
96
106
  type: "dark",
97
107
  effect: "solid"
98
- }))), /*#__PURE__*/_react["default"].createElement("span", {
108
+ })))), /*#__PURE__*/_react["default"].createElement("span", {
99
109
  className: "".concat(prefix, "__communication-content"),
100
110
  ref: contentRef
101
- }, (0, _openData.parseTag)(communicationTrack.content.trim()))), communicationTrack.attachments && /*#__PURE__*/_react["default"].createElement("div", {
111
+ }, (0, _openData.parseTag)(communicationTrack.content.trim())), communicationTrack.attachments && /*#__PURE__*/_react["default"].createElement("div", {
102
112
  className: "".concat(prefix, "__communication-attachments")
103
113
  }, /*#__PURE__*/_react["default"].createElement(_fileList["default"], {
104
114
  data: communicationTrack.attachments
105
- })), /*#__PURE__*/_react["default"].createElement("div", {
106
- className: "".concat(prefix, "__communication-bottom")
107
- }, /*#__PURE__*/_react["default"].createElement("span", {
108
- className: "".concat(prefix, "__communication-time")
109
- }, communicationTrack.createDate), /*#__PURE__*/_react["default"].createElement(_style.CommunicationActionbar, {
115
+ })), /*#__PURE__*/_react["default"].createElement(_style.CommunicationActionbar, {
110
116
  className: "communication__actionbar"
111
117
  }, /*#__PURE__*/_react["default"].createElement(_style.ActionbarList, null, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, {
112
118
  onMouseDown: function onMouseDown(event) {
@@ -135,7 +141,7 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
135
141
  onSubmit: function onSubmit(event) {
136
142
  return onCommunicationRecordChange(event, "delete", index);
137
143
  }
138
- }, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, null, (0, _getLocale.getLocale)("Mod_Delete"))))))), /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
144
+ }, /*#__PURE__*/_react["default"].createElement(_style.ActionbarItem, null, (0, _getLocale.getLocale)("Mod_Delete")))))), /*#__PURE__*/_react["default"].createElement(_reactTooltip["default"], {
139
145
  id: "praise-record",
140
146
  className: "tt-react-tooltip",
141
147
  place: "top",
@@ -5,17 +5,11 @@
5
5
  margin: 0 8px;
6
6
  }
7
7
 
8
- .titaui-communication__communication-colon {
9
- font-size: 14px;
10
- font-weight: 600;
11
- color: #3f4755;
12
- line-height: 22px;
13
- }
14
-
15
8
  .titaui-communication__communication-content {
16
9
  font-size: 14px;
17
10
  color: #6f7886;
18
11
  line-height: 22px;
12
+ position: relative;
19
13
  }
20
14
 
21
15
  .titaui-communication__communication-content .highlight {
@@ -47,9 +41,14 @@
47
41
 
48
42
  .titaui-communication__communication-time {
49
43
  font-size: 12px;
50
- color: #89919f;
44
+ font-weight: 400;
45
+ color: #89919F;
51
46
  line-height: 18px;
52
- margin-top: 4px;
47
+ margin-left: 6px;
48
+ }
49
+
50
+ .titaui-communication__communication-time-point {
51
+ margin-right: 4px;
53
52
  }
54
53
 
55
54
  .titaui-communication__communication-bottom {
@@ -57,7 +56,7 @@
57
56
  }
58
57
 
59
58
  .titaui-communication__communication-list {
60
- margin-bottom: 8px;
59
+ margin-bottom: 12px;
61
60
  }
62
61
 
63
62
  .titaui-communication__communication-attachments {
@@ -68,8 +67,49 @@
68
67
  display: flex;
69
68
  align-items: center;
70
69
  user-select: none;
70
+ color: #2879ff;
71
71
  }
72
72
 
73
73
  .titaui-communication__communication-total-icon {
74
74
  margin-left: 4px;
75
+ margin-top: -2px;
76
+ }
77
+
78
+ .titaui-communication__reply-container-text {
79
+ margin-right: 4px;
80
+ }
81
+
82
+ .titaui-communication__reply-container--show-user {
83
+ margin-left: 40px;
84
+ margin-top: -12px;
85
+ }
86
+
87
+ .titaui-communication__reply-default-input {
88
+ display: flex;
89
+ }
90
+
91
+ .titaui-communication__reply-default-input-text {
92
+ flex: 1;
93
+ cursor: text;
94
+ font-size: 14px;
95
+ color: #BFC7D5;
96
+ line-height: 22px;
97
+ margin-left: 12px;
98
+ height: 32px;
99
+ border-radius: 16px;
100
+ background: rgba(240, 244, 250, 0.6);
101
+ border-radius: 16px;
102
+ border: 1px solid #E9ECF0;
103
+ display: flex;
104
+ align-items: center;
105
+ box-sizing: border-box;
106
+ padding-left: 12px;
107
+ }
108
+
109
+ .titaui-communication__reply-default-input-avatar {
110
+ height: 32px;
111
+ }
112
+
113
+ .titaui-communication__reply-default-input-avatar .titaui-pc-avator-container {
114
+ display: inline-flex;
75
115
  }