@titaui/pc 1.11.30 → 1.11.31-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 (122) 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 +3 -1
  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/dynamic-list/index.js +14 -6
  15. package/lib/components/dynamic/index.js +9 -12
  16. package/lib/components/dynamic/request-api.js +7 -68
  17. package/lib/components/nav-top/index.js +8 -4
  18. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
  19. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
  20. package/lib/components/okr-detail/components/header/index.js +10 -3
  21. package/lib/components/okr-detail/components/header/o-name.js +10 -3
  22. package/lib/components/okr-detail/components/o-classify.js +5 -1
  23. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +12 -7
  24. package/lib/components/okr-detail/detail-header/constant.js +53 -0
  25. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +98 -43
  26. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +55 -0
  27. package/lib/components/okr-detail/detail-header/index.css +11 -0
  28. package/lib/components/okr-detail/detail-header/index.js +228 -234
  29. package/lib/components/okr-detail/helper.js +108 -0
  30. package/lib/components/okr-detail/index.js +21 -2
  31. package/lib/components/okr-detail/okr-list/index.js +8 -3
  32. package/lib/components/okr-detail/request-apis.js +10 -4
  33. package/lib/components/okr-flow/export-modal/index.js +1 -1
  34. package/lib/components/okr-period-selector/index.js +9 -5
  35. package/lib/components/okr-period-selector/select-cycle.js +23 -19
  36. package/lib/components/operation-records/index.js +1 -1
  37. package/lib/components/operation-records/style.js +1 -1
  38. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
  39. package/lib/components/task-relation-modal/request-api.js +2 -1
  40. package/lib/components/textarea/index.css +142 -0
  41. package/lib/components/textarea/index.js +259 -0
  42. package/lib/components/toast/index.js +5 -3
  43. package/lib/index.js +40 -0
  44. package/lib/pages/new-okr-list/header/common.js +52 -0
  45. package/lib/pages/new-okr-list/header/index.css +45 -0
  46. package/lib/pages/new-okr-list/header/index.js +38 -16
  47. package/lib/{components/dynamic/dynamic-liking/index.js → pages/new-okr-list/header/operate-record.js} +91 -39
  48. package/lib/pages/new-okr-list/index.js +3 -1
  49. package/lib/pages/new-okr-list/list/index.js +19 -2
  50. package/lib/pages/new-okr-list/request-api.js +8 -2
  51. package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
  52. package/lib/utils/format-time.js +8 -1
  53. package/lib/utils/open-data.js +5 -1
  54. package/package.json +2 -2
  55. package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
  56. package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
  57. package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
  58. package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
  59. package/lib/components/dynamic/advertise/index.css +0 -21
  60. package/lib/components/dynamic/advertise/index.js +0 -126
  61. package/lib/components/dynamic/advertise/interface.js +0 -5
  62. package/lib/components/dynamic/advertise/util.js +0 -28
  63. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
  64. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
  65. package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
  66. package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
  67. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  68. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  69. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  70. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  71. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  72. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
  73. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
  74. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
  75. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  76. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  77. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  78. package/lib/components/dynamic/dynamic-liking/item.js +0 -75
  79. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  80. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
  81. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
  82. package/lib/components/dynamic/dynamic-topping/index.css +0 -141
  83. package/lib/components/dynamic/dynamic-topping/index.js +0 -82
  84. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  85. package/lib/components/dynamic/dynamic-topping/item.js +0 -153
  86. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  87. package/lib/components/dynamic/dynamic.css +0 -173
  88. package/lib/components/dynamic/dynamic.js +0 -428
  89. package/lib/components/dynamic/export-module/index.js +0 -37
  90. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  91. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  92. package/lib/components/dynamic/my-team/img/line.png +0 -0
  93. package/lib/components/dynamic/my-team/img/team.png +0 -0
  94. package/lib/components/dynamic/my-team/index.css +0 -184
  95. package/lib/components/dynamic/my-team/index.js +0 -263
  96. package/lib/components/dynamic/my-team/request-api.js +0 -52
  97. package/lib/components/dynamic/my-team/util.js +0 -20
  98. package/lib/components/dynamic/new-ui.css +0 -192
  99. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
  100. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
  101. package/lib/components/dynamic/online-broadcast/data.js +0 -77
  102. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
  103. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  104. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  105. package/lib/components/dynamic/online-broadcast/index.css +0 -46
  106. package/lib/components/dynamic/online-broadcast/index.js +0 -61
  107. package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
  108. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  109. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
  110. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  111. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
  112. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  113. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
  114. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  115. package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -44
  116. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  117. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  118. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  119. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  120. package/lib/components/dynamic/quick-operation/index.css +0 -51
  121. package/lib/components/dynamic/quick-operation/index.js +0 -120
  122. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
