@titaui/pc 1.11.47 → 1.12.0-beta.1

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