@titaui/pc 1.11.41 → 1.11.44

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 (58) hide show
  1. package/lib/components/avatar/name-avatar/index.css +1 -0
  2. package/lib/components/avatar/name-avatar/index.js +22 -13
  3. package/lib/components/button/rect-btn/index.css +45 -11
  4. package/lib/components/button/rect-btn/index.js +12 -6
  5. package/lib/components/change-okr-modal/index.js +2 -1
  6. package/lib/components/checkbox/index.css +3 -3
  7. package/lib/components/create-okr-modal/index.js +45 -41
  8. package/lib/components/create-okr-modal/request-api.js +1 -1
  9. package/lib/components/dialog-confirm/index.css +2 -2
  10. package/lib/components/drawer/headerAction.js +5 -1
  11. package/lib/components/drawer/headerDrop.js +42 -4
  12. package/lib/components/drawer/index.css +33 -0
  13. package/lib/components/drawer/index.js +26 -3
  14. package/lib/components/dynamic/new-ui.css +4 -4
  15. package/lib/components/dynamic/online-broadcast/data.js +19 -1
  16. package/lib/components/e-priority/index.css +4 -4
  17. package/lib/components/e-priority/index.js +10 -2
  18. package/lib/components/mblog/components/MblogContent.js +5 -2
  19. package/lib/components/nav-top/components/user-message/components/todos/index.css +1 -0
  20. package/lib/components/nav-top/index.js +6 -2
  21. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
  22. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
  23. package/lib/components/okr-detail/components/header/index.js +10 -3
  24. package/lib/components/okr-detail/components/header/o-name.js +10 -3
  25. package/lib/components/okr-detail/components/o-classify.js +5 -1
  26. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +13 -14
  27. package/lib/components/okr-detail/detail-header/constant.js +53 -0
  28. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +111 -54
  29. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +59 -0
  30. package/lib/components/okr-detail/detail-header/index.css +11 -0
  31. package/lib/components/okr-detail/detail-header/index.js +228 -234
  32. package/lib/components/okr-detail/helper.js +108 -0
  33. package/lib/components/okr-detail/index.js +21 -4
  34. package/lib/components/okr-detail/okr-list/index.js +8 -3
  35. package/lib/components/okr-detail/request-apis.js +14 -8
  36. package/lib/components/okr-period-selector/index.js +9 -5
  37. package/lib/components/okr-period-selector/select-cycle.js +23 -19
  38. package/lib/components/operation-records/index.js +1 -1
  39. package/lib/components/operation-records/style.js +1 -1
  40. package/lib/components/task-relation-modal/index.js +0 -1
  41. package/lib/components/task-relation-modal/request-api.js +2 -1
  42. package/lib/components/task-tree/task-item-node/constant.js +13 -1
  43. package/lib/components/textarea/index.css +142 -0
  44. package/lib/components/textarea/index.js +259 -0
  45. package/lib/components/toast/index.js +5 -3
  46. package/lib/index.js +40 -0
  47. package/lib/pages/new-okr-list/header/common.js +52 -0
  48. package/lib/pages/new-okr-list/header/index.css +45 -0
  49. package/lib/pages/new-okr-list/header/index.js +51 -29
  50. package/lib/pages/new-okr-list/header/operate-record.js +129 -0
  51. package/lib/pages/new-okr-list/index.js +4 -2
  52. package/lib/pages/new-okr-list/list/index.js +19 -2
  53. package/lib/pages/new-okr-list/request-api.js +8 -2
  54. package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
  55. package/lib/utils/format-time.js +8 -1
  56. package/lib/utils/open-data.js +5 -1
  57. package/package.json +1 -1
  58. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
@@ -55,4 +55,5 @@
55
55
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
56
56
  color: #6F7886;
57
57
  line-height: 20px;
58
+ margin-left: 4px;
58
59
  }