@@ -0,0 +1,55 @@
1
+ .okr-detail-delete-confirm__option {
2
+ cursor: pointer;
3
+ display: flex;
4
+ margin-top: 10px;
5
+ }
6
+
7
+ .okr-detail-delete-confirm__option-text {
8
+ font-size: 14px;
9
+ color: #3F4755;
10
+ line-height: 22px;
11
+ margin-left: 6px;
12
+ }
13
+
14
+ .okr-detail-delete-confirm__option-text:hover {
15
+ color: #2879ff;
16
+ }
17
+
18
+ .okr-detail-delete-confirm__icon {
19
+ font-size: 12px;
20
+ color: #89919f;
21
+ vertical-align: middle;
22
+ }
23
+
24
+ .okr-detail-delete-confirm__icon.tu-icon-singlebox-have, .okr-detail-delete-confirm__icon.tu-icon-singlebox-avtive {
25
+ margin-top: 4px;
26
+ font-size: 16px;
27
+ color: #2879ff;
28
+ }
29
+
30
+ .okr-detail-delete-confirm__icon.tu-icon-warning {
31
+ font-size: 14px;
32
+ color: #acb7bf;
33
+ margin-left: 4px;
34
+ vertical-align: text-top;
35
+ }
36
+
37
+ .isApprovalDisabled {
38
+ margin-bottom: 0;
39
+ padding: 5px 24px;
40
+ font-size: 14px;
41
+ line-height: 22px;
42
+ transition: all .3s ease-in;
43
+ color: #BFC7D5;
44
+ cursor: pointer;
45
+ display: flex;
46
+ align-items: center;
47
+ white-space: nowrap;
48
+ }
49
+
50
+ .isApprovalDisabled .options-icon {
51
+ margin-right: 12px;
52
+ font-size: 14px;
53
+ transition: all .3s ease-in;
54
+ color: #89919f;
55
+ }
@@ -25,3 +25,14 @@
25
25
  .okr-detail-head-parent > span:hover {
26
26
  color: #2879ff;
27
27
  }
28
+
29
+ .okr-detail-header-status {
30
+ display: inline-flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ border-radius: 16px;
34
+ width: 68px;
35
+ height: 28px;
36
+ margin-right: 18px;
37
+ font-size: 12px;
38
+ }
@@ -9,8 +9,6 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
- var _titaUi = require("tita-ui");
13
-
14
12
  var _userSelector = _interopRequireDefault(require("../../user-selector"));
15
13
 
16
14
  var _drawer = _interopRequireDefault(require("../../drawer"));
@@ -27,7 +25,9 @@ var _requestApis = require("../request-apis");
27
25
 
28
26
  var _okrShare = _interopRequireDefault(require("../../okr-share"));
29
27
 
30
- var _context7 = require("../context");
28
+ var _context6 = require("../context");
29
+
30
+ var _constant = require("./constant");
31
31
 
32
32
  var _deleteConfirm = _interopRequireDefault(require("./delete-confirm/delete-confirm"));
33
33
 
