@titaui/pc 1.10.8 → 1.10.9

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