@@ -58,7 +58,10 @@ var NameAvatar = function NameAvatar(props) {
58
58
  onDelUser = props.onDelUser,
59
59
  _props$textWidth = props.textWidth,
60
60
  textWidth = _props$textWidth === void 0 ? 42 : _props$textWidth,
61
- textClass = props.textClass;
61
+ textClass = props.textClass,
62
+ renderRightTopCmp = props.renderRightTopCmp,
63
+ _props$avatarTips = props.avatarTips,
64
+ avatarTips = _props$avatarTips === void 0 ? '' : _props$avatarTips;
62
65
  var hasAvatar = src && !src.match(/default\w*.jpg$/);
63
66
 
64
67
  var _useState = (0, _react.useState)(false),
@@ -103,7 +106,7 @@ var NameAvatar = function NameAvatar(props) {
103
106
  style: {
104
107
  width: size.width,
105
108
  height: size.width,
106
- verticalAlign: "top"
109
+ verticalAlign: 'top'
107
110
  },
108
111
  src: src
109
112
  });
@@ -120,11 +123,11 @@ var NameAvatar = function NameAvatar(props) {
120
123
  }
121
124
  }, /*#__PURE__*/_react["default"].createElement("div", {
122
125
  style: {
123
- display: "inline-block",
126
+ display: 'inline-block',
124
127
  width: "".concat(size.fontSize, "px"),
125
- margin: "0 auto",
126
- overflow: "hidden",
127
- whiteSpace: "nowrap",
128
+ margin: '0 auto',
129
+ overflow: 'hidden',
130
+ whiteSpace: 'nowrap',
128
131
  fontSize: "".concat(size.fontSize, "px"),
129
132
  lineHeight: "".concat(size.width, "px")
130
133
  }
@@ -134,7 +137,7 @@ var NameAvatar = function NameAvatar(props) {
134
137
  })));
135
138
  }
136
139
 
137
- var cuttedName = "";
140
+ var cuttedName = '';
138
141
  var cuttedNameLen = 0;
139
142
 
140
143
  for (var i = 0, lent = name.length; i < lent; i++) {
@@ -167,11 +170,11 @@ var NameAvatar = function NameAvatar(props) {
167
170
  className: "titaui-pc-avator__name-avatar-container",
168
171
  onMouseEnter: handleMouseEnter,
169
172
  onMouseLeave: handleMouseLeave
170
- }, /*#__PURE__*/_react["default"].createElement("div", {
173
+ }, renderRightTopCmp, /*#__PURE__*/_react["default"].createElement("div", {
171
174
  onClick: handleDelUser,
172
175
  onMouseLeave: handleCloseIconMouseLeave,
173
176
  onMouseEnter: handleCloseIconMouseEnter,
174
- className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ? "titaui-pc-avator--enter" : ""),
177
+ className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ? 'titaui-pc-avator--enter' : ''),
175
178
  style: {
176
179
  left: "".concat(size.width - 14, "px")
177
180
  }
@@ -185,7 +188,10 @@ var NameAvatar = function NameAvatar(props) {
185
188
  onClick: onClick,
186
189
  onMouseEnter: onMouseEnter,
187
190
  onMouseLeave: onMouseLeave
188
- }, hasAvatar ? renderImgAvatar() : renderTextAvatar()), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
191
+ }, avatarTips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
192
+ overlay: avatarTips,
193
+ placement: "top"
194
+ }, hasAvatar ? renderImgAvatar() : renderTextAvatar()), !avatarTips && (hasAvatar ? renderImgAvatar() : renderTextAvatar())), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
189
195
  overlay: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
190
196
  name: name,
191
197
  id: userId