@@ -74,7 +74,7 @@ function OkrDetailHeader(_ref) {
74
74
  setShareVisible = _useState2[1];
75
75
 
76
76
  var userSelectRef = (0, _react.useRef)();
77
- var popRef = (0, _react.useRef)();
77
+ var deletePopRef = (0, _react.useRef)();
78
78
 
79
79
  var _useState3 = (0, _react.useState)([]),
80
80
  _useState4 = _slicedToArray(_useState3, 2),
@@ -83,8 +83,11 @@ function OkrDetailHeader(_ref) {
83
83
 
84
84
 
85
85
  var loginUserId = window.BSGlobal.loginUserInfo.Id;
86
- var context = (0, _react.useContext)(_context7.GeneralDataContext);
87
- var commonContext = (0, _react.useContext)(_context7.CommonContext);
86
+ var context = (0, _react.useContext)(_context6.GeneralDataContext);
87
+ var commonContext = (0, _react.useContext)(_context6.CommonContext);
88
+ var approvalSetting = commonContext.approvalSetting,
89
+ okrInfo = commonContext.okrInfo;
90
+ var approveStatusColor = (0, _constant.ApproveStatusColor)(okrInfo.applyState);
88
91
  var changVisiblity = (0, _react.useCallback)( /*#__PURE__*/function () {
89
92
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(workId, visibility) {
90
93
  var visibilityScope,
@@ -133,220 +136,238 @@ function OkrDetailHeader(_ref) {
133
136
  var closeShareModal = (0, _react.useCallback)(function () {
134
137
  setShareVisible(false);
135
138
  }, []);
139
+
140
+ var handleDeleteOkr = function handleDeleteOkr(selected) {
141
+ (0, _requestApis.workDelete)({
142
+ deleteType: selected,
143
+ workId: detailInfo.workId
144
+ }).then(function (resp) {
145
+ if (resp.Code === 1) {
146
+ _toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'));
147
+
148
+ setTimeout(function () {
149
+ commonContext.refreshAll();
150
+ }, 500);
151
+ } else {
152
+ _toast["default"].Error(resp.Message);
153
+ }
154
+ });
155
+ };
156
+
136
157
  var actions = (0, _react.useMemo)(function () {
137
158
  if (!detailInfo) {
138
159
  return [];
139
- } else {
140
- return (0, _actions.getOkrHeadActions)({
141
- roleType: context.generalRoleType,
142
- principalUser: context.generalPrincipalUser,
143
- visibility: context.generalVisibility.visibility,
144
- detailInfo: detailInfo,
145
- openShareModal: function () {
146
- var _openShareModal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
147
- var krss;
148
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
149
- while (1) {
150
- switch (_context2.prev = _context2.next) {
151
- case 0:
152
- _context2.next = 2;
153
- return (0, _requestApis.getKrs)({
154
- okrId: detailInfo.workId
155
- });
156
-
157
- case 2:
158
- krss = _context2.sent;
159
- setKrs(krss);
160
- setShareVisible(true);
161
-
162
- case 5:
163
- case "end":
164
- return _context2.stop();
165
- }
166
- }
167
- }, _callee2);
168
- }));
160
+ }
169
161
 
170
- function openShareModal() {
171
- return _openShareModal.apply(this, arguments);
172
- }
162
+ return (0, _actions.getOkrHeadActions)({
163
+ roleType: context.generalRoleType,
164
+ principalUser: context.generalPrincipalUser,
165
+ visibility: context.generalVisibility.visibility,
166
+ detailInfo: detailInfo,
167
+ openShareModal: function () {
168
+ var _openShareModal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
169
+ var krss;
170
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
171
+ while (1) {
172
+ switch (_context2.prev = _context2.next) {
173
+ case 0:
174
+ _context2.next = 2;
175
+ return (0, _requestApis.getKrs)({
176
+ okrId: detailInfo.workId
177
+ });
173
178
 
174
- return openShareModal;
175
- }(),
176
- changeVisiblilty: function changeVisiblilty(visibility) {
177
- if (visibility === 4) {
178
- if (userSelectRef.current) {
179
- userSelectRef.current.open();
179
+ case 2:
180
+ krss = _context2.sent;
181
+ setKrs(krss);
182
+ setShareVisible(true);
183
+
184
+ case 5:
185
+ case "end":
186
+ return _context2.stop();
187
+ }
180
188
  }
189
+ }, _callee2);
190
+ }));
181
191
 
182
- return;
192
+ function openShareModal() {
193
+ return _openShareModal.apply(this, arguments);
194
+ }
195
+
196
+ return openShareModal;
197
+ }(),
198
+ changeVisiblilty: function changeVisiblilty(visibility) {
199
+ if (visibility === 4) {
200
+ if (userSelectRef.current) {
201
+ userSelectRef.current.open();
183
202
  }
184
203
 
185
- changVisiblity(detailInfo.workId, visibility);
186
- },
187
- onDeleteOkr: function onDeleteOkr(e) {
188
- popRef.current.getRef().show(e.target);
189
- },
190
- onCopyOkr: function onCopyOkr() {
191
- // @ts-ignore
192
- window.openCopyOkrModal({
193
- okrId: detailInfo.workId,
194
- okrType: detailInfo.okrType
195
- });
196
- },
197
- onChangeOkrFollow: function () {
198
- var _onChangeOkrFollow = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(follow) {
199
- var res;
200
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
201
- while (1) {
202
- switch (_context3.prev = _context3.next) {
203
- case 0:
204
- _context3.next = 2;
205
- return (0, _confirm["default"])(follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Focuson') : (0, _getLocale.getLocale)('OKR_MyO_Err_Unfollow'), follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Payatten') : (0, _getLocale.getLocale)('OKR_MyO_Err_Progress'));
206
-
207
- case 2:
208
- res = _context3.sent;
209
-
210
- if (!res) {
211
- _context3.next = 14;
212
- break;
213
- }
214
-
215
- if (!follow) {
216
- _context3.next = 9;
217
- break;
218
- }
219
-
220
- _context3.next = 7;
221
- return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
222
-
223
- case 7:
224
- _context3.next = 11;
204
+ return;
205
+ }
206
+
207
+ changVisiblity(detailInfo.workId, visibility);
208
+ },
209
+ onDeleteOkr: function onDeleteOkr(e) {
210
+ deletePopRef.current.show();
211
+ },
212
+ onCopyOkr: function onCopyOkr() {
213
+ // @ts-ignore
214
+ window.openCopyOkrModal({
215
+ okrId: detailInfo.workId,
216
+ okrType: detailInfo.okrType
217
+ });
218
+ },
219
+ onChangeOkrFollow: function () {
220
+ var _onChangeOkrFollow = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(follow) {
221
+ var res;
222
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
223
+ while (1) {
224
+ switch (_context3.prev = _context3.next) {
225
+ case 0:
226
+ _context3.next = 2;
227
+ return (0, _confirm["default"])(follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Focuson') : (0, _getLocale.getLocale)('OKR_MyO_Err_Unfollow'), follow ? (0, _getLocale.getLocale)('OKR_MyO_Err_Payatten') : (0, _getLocale.getLocale)('OKR_MyO_Err_Progress'));
228
+
229
+ case 2:
230
+ res = _context3.sent;
231
+
232
+ if (!res) {
233
+ _context3.next = 14;
225
234
  break;
235
+ }
226
236
 
227
- case 9:
228
- _context3.next = 11;
229
- return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
237
+ if (!follow) {
238
+ _context3.next = 9;
239
+ break;
240
+ }
230
241
 
231
- case 11:
232
- context.setGeneralRoleType(follow ? 3 : 0); // 关注
242
+ _context3.next = 7;
243
+ return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
233
244
 
234
- _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
245
+ case 7:
246
+ _context3.next = 11;
247
+ break;
235
248
 
236
- if (!follow) {
237
- commonContext.refreshAll();
238
- }
249
+ case 9:
250
+ _context3.next = 11;
251
+ return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
239
252
 
240
- case 14:
241
- case "end":
242
- return _context3.stop();
243
- }
253
+ case 11:
254
+ context.setGeneralRoleType(follow ? 3 : 0); // 关注
255
+
256
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
257
+
258
+ if (!follow) {
259
+ commonContext.refreshAll();
260
+ }
261
+
262
+ case 14:
263
+ case "end":
264
+ return _context3.stop();
244
265
  }
245
- }, _callee3);
246
- }));
266
+ }
267
+ }, _callee3);
268
+ }));
247
269
 
