@titaui/pc 1.11.35-beta.2 → 1.11.36

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 (129) 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/button/rect-btn/index.css +11 -45
  4. package/lib/components/button/rect-btn/index.js +6 -12
  5. package/lib/components/change-okr-modal/index.js +1 -2
  6. package/lib/components/checkbox/index.css +3 -3
  7. package/lib/components/create-okr-modal/index.js +42 -48
  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 +1 -5
  11. package/lib/components/drawer/headerDrop.js +4 -42
  12. package/lib/components/drawer/index.css +0 -33
  13. package/lib/components/drawer/index.js +3 -26
  14. package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
  15. package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
  16. package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
  17. package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
  18. package/lib/components/dynamic/advertise/index.css +21 -0
  19. package/lib/components/dynamic/advertise/index.js +126 -0
  20. package/lib/components/dynamic/advertise/interface.js +5 -0
  21. package/lib/components/dynamic/advertise/util.js +28 -0
  22. package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
  23. package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
  24. package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
  25. package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
  26. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
  27. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  28. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  29. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  30. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  31. package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
  32. package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
  33. package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
  34. package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
  35. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
  36. package/lib/components/dynamic/dynamic-liking/index.css +81 -0
  37. package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
  38. package/lib/components/dynamic/dynamic-liking/item.js +75 -0
  39. package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
  40. package/lib/components/dynamic/dynamic-list/index.js +6 -14
  41. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
  42. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
  43. package/lib/components/dynamic/dynamic-topping/index.css +141 -0
  44. package/lib/components/dynamic/dynamic-topping/index.js +82 -0
  45. package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
  46. package/lib/components/dynamic/dynamic-topping/item.js +153 -0
  47. package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
  48. package/lib/components/dynamic/dynamic.css +173 -0
  49. package/lib/components/dynamic/dynamic.js +428 -0
  50. package/lib/components/dynamic/export-module/index.js +37 -0
  51. package/lib/components/dynamic/img/dynamic-top.svg +14 -0
  52. package/lib/components/dynamic/index.js +12 -9
  53. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  54. package/lib/components/dynamic/my-team/img/line.png +0 -0
  55. package/lib/components/dynamic/my-team/img/team.png +0 -0
  56. package/lib/components/dynamic/my-team/index.css +184 -0
  57. package/lib/components/dynamic/my-team/index.js +263 -0
  58. package/lib/components/dynamic/my-team/request-api.js +52 -0
  59. package/lib/components/dynamic/my-team/util.js +20 -0
  60. package/lib/components/dynamic/new-ui.css +192 -0
  61. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
  62. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
  63. package/lib/components/dynamic/online-broadcast/data.js +77 -0
  64. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
  65. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  66. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  67. package/lib/components/dynamic/online-broadcast/index.css +46 -0
  68. package/lib/components/dynamic/online-broadcast/index.js +61 -0
  69. package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
  70. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
  71. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
  72. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
  73. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
  74. package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
  75. package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
  76. package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
  77. package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
  78. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  79. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  80. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  81. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  82. package/lib/components/dynamic/quick-operation/index.css +51 -0
  83. package/lib/components/dynamic/quick-operation/index.js +120 -0
  84. package/lib/components/dynamic/request-api.js +68 -7
  85. package/lib/components/nav-top/index.js +4 -8
  86. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
  87. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
  88. package/lib/components/okr-detail/components/header/index.js +3 -10
  89. package/lib/components/okr-detail/components/header/o-name.js +3 -10
  90. package/lib/components/okr-detail/components/o-classify.js +1 -5
  91. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +14 -13
  92. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
  93. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
  94. package/lib/components/okr-detail/detail-header/index.css +0 -11
  95. package/lib/components/okr-detail/detail-header/index.js +234 -228
  96. package/lib/components/okr-detail/index.js +4 -21
  97. package/lib/components/okr-detail/okr-list/index.js +3 -8
  98. package/lib/components/okr-detail/request-apis.js +4 -10
  99. package/lib/components/okr-flow/child-node/index.css +1 -1
  100. package/lib/components/okr-flow/export-modal/index.js +2 -47
  101. package/lib/components/okr-period-selector/index.js +5 -9
  102. package/lib/components/okr-period-selector/select-cycle.js +19 -23
  103. package/lib/components/operation-records/index.js +1 -1
  104. package/lib/components/operation-records/style.js +1 -1
  105. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
  106. package/lib/components/task-relation-modal/request-api.js +1 -2
  107. package/lib/components/task-tree/index.js +1 -7
  108. package/lib/components/task-tree/task-item-node/e-task.js +2 -2
  109. package/lib/components/task-tree/task-item-node/index.css +12 -14
  110. package/lib/components/task-tree/task-tree.css +1 -1
  111. package/lib/components/time-picker/time-picker.js +93 -37
  112. package/lib/components/toast/index.js +3 -5
  113. package/lib/index.js +0 -40
  114. package/lib/pages/new-okr-list/header/index.css +0 -45
  115. package/lib/pages/new-okr-list/header/index.js +16 -38
  116. package/lib/pages/new-okr-list/index.js +1 -3
  117. package/lib/pages/new-okr-list/list/index.js +2 -19
  118. package/lib/pages/new-okr-list/request-api.js +2 -8
  119. package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
  120. package/lib/utils/format-time.js +1 -8
  121. package/lib/utils/open-data.js +1 -5
  122. package/package.json +2 -2
  123. package/lib/components/okr-detail/detail-header/constant.js +0 -53
  124. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
  125. package/lib/components/okr-detail/helper.js +0 -108
  126. package/lib/components/task-tree/mock.js +0 -944
  127. package/lib/components/textarea/index.css +0 -142
  128. package/lib/components/textarea/index.js +0 -259
  129. package/lib/pages/new-okr-list/header/common.js +0 -52