@@ -194,14 +200,17 @@ var NameAvatar = function NameAvatar(props) {
194
200
  }, /*#__PURE__*/_react["default"].createElement("span", {
195
201
  className: "titaui-pc-avator__name ".concat(textClass),
196
202
  style: {
197
- width: textWidth
203
+ maxWidth: textWidth
198
204
  }
199
205
  }, /*#__PURE__*/_react["default"].createElement("span", {
200
206
  ref: textRef
201
- }, name))) : /*#__PURE__*/_react["default"].createElement("span", {
207
+ }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
208
+ name: name,
209
+ id: userId
210
+ })))) : /*#__PURE__*/_react["default"].createElement("span", {
202
211
  className: "titaui-pc-avator__name ".concat(textClass),
203
212
  style: {
204
- width: textWidth
213
+ maxWidth: textWidth
205
214
  }
206
215
  }, /*#__PURE__*/_react["default"].createElement("span", {
207
216
  ref: textRef
@@ -13,7 +13,7 @@
13
13
  align-items: center;
14
14
  justify-content: center;
15
15
  min-width: 64px;
16
- font-size: 13px;
16
+ font-size: 14px;
17
17
  padding: 0 12px;
18
18
  }
19
19
 
@@ -60,21 +60,35 @@
60
60
  background: #5c8eff;
61
61
  }
62
62
 
63
+ .titaui-rect-btn--secondary {
64
+ font-size: 14px;
65
+ font-weight: normal;
66
+ color: #2879ff;
67
+ line-height: 28px;
68
+ background: rgba(40, 121, 255, 0.2);
69
+ margin-right: 16px;
70
+ }
71
+
72
+ .titaui-rect-btn--secondary:hover {
73
+ color: #fff;
74
+ background-color: #2879ff;
75
+ }
76
+
63
77
  .titaui-rect-btn--cancel {
64
- color: #6F7886;
65
- border: 1px solid #DFE3EA;
66
- background: #FFFFFF;
78
+ color: #6f7886;
79
+ border: 1px solid #dfe3ea;
80
+ background: #ffffff;
67
81
  }
68
82
 
69
83
  .titaui-rect-btn--cancel:hover {
70
- color: #2879FF;
71
- border: 1px solid #2879FF;
84
+ color: #2879ff;
85
+ border: 1px solid #2879ff;
72
86
  }
73
87
 
74
88
  .titaui-rect-btn--delete {
75
- background: #FFFFFF;
76
- color: #F05E5E;
77
- border: 1px solid #F05E5E;
89
+ background: #ffffff;
90
+ color: #f05e5e;
91
+ border: 1px solid #f05e5e;
78
92
  }
79
93
 
80
94
  .titaui-rect-btn--delete:hover {
@@ -92,11 +106,31 @@
92
106
  user-select: none;
93
107
  }
94
108
 
109
+ .titaui-rect-btn--disabled:hover .titaui-rect-btn--default:hover {
110
+ background: #fff;
111
+ }
112
+
113
+ .titaui-rect-btn--disabled:hover .titaui-rect-btn--primary:hover {
114
+ background: #2879ff;
115
+ }
116
+
117
+ .titaui-rect-btn--disabled:hover .titaui-rect-btn--secondary:hover {
118
+ background: rgba(40, 121, 255, 0.2);
119
+ }
120
+
121
+ .titaui-rect-btn--disabled:hover .titaui-rect-btn--cancel:hover {
122
+ background: #ffffff;
123
+ }
124
+
125
+ .titaui-rect-btn--disabled:hover .titaui-rect-btn--delete:hover {
126
+ background: #ffffff;
127
+ }
128
+
95
129
  .titaui-rect-btn--primary.titaui-rect-btn--disabled {
96
- background: #93BCFF;
130
+ background: #93bcff;
97
131
  opacity: 1;
98
132
  }
99
133
 
100
134
  .titaui-rect-btn--primary.titaui-rect-btn--disabled:hover {
101
- background: #93BCFF;
135
+ background: #93bcff;
102
136
  }
@@ -34,7 +34,10 @@ function RectBtn(props) {
34
34
  className = _props$className === void 0 ? '' : _props$className,
35
35
  _props$disabled = props.disabled,
36
36
  disabled = _props$disabled === void 0 ? false : _props$disabled,
37
- style = props.style;
37
+ style = props.style,
38
+ children = props.children,
39
+ _props$loading = props.loading,
40
+ loading = _props$loading === void 0 ? false : _props$loading;
38
41
 
39
42
  var renderIcon = function renderIcon() {
40
43
  if (typeof icon === 'string') {
@@ -50,16 +53,19 @@ function RectBtn(props) {
50
53
  }, icon);
51
54
  };
52
55
 
53
- var onClickHandler = function onClickHandler() {
54
- if (disabled) return;
55
- onClick && onClick();
56
+ var onClickHandler = function onClickHandler(e) {
57
+ if (disabled || loading) return;
58
+
59
+ if (onClick) {
60
+ onClick(e);
61
+ }
56
62
  };
57
63
 
58
64
  return /*#__PURE__*/_react["default"].createElement("span", {
59
- className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled), className),
65
+ className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled || loading), className),
60
66
  style: style,
61
67
  onClick: onClickHandler
62
- }, icon && renderIcon(), props.children || text);
68
+ }, icon && renderIcon(), children || text);
63
69
  }