248
- function onChangeOkrFollow(_x3) {
249
- return _onChangeOkrFollow.apply(this, arguments);
250
- }
270
+ function onChangeOkrFollow(_x3) {
271
+ return _onChangeOkrFollow.apply(this, arguments);
272
+ }
273
+
274
+ return onChangeOkrFollow;
275
+ }(),
276
+ onFinishOrReOpen: function () {
277
+ var _onFinishOrReOpen = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(isFinish) {
278
+ var res;
279
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
280
+ while (1) {
281
+ switch (_context4.prev = _context4.next) {
282
+ case 0:
283
+ _context4.next = 2;
284
+ return (0, _confirm["default"])(isFinish ? (0, _getLocale.getLocale)('OKR_MyO_Areycloseobjective') : (0, _getLocale.getLocale)('OKR_MyO_Err_Restart'));
285
+
286
+ case 2:
287
+ res = _context4.sent;
251
288
 
252
- return onChangeOkrFollow;
253
- }(),
254
- onFinishOrReOpen: function () {
255
- var _onFinishOrReOpen = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(isFinish) {
256
- var res;
257
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
258
- while (1) {
259
- switch (_context4.prev = _context4.next) {
260
- case 0:
261
- _context4.next = 2;
262
- return (0, _confirm["default"])(isFinish ? (0, _getLocale.getLocale)('OKR_MyO_Areycloseobjective') : (0, _getLocale.getLocale)('OKR_MyO_Err_Restart'));
263
-
264
- case 2:
265
- res = _context4.sent;
266
-
267
- if (!res) {
268
- _context4.next = 13;
269
- break;
270
- }
271
-
272
- if (!isFinish) {
273
- _context4.next = 9;
274
- break;
275
- }
276
-
277
- _context4.next = 7;
278
- return (0, _requestApis.close)(detailInfo.workId);
279
-
280
- case 7:
281
- _context4.next = 11;
289
+ if (!res) {
290
+ _context4.next = 13;
282
291
  break;
292
+ }
283
293
 
284
- case 9:
285
- _context4.next = 11;
286
- return (0, _requestApis.start)(detailInfo.workId);
294
+ if (!isFinish) {
295
+ _context4.next = 9;
296
+ break;
297
+ }
298
+
299
+ _context4.next = 7;
300
+ return (0, _requestApis.close)(detailInfo.workId);
301
+
302
+ case 7:
303
+ _context4.next = 11;
304
+ break;
287
305
 
288
- case 11:
289
- commonContext.refreshAll(); // 刷新
306
+ case 9:
307
+ _context4.next = 11;
308
+ return (0, _requestApis.start)(detailInfo.workId);
290
309
 
291
- _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
310
+ case 11:
311
+ commonContext.refreshAll(); // 刷新
292
312
 
293
- case 13:
294
- case "end":
295
- return _context4.stop();
296
- }
313
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
314
+
315
+ case 13:
316
+ case "end":
317
+ return _context4.stop();
297
318
  }
298
- }, _callee4);
299
- }));
319
+ }
320
+ }, _callee4);
321
+ }));
300
322
 