@@ -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
@@ -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;
@@ -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: false
567
+ toUserId: toUserId
569
568
  }).then(function (res) {
570
569
  _this4.pending = false;
571
570
  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 #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;
@@ -353,9 +351,7 @@ function CreateOkrModal(_ref, ref) {
353
351
  setData: function setData(data) {
354
352
  setOkrName(data.okrName);
355
353
  setUser(data.user);
356
- },
357
- show: showCreateOkrModal,
358
- hide: hideCreateOkrModal
354
+ }
359
355
  };
360
356
  });
361
357
  var handleOnSuccess = (0, _react.useCallback)(function () {
@@ -367,7 +363,7 @@ function CreateOkrModal(_ref, ref) {
367
363
  setShowCreatedSuccessInfo(true);
368
364
  setTipIndex(Math.floor(Math.random() * 6));
369
365
  } else {
370
- _toast["default"].Success((0, _getLocale.getLocale)('OKR_Db_Success'), {
366
+ _toast["default"].Success((0, _getLocale.getLocale)("OKR_Db_Success"), {
371
367
  duration: 3000
372
368
  });
373
369
 
@@ -411,7 +407,7 @@ function CreateOkrModal(_ref, ref) {
411
407
  break;
412
408
  }
413
409
 
414
- _toast["default"].Error((0, _getLocale.getLocale)('OKR_MyO_Pop_Targetname'), {
410
+ _toast["default"].Error((0, _getLocale.getLocale)("OKR_MyO_Pop_Targetname"), {
415
411
  canClose: false
416
412
  });
417
413
 
@@ -423,7 +419,7 @@ function CreateOkrModal(_ref, ref) {
423
419
  break;
424
420
  }
425
421
 
426
- _toast["default"].Error('目标名称不能超过500字', {
422
+ _toast["default"].Error("目标名称不能超过500字", {
427
423
  canClose: false
428
424
  });
429
425
 
@@ -435,7 +431,7 @@ function CreateOkrModal(_ref, ref) {
435
431
  break;
436
432
  }
437
433
 
438
- _toast["default"].Error('关键成果不能为空', {
434
+ _toast["default"].Error("关键成果不能为空", {
439
435
  canClose: false
440
436
  });
441
437
 
@@ -452,7 +448,7 @@ function CreateOkrModal(_ref, ref) {
452
448
  break;
453
449
  }
454
450
 
455
- _toast["default"].Error('关键成果不能超过500字', {
451
+ _toast["default"].Error("关键成果不能超过500字", {
456
452
  canClose: false
457
453
  });
458
454
 
@@ -466,7 +462,7 @@ function CreateOkrModal(_ref, ref) {
466
462
  break;
467
463
  }
468
464
 
469
- _toast["default"].Error((0, _getLocale.getLocale)('OKR_MyO_Pop_Totalkrnot100'), {
465
+ _toast["default"].Error((0, _getLocale.getLocale)("OKR_MyO_Pop_Totalkrnot100"), {
470
466
  canClose: false
471
467
  });
472
468
 
@@ -484,7 +480,7 @@ function CreateOkrModal(_ref, ref) {
484
480
  handleCreatedClose();
485
481
  visibilityArea = formatVisiableLimit();
486
482
  _context.next = 24;
487
- return (0, _requestApi.createWidthKr)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
483
+ return (0, _requestApi.createWidthKr)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
488
484
  krInfos: krDatas.map(function (kr) {
489
485
  return _objectSpread(_objectSpread({}, kr), {}, {
490
486
  startDate: cycle.startDate,
@@ -496,16 +492,14 @@ function CreateOkrModal(_ref, ref) {
496
492
  }, parent), {}, {
497
493
  workType: 6,
498
494
  visibility: visibility,
499
- okrClassify: openClassify ? okrClassify : '',
500
- okrType: openOkrType ? type.typeId : ''
495
+ okrClassify: openClassify ? okrClassify : "",
496
+ okrType: openOkrType ? type.typeId : ""
501
497
  }, dept), team), {}, {
502
498
  workRoles: [{
503
499
  roleType: 1,
504
500
  models: [user]
505
501
  }]
506
- }, visibilityArea), {}, {
507
- isFromAssess: isFromAssess
508
- }));
502
+ }, visibilityArea));
509
503
 
510
504
  case 24:
511
505
  data = _context.sent;
@@ -515,7 +509,7 @@ function CreateOkrModal(_ref, ref) {
515
509
  break;
516
510
  }
517
511
 
518
- _toast["default"].Error('创建失败,请重试', {
512
+ _toast["default"].Error("创建失败,请重试", {
519
513
  canClose: false
520
514
  });
521
515
 
@@ -530,7 +524,7 @@ function CreateOkrModal(_ref, ref) {
530
524
  krTotalLength = 0;
531
525
  krDatas && krDatas.forEach(function (kr) {
532
526
  // 计算平均长度要去掉百分号和数字
533
- krTotalLength += kr.mileStoneName.replace(/(%|\d)/g, '').length;
527
+ krTotalLength += kr.mileStoneName.replace(/(%|\d)/g, "").length;
534
528
  });
535
529
  krAvarageLength = krDatas.length > 0 ? krTotalLength / krDatas.length : 0;
536
530
  krMeasurableLength = krsCheckResult.friendlyResult.filter(function (kr) {
@@ -538,13 +532,13 @@ function CreateOkrModal(_ref, ref) {
538
532
  }).length;
539
533
  oHasVtWords = oNameCheckResult[0].result === _okrCreateSuggest.EOkrCreateSuggestResultType.correct;
540
534
  callData = data;
541
- 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()));
542
536
  newOkrDataRef.current = callData;
543
537
  handleOnSuccess();
544
538
  } else {
545
539
  workId = data.workId;
546
540
 
547
- _drawerManager["default"].open('okrDetail', {
541
+ _drawerManager["default"].open("okrDetail", {
548
542
  okrId: workId
549
543
  });
550
544
  }
@@ -592,10 +586,10 @@ function CreateOkrModal(_ref, ref) {
592
586
  principalName: Name,
593
587
  userAvatar: UserAvatar,
594
588
  krWeight: 100,
595
- mileStoneName: '',
589
+ mileStoneName: "",
596
590
  confidenceIndex: 5
597
591
  }]);
598
- setOkrName('');
592
+ setOkrName("");
599
593
  setUser({
600
594
  name: Name,
601
595
  id: Id,
@@ -604,10 +598,10 @@ function CreateOkrModal(_ref, ref) {
604
598
  setIsCustomWeight(false);
605
599
  setDept({
606
600
  departmentId: 0,
607
- departmentName: ''
601
+ departmentName: ""
608
602
  });
609
603
  setType({
610
- typeName: (0, _getLocale.getLocale)('OKR_MyO_Pop_Individual'),
604
+ typeName: (0, _getLocale.getLocale)("OKR_MyO_Pop_Individual"),
611
605
  typeId: 1
612
606
  });
613
607
  setCycle(cycle);
@@ -615,7 +609,7 @@ function CreateOkrModal(_ref, ref) {
615
609
  setVisibility(1);
616
610
  setParent({
617
611
  parentWorkId: 0,
618
- parentWorkName: '',
612
+ parentWorkName: "",
619
613
  parentType: 0,
620
614
  parentKrId: 0
621
615
  });
@@ -729,7 +723,7 @@ function CreateOkrModal(_ref, ref) {
729
723
  var ModalTitle = (0, _react.useMemo)(function () {
730
724
  return /*#__PURE__*/_react["default"].createElement(_style.Line, null, /*#__PURE__*/_react["default"].createElement("span", {
731
725
  className: "create-modal__title"
732
- }, (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"], {
733
727
  okrTemplateEnabled: true,
734
728
  onOkrApply: OnOkRApplyTplHandler
735
729
  }));
@@ -771,7 +765,7 @@ function CreateOkrModal(_ref, ref) {
771
765
 
772
766
  setShowCreatedSuccessInfo(false);
773
767
 
774
- _drawerManager["default"].open('okrDetail', {
768
+ _drawerManager["default"].open("okrDetail", {
775
769
  okrId: workId
776
770
  });
777
771
 
@@ -790,10 +784,10 @@ function CreateOkrModal(_ref, ref) {
790
784
 
791
785
  var trackAction = function trackAction() {
792
786
  // @ts-ignore
793
- window.titaTracker && window.titaTracker('action').record({
794
- actionName: '点击【教你写OKR】',
795
- actionGroup: (0, _getLocale.getLocale)('OKR_MyO_Collr_Butt_CreatOKR'),
796
- 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")
797
791
  });
798
792
  };
799
793
 
@@ -803,7 +797,7 @@ function CreateOkrModal(_ref, ref) {
803
797
  }
804
798
  return /*#__PURE__*/_react["default"].createElement("a", {
805
799
  className: "teact-write-okr",
806
- 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/",
807
801
  target: "_blank",
808
802
  onClick: trackAction,
809
803
  rel: "noreferrer"
@@ -812,7 +806,7 @@ function CreateOkrModal(_ref, ref) {
812
806
  src: _teachOkr["default"]
813
807
  }), /*#__PURE__*/_react["default"].createElement("span", {
814
808
  className: "teact-write-okr__text"
815
- }, (0, _getLocale.getLocale)('OKR_MyO_Pop_TeachwriteOKR')));
809
+ }, (0, _getLocale.getLocale)("OKR_MyO_Pop_TeachwriteOKR")));
816
810
  }, []);
817
811
  (0, _react.useEffect)(function () {
818
812
  // @ts-ignore
@@ -826,8 +820,8 @@ function CreateOkrModal(_ref, ref) {
826
820
  mask: true,
827
821
  centered: true,
828
822
  onOk: onModalOkHandler,
829
- okText: (0, _getLocale.getLocale)('OKR_MyO_Pop_Createnow'),
830
- cancelText: (0, _getLocale.getLocale)('Mod_Cancel'),
823
+ okText: (0, _getLocale.getLocale)("OKR_MyO_Pop_Createnow"),
824
+ cancelText: (0, _getLocale.getLocale)("Mod_Cancel"),
831
825
  title: ModalTitle,
832
826
  visible: isVisible,
833
827
  onCancel: hideCreateOkrModal,
@@ -835,7 +829,7 @@ function CreateOkrModal(_ref, ref) {
835
829
  footerLeftContent: renderFooterTeachWriteOKr,
836
830
  zIndex: 1200,
837
831
  bodyStyle: {
838
- flexBasis: 'auto'
832
+ flexBasis: "auto"
839
833
  }
840
834
  }, /*#__PURE__*/_react["default"].createElement(_style.Wrapper, {
841
835
  ref: wrapperRef
@@ -863,7 +857,7 @@ function CreateOkrModal(_ref, ref) {
863
857
  setIsInputContent: setIsInputContent
864
858
  }), /*#__PURE__*/_react["default"].createElement("div", {
865
859
  className: "create-modal__title-line"
866
- }, /*#__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", {
867
861
  className: "space-between-row"
868
862
  }, /*#__PURE__*/_react["default"].createElement(_okrParent["default"], {
869
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
@@ -33,13 +33,13 @@
33
33
 
34
34
  .titaui-dialog-confirm__btn-cancel {
35
35
  background: #ffffff;
36
- border: 1px solid #dfe3ea !important;
36
+ border: 1px solid #dfe3ea;
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 !important;
42
+ border: 1px solid #2879ff;
43
43
  }
44
44
 
45
45
  .titaui-dialog-confirm__btn-cancel-text {
@@ -49,9 +49,7 @@ function HeaderAction(_ref) {
49
49
  _onClick = _ref.onClick,
50
50
  className = _ref.className,
51
51
  title = _ref.title,
52
- children = _ref.children,
53
- approvalSetting = _ref.approvalSetting,
54
- detailInfo = _ref.detailInfo;
52
+ children = _ref.children;
55
53
 
56
54
  var _useState = (0, _react.useState)(false),
57
55
  _useState2 = _slicedToArray(_useState, 2),
@@ -101,8 +99,6 @@ function HeaderAction(_ref) {
101
99
  if (children && children.length > 0) {
102
100
  content = /*#__PURE__*/_react["default"].createElement(_headerDrop["default"], {
103
101
  visible: dropVisible,
104
- detailInfo: detailInfo,
105
- approvalSetting: approvalSetting,
106
102
  onVisibleChange: function onVisibleChange(visible) {
107
103
  active.current = visible;
108
104
  !visible && setDropVisible(false);