64
70
 
65
71
  var _default = RectBtn;
@@ -564,7 +564,8 @@ var _initialiseProps = function _initialiseProps() {
564
564
  }).join(','),
565
565
  searchKr: okrPopType,
566
566
  // 是否搜索KR:默认为0-不搜索,1-只有对齐目标弹层可以搜索KR
567
- toUserId: toUserId
567
+ toUserId: toUserId,
568
+ includeCreateFailApprovalOkr: false
568
569
  }).then(function (res) {
569
570
  _this4.pending = false;
570
571
  var resData = res && res.Data && res.Data.works || [];
@@ -2,9 +2,9 @@
2
2
  display: inline-block;
3
3
  width: 16px;
4
4
  height: 16px;
5
- background: #FFFFFF;
5
+ background: #ffffff;
6
6
  border-radius: 4px;
7
- border: 1px solid #DFE3EA;
7
+ border: 1px solid #bfc7d5;
8
8
  cursor: pointer;
9
9
  box-sizing: border-box;
10
10
  }
@@ -15,6 +15,6 @@
15
15
  }
16
16
 
17
17
  .titaui-checkbox--disabled {
18
- background-color: #F0F2F5;
18
+ background-color: #f0f2f5;
19
19
  cursor: not-allowed;
20
20
  }