301
- function onFinishOrReOpen(_x4) {
302
- return _onFinishOrReOpen.apply(this, arguments);
303
- }
323
+ function onFinishOrReOpen(_x4) {
324
+ return _onFinishOrReOpen.apply(this, arguments);
325
+ }
326
+
327
+ return onFinishOrReOpen;
328
+ }(),
329
+ onQuit: function () {
330
+ var _onQuit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
331
+ var res;
332
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
333
+ while (1) {
334
+ switch (_context5.prev = _context5.next) {
335
+ case 0:
336
+ _context5.next = 2;
337
+ return (0, _confirm["default"])((0, _getLocale.getLocale)('OKR_MyO_Err_Quit'), (0, _getLocale.getLocale)('OKR_MyO_Err_Inchargec'));
338
+
339
+ case 2:
340
+ res = _context5.sent;
341
+
342
+ if (!res) {
343
+ _context5.next = 8;
344
+ break;
345
+ }
304
346
 
305
- return onFinishOrReOpen;
306
- }(),
307
- onQuit: function () {
308
- var _onQuit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
309
- var res;
310
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
311
- while (1) {
312
- switch (_context5.prev = _context5.next) {
313
- case 0:
314
- _context5.next = 2;
315
- return (0, _confirm["default"])((0, _getLocale.getLocale)('OKR_MyO_Err_Quit'), (0, _getLocale.getLocale)('OKR_MyO_Err_Inchargec'));
316
-
317
- case 2:
318
- res = _context5.sent;
319
-
320
- if (!res) {
321
- _context5.next = 8;
322
- break;
323
- }
324
-
325
- _context5.next = 6;
326
- return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 2);
327
-
328
- case 6:
329
- // context.setGeneralRoleType(0)
330
- commonContext.refreshAll(); // 刷新
331
-
332
- _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
333
-
334
- case 8:
335
- case "end":
336
- return _context5.stop();
337
- }
347
+ _context5.next = 6;
348
+ return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 2);
349
+
350
+ case 6:
351
+ // context.setGeneralRoleType(0)
352
+ commonContext.refreshAll(); // 刷新
353
+
354
+ _toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
355
+
356
+ case 8:
357
+ case "end":
358
+ return _context5.stop();
338
359
  }
339
- }, _callee5);
340
- }));
360
+ }
361
+ }, _callee5);
362
+ }));
341
363
 