@@ -117,7 +117,9 @@ function CreateOkrModal(_ref, ref) {
117
117
  _ref$visible = _ref.visible,
118
118
  visible = _ref$visible === void 0 ? false : _ref$visible,
119
119
  _ref$onClose = _ref.onClose,
120
- onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose;
120
+ onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
121
+ _ref$isFromAssess = _ref.isFromAssess,
122
+ isFromAssess = _ref$isFromAssess === void 0 ? false : _ref$isFromAssess;
121
123
 
122
124
  var _useState = (0, _react.useState)(visible),
123
125
  _useState2 = _slicedToArray(_useState, 2),
@@ -126,7 +128,7 @@ function CreateOkrModal(_ref, ref) {
126
128
 
127
129
 
128
130
  var userId = BSGlobal.loginUserInfo.Id;
129
- var setting = (0, _bsGlobal.getBSGlobal)("OkrAdvancedSetting").KRSetting;
131
+ var setting = (0, _bsGlobal.getBSGlobal)('OkrAdvancedSetting').KRSetting;
130
132
  var openOkrType = setting.OkrTypeSetting;
131
133
  var openClassify = setting.OkrClassify;
132
134
  var openKrWeight = setting.KrWeight;
@@ -136,7 +138,7 @@ function CreateOkrModal(_ref, ref) {
136
138
  Id = _ref2.Id,
137
139
  UserAvatar = _ref2.UserAvatar;
138
140
 
139
- var _useState3 = (0, _react.useState)(""),
141
+ var _useState3 = (0, _react.useState)(''),
140
142
  _useState4 = _slicedToArray(_useState3, 2),
141
143
  okrName = _useState4[0],
142
144
  setOkrName = _useState4[1]; // 目标名称
@@ -160,7 +162,7 @@ function CreateOkrModal(_ref, ref) {
160
162
 
161
163
  var _useState9 = (0, _react.useState)({
162
164
  departmentId: 0,
163
- departmentName: ""
165
+ departmentName: ''
164
166
  }),
165
167
  _useState10 = _slicedToArray(_useState9, 2),
166
168
  dept = _useState10[0],
@@ -169,7 +171,7 @@ function CreateOkrModal(_ref, ref) {
169
171
 
170
172
  var _useState11 = (0, _react.useState)({
171
173
  groupId: 0,
172
- groupName: ""
174
+ groupName: ''
173
175
  }),
174
176
  _useState12 = _slicedToArray(_useState11, 2),
175
177
  team = _useState12[0],
@@ -177,7 +179,7 @@ function CreateOkrModal(_ref, ref) {
177
179
 
178
180
 
179
181
  var _useState13 = (0, _react.useState)({
180
- typeName: (0, _getLocale.getLocale)("OKR_MyO_Pop_Individual"),
182
+ typeName: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
181
183
  typeId: 1
182
184
  }),
183
185
  _useState14 = _slicedToArray(_useState13, 2),
@@ -216,7 +218,7 @@ function CreateOkrModal(_ref, ref) {
216
218
  principalName: Name,
217
219
  userAvatar: UserAvatar,
218
220
  krWeight: 100,
219
- mileStoneName: "",
221
+ mileStoneName: '',
220
222
  confidenceIndex: 5
221
223
  }]),
222
224
  _useState24 = _slicedToArray(_useState23, 2),
@@ -226,7 +228,7 @@ function CreateOkrModal(_ref, ref) {
226
228
  var _useState25 = (0, _react.useState)({
227
229
  // 对其目标
228
230
  parentWorkId: 0,
229
- parentWorkName: "",
231
+ parentWorkName: '',
230
232
  parentType: 0,
231
233
  parentKrId: 0
232
234
  }),
@@ -283,7 +285,7 @@ function CreateOkrModal(_ref, ref) {
283
285
  tipIndex = _useState44[0],
284
286
  setTipIndex = _useState44[1];
285
287
 
286
- var _useState45 = (0, _react.useState)(""),
288
+ var _useState45 = (0, _react.useState)(''),
287
289
  _useState46 = _slicedToArray(_useState45, 2),
288
290
  userAvatarBase64Url = _useState46[0],
289
291
  setUserAvatarBase64Url = _useState46[1];
@@ -307,7 +309,7 @@ function CreateOkrModal(_ref, ref) {
307
309
  var modalRef = (0, _react.useRef)();
308
310
  var oInputFoucsRef = (0, _react.useRef)(false);
309
311
  var krInputFoucsRef = (0, _react.useRef)(false);
310
- var downloadDomRef = (0, _react.useRef)(document.createElement("div"));
312
+ var downloadDomRef = (0, _react.useRef)(document.createElement('div'));
311
313
  var newOkrDataRef = (0, _react.useRef)(); // kr权重总计
312
314
 
313
315
  var total = 0;
@@ -363,7 +365,7 @@ function CreateOkrModal(_ref, ref) {
363
365
  setShowCreatedSuccessInfo(true);
364
366
  setTipIndex(Math.floor(Math.random() * 6));
365
367
  } else {
366
- _toast["default"].Success((0, _getLocale.getLocale)("OKR_Db_Success"), {
368
+ _toast["default"].Success((0, _getLocale.getLocale)('OKR_Db_Success'), {
367
369
  duration: 3000
368
370
  });
369
371
 
@@ -407,7 +409,7 @@ function CreateOkrModal(_ref, ref) {
407
409
  break;
408
410
  }
409
411
 
410
- _toast["default"].Error((0, _getLocale.getLocale)("OKR_MyO_Pop_Targetname"), {
412
+ _toast["default"].Error((0, _getLocale.getLocale)('OKR_MyO_Pop_Targetname'), {
411
413
  canClose: false
412
414
  });
413
415
 
@@ -419,7 +421,7 @@ function CreateOkrModal(_ref, ref) {
419
421
  break;
420
422
  }
421
423
 
422
- _toast["default"].Error("目标名称不能超过500字", {
424
+ _toast["default"].Error('目标名称不能超过500字', {
423
425
  canClose: false
424
426
  });
425
427
 
@@ -431,7 +433,7 @@ function CreateOkrModal(_ref, ref) {
431
433
  break;
432
434
  }
433
435
 
434
- _toast["default"].Error("关键成果不能为空", {
436
+ _toast["default"].Error('关键成果不能为空', {
435
437
  canClose: false
436
438
  });
437
439
 
@@ -448,7 +450,7 @@ function CreateOkrModal(_ref, ref) {
448
450
  break;
449
451
  }
450
452
 
451
- _toast["default"].Error("关键成果不能超过500字", {
453
+ _toast["default"].Error('关键成果不能超过500字', {
452
454
  canClose: false
453
455
  });
454
456
 
@@ -462,7 +464,7 @@ function CreateOkrModal(_ref, ref) {
462
464
  break;
463
465
  }
464
466
 
465
- _toast["default"].Error((0, _getLocale.getLocale)("OKR_MyO_Pop_Totalkrnot100"), {
467
+ _toast["default"].Error((0, _getLocale.getLocale)('OKR_MyO_Pop_Totalkrnot100'), {
466
468
  canClose: false
467
469
  });
468
470
 
@@ -480,7 +482,7 @@ function CreateOkrModal(_ref, ref) {
480
482
  handleCreatedClose();
481
483
  visibilityArea = formatVisiableLimit();
482
484
  _context.next = 24;
483
- return (0, _requestApi.createWidthKr)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
485
+ return (0, _requestApi.createWidthKr)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
484
486
  krInfos: krDatas.map(function (kr) {
485
487
  return _objectSpread(_objectSpread({}, kr), {}, {
486
488
  startDate: cycle.startDate,
@@ -492,14 +494,16 @@ function CreateOkrModal(_ref, ref) {
492
494
  }, parent), {}, {
493
495
  workType: 6,
494
496
  visibility: visibility,
495
- okrClassify: openClassify ? okrClassify : "",
496
- okrType: openOkrType ? type.typeId : ""
497
+ okrClassify: openClassify ? okrClassify : '',
498
+ okrType: openOkrType ? type.typeId : ''
497
499
  }, dept), team), {}, {
498
500
  workRoles: [{
499
501
  roleType: 1,
500
502
  models: [user]
501
503
  }]
502
- }, visibilityArea));
504
+ }, visibilityArea), {}, {
505
+ CreateFromAssess: isFromAssess
506
+ }));
503
507
 
504
508
  case 24:
505
509
  data = _context.sent;
@@ -509,7 +513,7 @@ function CreateOkrModal(_ref, ref) {
509
513
  break;
510
514
  }
511
515
 
512
- _toast["default"].Error("创建失败,请重试", {
516
+ _toast["default"].Error('创建失败,请重试', {
513
517
  canClose: false
514
518
  });
515
519
 
@@ -524,7 +528,7 @@ function CreateOkrModal(_ref, ref) {
524
528
  krTotalLength = 0;
525
529
  krDatas && krDatas.forEach(function (kr) {
526
530
  // 计算平均长度要去掉百分号和数字
527
- krTotalLength += kr.mileStoneName.replace(/(%|\d)/g, "").length;
531
+ krTotalLength += kr.mileStoneName.replace(/(%|\d)/g, '').length;
528
532
  });
529
533
  krAvarageLength = krDatas.length > 0 ? krTotalLength / krDatas.length : 0;
530
534
  krMeasurableLength = krsCheckResult.friendlyResult.filter(function (kr) {
@@ -532,13 +536,13 @@ function CreateOkrModal(_ref, ref) {
532
536
  }).length;
533
537
  oHasVtWords = oNameCheckResult[0].result === _okrCreateSuggest.EOkrCreateSuggestResultType.correct;
534
538
  callData = data;
535
- callData.countSurpassPercentage = (0, _getCreateOkrSurpassPercent["default"])(okrName.replace(/(%|\d)/g, "").length, oHasVtWords, krNum, krMeasurableLength, Number.parseInt(krAvarageLength.toString()));
539
+ callData.countSurpassPercentage = (0, _getCreateOkrSurpassPercent["default"])(okrName.replace(/(%|\d)/g, '').length, oHasVtWords, krNum, krMeasurableLength, Number.parseInt(krAvarageLength.toString()));
536
540
  newOkrDataRef.current = callData;
537
541
  handleOnSuccess();
538
542
  } else {
539
543
  workId = data.workId;
540
544
 
541
- _drawerManager["default"].open("okrDetail", {
545
+ _drawerManager["default"].open('okrDetail', {
542
546
  okrId: workId
543
547
  });
544
548
  }
@@ -586,10 +590,10 @@ function CreateOkrModal(_ref, ref) {
586
590
  principalName: Name,
587
591
  userAvatar: UserAvatar,
588
592
  krWeight: 100,
589
- mileStoneName: "",
593
+ mileStoneName: '',
590
594
  confidenceIndex: 5
591
595
  }]);
592
- setOkrName("");
596
+ setOkrName('');
593
597
  setUser({
594
598
  name: Name,
595
599
  id: Id,
@@ -598,10 +602,10 @@ function CreateOkrModal(_ref, ref) {
598
602
  setIsCustomWeight(false);
599
603
  setDept({
600
604
  departmentId: 0,
601
- departmentName: ""
605
+ departmentName: ''
602
606
  });
603
607
  setType({
604
- typeName: (0, _getLocale.getLocale)("OKR_MyO_Pop_Individual"),
608
+ typeName: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
605
609
  typeId: 1
606
610
  });
607
611
  setCycle(cycle);
@@ -609,7 +613,7 @@ function CreateOkrModal(_ref, ref) {
609
613
  setVisibility(1);
610
614
  setParent({
611
615
  parentWorkId: 0,
612
- parentWorkName: "",
616
+ parentWorkName: '',
613
617
  parentType: 0,
614
618
  parentKrId: 0
615
619
  });
@@ -723,7 +727,7 @@ function CreateOkrModal(_ref, ref) {
723
727
  var ModalTitle = (0, _react.useMemo)(function () {
724
728
  return /*#__PURE__*/_react["default"].createElement(_style.Line, null, /*#__PURE__*/_react["default"].createElement("span", {
725
729
  className: "create-modal__title"
726
- }, (0, _getLocale.getLocale)("OKR_MyO_Pop_Title_Newobjective")), /*#__PURE__*/_react["default"].createElement(_okrCase["default"], {
730
+ }, (0, _getLocale.getLocale)('OKR_MyO_Pop_Title_Newobjective')), /*#__PURE__*/_react["default"].createElement(_okrCase["default"], {
727
731
  okrTemplateEnabled: true,
728
732
  onOkrApply: OnOkRApplyTplHandler
729
733
  }));
@@ -765,7 +769,7 @@ function CreateOkrModal(_ref, ref) {
765
769
 
766
770
  setShowCreatedSuccessInfo(false);
767
771
 
768
- _drawerManager["default"].open("okrDetail", {
772
+ _drawerManager["default"].open('okrDetail', {
769
773
  okrId: workId
770
774
  });
771
775
 
@@ -784,10 +788,10 @@ function CreateOkrModal(_ref, ref) {
784
788
 
785
789
  var trackAction = function trackAction() {
786
790
  // @ts-ignore
787
- window.titaTracker && window.titaTracker("action").record({
788
- actionName: "点击【教你写OKR】",
789
- actionGroup: (0, _getLocale.getLocale)("OKR_MyO_Collr_Butt_CreatOKR"),
790
- productName: (0, _getLocale.getLocale)("Menu_Title_OKRs")
791
+ window.titaTracker && window.titaTracker('action').record({
792
+ actionName: '点击【教你写OKR】',
793
+ actionGroup: (0, _getLocale.getLocale)('OKR_MyO_Collr_Butt_CreatOKR'),
794
+ productName: (0, _getLocale.getLocale)('Menu_Title_OKRs')
791
795
  });
792
796
  };
793
797
 
@@ -797,7 +801,7 @@ function CreateOkrModal(_ref, ref) {
797
801
  }
798
802
  return /*#__PURE__*/_react["default"].createElement("a", {
799
803
  className: "teact-write-okr",
800
- href: (0, _helpers.isDingDing)() ? "https://wiki.tita.com/pages/viewpage.action?pageId=15696093" : "https://docs.tita.com/question/okr-write/",
804
+ href: (0, _helpers.isDingDing)() ? 'https://wiki.tita.com/pages/viewpage.action?pageId=15696093' : 'https://docs.tita.com/question/okr-write/',
801
805
  target: "_blank",
802
806
  onClick: trackAction,
803
807
  rel: "noreferrer"
@@ -806,7 +810,7 @@ function CreateOkrModal(_ref, ref) {
806
810
  src: _teachOkr["default"]
807
811
  }), /*#__PURE__*/_react["default"].createElement("span", {
808
812
  className: "teact-write-okr__text"
809
- }, (0, _getLocale.getLocale)("OKR_MyO_Pop_TeachwriteOKR")));
813
+ }, (0, _getLocale.getLocale)('OKR_MyO_Pop_TeachwriteOKR')));
810
814
  }, []);
811
815
  (0, _react.useEffect)(function () {
812
816
  // @ts-ignore
@@ -820,8 +824,8 @@ function CreateOkrModal(_ref, ref) {
820
824
  mask: true,
821
825
  centered: true,
822
826
  onOk: onModalOkHandler,
823
- okText: (0, _getLocale.getLocale)("OKR_MyO_Pop_Createnow"),
824
- cancelText: (0, _getLocale.getLocale)("Mod_Cancel"),
827
+ okText: (0, _getLocale.getLocale)('OKR_MyO_Pop_Createnow'),
828
+ cancelText: (0, _getLocale.getLocale)('Mod_Cancel'),
825
829
  title: ModalTitle,
826
830
  visible: isVisible,
827
831
  onCancel: hideCreateOkrModal,
@@ -829,7 +833,7 @@ function CreateOkrModal(_ref, ref) {
829
833
  footerLeftContent: renderFooterTeachWriteOKr,
830
834
  zIndex: 1200,
831
835
  bodyStyle: {
832
- flexBasis: "auto"
836
+ flexBasis: 'auto'
833
837
  }
834
838
  }, /*#__PURE__*/_react["default"].createElement(_style.Wrapper, {
835
839
  ref: wrapperRef
@@ -857,7 +861,7 @@ function CreateOkrModal(_ref, ref) {
857
861
  setIsInputContent: setIsInputContent
858
862
  }), /*#__PURE__*/_react["default"].createElement("div", {
859
863
  className: "create-modal__title-line"
860
- }, /*#__PURE__*/_react["default"].createElement(_style.BlueBar, null), (0, _getLocale.getLocale)("Per_Ass_New_Appr_detail_moreS")), /*#__PURE__*/_react["default"].createElement("div", {
864
+ }, /*#__PURE__*/_react["default"].createElement(_style.BlueBar, null), (0, _getLocale.getLocale)('Per_Ass_New_Appr_detail_moreS')), /*#__PURE__*/_react["default"].createElement("div", {
861
865
  className: "space-between-row"
862
866
  }, /*#__PURE__*/_react["default"].createElement(_okrParent["default"], {
863
867
  parent: parent,
@@ -46,7 +46,7 @@ var createWidthKr = /*#__PURE__*/function () {
46
46
  while (1) {
47
47
  switch (_context.prev = _context.next) {
48
48
  case 0:
49
- url = "".concat(requestDomain(), "/api/v2/").concat(tenantId, "/").concat(userId, "/work/createWithKr");
49
+ url = "".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/createWithKr");
50
50
  _context.next = 3;
51
51
  return _axios["default"].post(url, _objectSpread({
52
52
  workType: 6
@@ -33,13 +33,13 @@
33
33
 
34
34
  .titaui-dialog-confirm__btn-cancel {
35
35
  background: #ffffff;
36
- border: 1px solid #dfe3ea;
36
+ border: 1px solid #dfe3ea !important;
37
37
  color: #6f7886;
38
38
  }
39
39
 
40
40
  .titaui-dialog-confirm__btn-cancel:hover {
41
41
  color: #2879ff;
42
- border: 1px solid #2879ff;
42
+ border: 1px solid #2879ff !important;
43
43
  }
44
44
 
45
45
  .titaui-dialog-confirm__btn-cancel-text {
@@ -49,7 +49,9 @@ function HeaderAction(_ref) {
49
49
  _onClick = _ref.onClick,
50
50
  className = _ref.className,
51
51
  title = _ref.title,
52
- children = _ref.children;
52
+ children = _ref.children,
53
+ approvalSetting = _ref.approvalSetting,
54
+ detailInfo = _ref.detailInfo;
53
55
 
54
56
  var _useState = (0, _react.useState)(false),
55
57
  _useState2 = _slicedToArray(_useState, 2),
@@ -99,6 +101,8 @@ function HeaderAction(_ref) {
99
101
  if (children && children.length > 0) {
100
102
  content = /*#__PURE__*/_react["default"].createElement(_headerDrop["default"], {
101
103
  visible: dropVisible,
104
+ detailInfo: detailInfo,
105
+ approvalSetting: approvalSetting,
102
106
  onVisibleChange: function onVisibleChange(visible) {
103
107
  active.current = visible;
104
108
  !visible && setDropVisible(false);