342
- function onQuit() {
343
- return _onQuit.apply(this, arguments);
344
- }
364
+ function onQuit() {
365
+ return _onQuit.apply(this, arguments);
366
+ }
345
367
 
346
- return onQuit;
347
- }()
348
- });
349
- }
368
+ return onQuit;
369
+ }()
370
+ });
350
371
  }, [detailInfo, context.generalRoleType, context.generalPrincipalUser, context.generalVisibility.visibility]);
351
372
  var parent = null;
352
373
 
@@ -368,6 +389,8 @@ function OkrDetailHeader(_ref) {
368
389
 
369
390
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
370
391
  actions: actions,
392
+ approvalSetting: approvalSetting,
393
+ detailInfo: detailInfo,
371
394
  actionComponent: /*#__PURE__*/_react["default"].createElement(_wechatBtn["default"], {
372
395
  id: detailInfo.workId,
373
396
  objType: 62,
@@ -386,7 +409,14 @@ function OkrDetailHeader(_ref) {
386
409
  krId: parent.id
387
410
  });
388
411
  }
389
- }, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null
412
+ }, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null,
413
+ onlyShowContent: approveStatusColor ? /*#__PURE__*/_react["default"].createElement("div", {
414
+ className: "okr-detail-header-status",
415
+ style: {
416
+ color: approveStatusColor.color,
417
+ backgroundColor: approveStatusColor.bgColor
418
+ }
419
+ }, (0, _constant.getApproveStatusTextMap)(okrInfo.applyState)) : null
390
420
  }), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
391
421
  visible: shareVisible,
392
422
  onClose: closeShareModal,
@@ -404,48 +434,12 @@ function OkrDetailHeader(_ref) {
404
434
  })
405
435
  },
406
436
  zIndex: 2400
407
- }), /*#__PURE__*/_react["default"].createElement(_titaUi.PopConfirm, {
408
- ref: popRef,
409
- showArrow: false,
410
- align: "top",
411
- className: "document-mouse-event-ignore",
412
- content: /*#__PURE__*/_react["default"].createElement(_deleteConfirm["default"], {
413
- onConfirm: /*#__PURE__*/function () {
414
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(selected) {
415
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
416
- while (1) {
417
- switch (_context6.prev = _context6.next) {
418
- case 0:
419
- _context6.next = 2;
420
- return (0, _requestApis.workDelete)({
421
- deleteType: selected,
422
- workId: detailInfo.workId
423
- });
424
-
425
- case 2:
426
- _toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'));
427
-
428
- setTimeout(function () {
429
- commonContext.refreshAll();
430
- }, 500);
431
-
432
- case 4:
433
- case "end":
434
- return _context6.stop();
435
- }
436
- }
437
- }, _callee6);
438
- }));
439
-
440
- return function (_x5) {
441
- return _ref3.apply(this, arguments);
442
- };
443
- }(),
444
- onCancel: function onCancel() {
445
- return popRef.current && popRef.current.getRef().hide();
446
- }
447
- })
448
- }, /*#__PURE__*/_react["default"].createElement("span", null)), /*#__PURE__*/_react["default"].createElement("div", {
437
+ }), /*#__PURE__*/_react["default"].createElement(_deleteConfirm["default"], {
438
+ ref: deletePopRef,
439
+ okrInfo: okrInfo,
440
+ approvalSetting: approvalSetting,
441
+ onConfirm: handleDeleteOkr
442
+ }), /*#__PURE__*/_react["default"].createElement("div", {
449
443
  style: {
450
444
  textAlign: 'right',
451
445
  height: 0