@titaui/pc 1.11.21-beta.2 → 1.11.21-beta.3
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.
- package/lib/components/avatar/name-avatar/index.css +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +6 -12
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/headerAction.js +1 -5
- package/lib/components/drawer/headerDrop.js +4 -41
- package/lib/components/drawer/index.css +0 -44
- package/lib/components/drawer/index.js +7 -36
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/nav-top/index.js +5 -6
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -16
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -9
- package/lib/components/okr-detail/components/header/o-name.js +3 -9
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +6 -9
- package/lib/components/okr-detail/detail-header/index.js +195 -206
- package/lib/components/okr-detail/index.js +2 -21
- package/lib/components/okr-detail/okr-list/index.js +3 -8
- package/lib/components/okr-detail/request-apis.js +1 -7
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/index.js +0 -40
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +2 -2
- package/lib/components/dynamic/advertise/components/next-btn/index.css +0 -27
- package/lib/components/dynamic/advertise/components/next-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/components/pre-btn/index.css +0 -26
- package/lib/components/dynamic/advertise/components/pre-btn/index.js +0 -32
- package/lib/components/dynamic/advertise/index.css +0 -21
- package/lib/components/dynamic/advertise/index.js +0 -126
- package/lib/components/dynamic/advertise/interface.js +0 -5
- package/lib/components/dynamic/advertise/util.js +0 -28
- package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -81
- package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -203
- package/lib/components/dynamic/components/first-level-tabs/index.css +0 -101
- package/lib/components/dynamic/components/first-level-tabs/index.js +0 -131
- package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
- package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -146
- package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -180
- package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -105
- package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
- package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
- package/lib/components/dynamic/dynamic-liking/index.css +0 -81
- package/lib/components/dynamic/dynamic-liking/index.js +0 -79
- package/lib/components/dynamic/dynamic-liking/item.js +0 -75
- package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
- package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +0 -16
- package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +0 -30
- package/lib/components/dynamic/dynamic-topping/index.css +0 -141
- package/lib/components/dynamic/dynamic-topping/index.js +0 -82
- package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
- package/lib/components/dynamic/dynamic-topping/item.js +0 -153
- package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
- package/lib/components/dynamic/dynamic.css +0 -173
- package/lib/components/dynamic/dynamic.js +0 -428
- package/lib/components/dynamic/export-module/index.js +0 -37
- package/lib/components/dynamic/img/dynamic-top.svg +0 -14
- package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
- package/lib/components/dynamic/my-team/img/line.png +0 -0
- package/lib/components/dynamic/my-team/img/team.png +0 -0
- package/lib/components/dynamic/my-team/index.css +0 -184
- package/lib/components/dynamic/my-team/index.js +0 -263
- package/lib/components/dynamic/my-team/request-api.js +0 -52
- package/lib/components/dynamic/my-team/util.js +0 -20
- package/lib/components/dynamic/new-ui.css +0 -192
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +0 -58
- package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +0 -68
- package/lib/components/dynamic/online-broadcast/data.js +0 -77
- package/lib/components/dynamic/online-broadcast/img/broadcast.svg +0 -14
- package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
- package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
- package/lib/components/dynamic/online-broadcast/index.css +0 -46
- package/lib/components/dynamic/online-broadcast/index.js +0 -61
- package/lib/components/dynamic/online-broadcast/interfact.js +0 -5
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -39
- package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
- package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -44
- package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
- package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
- package/lib/components/dynamic/quick-operation/index.css +0 -51
- package/lib/components/dynamic/quick-operation/index.js +0 -120
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/helper.js +0 -62
- package/lib/components/textarea/index.css +0 -120
- package/lib/components/textarea/index.js +0 -257
- package/lib/pages/new-okr-list/header/common.js +0 -52
- package/lib/pages/new-okr-list/header/operate-record.js +0 -124
|
@@ -29,8 +29,6 @@ var _okrShare = _interopRequireDefault(require("../../okr-share"));
|
|
|
29
29
|
|
|
30
30
|
var _context7 = require("../context");
|
|
31
31
|
|
|
32
|
-
var _constant = require("./constant");
|
|
33
|
-
|
|
34
32
|
var _deleteConfirm = _interopRequireDefault(require("./delete-confirm/delete-confirm"));
|
|
35
33
|
|
|
36
34
|
var _drawerManager = _interopRequireDefault(require("../../drawer-manager"));
|
|
@@ -87,9 +85,6 @@ function OkrDetailHeader(_ref) {
|
|
|
87
85
|
var loginUserId = window.BSGlobal.loginUserInfo.Id;
|
|
88
86
|
var context = (0, _react.useContext)(_context7.GeneralDataContext);
|
|
89
87
|
var commonContext = (0, _react.useContext)(_context7.CommonContext);
|
|
90
|
-
var approvalSetting = commonContext.approvalSetting,
|
|
91
|
-
okrInfo = commonContext.okrInfo;
|
|
92
|
-
var approveStatusColor = (0, _constant.ApproveStatusColor)(detailInfo.applyState);
|
|
93
88
|
var changVisiblity = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
94
89
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(workId, visibility) {
|
|
95
90
|
var visibilityScope,
|
|
@@ -116,7 +111,7 @@ function OkrDetailHeader(_ref) {
|
|
|
116
111
|
}));
|
|
117
112
|
|
|
118
113
|
case 3:
|
|
119
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
114
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
120
115
|
|
|
121
116
|
context.setGeneralVisibility({
|
|
122
117
|
visibility: visibility,
|
|
@@ -141,230 +136,230 @@ function OkrDetailHeader(_ref) {
|
|
|
141
136
|
var actions = (0, _react.useMemo)(function () {
|
|
142
137
|
if (!detailInfo) {
|
|
143
138
|
return [];
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
+
}
|
|
171
166
|
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}));
|
|
175
|
-
|
|
176
|
-
function openShareModal() {
|
|
177
|
-
return _openShareModal.apply(this, arguments);
|
|
178
|
-
}
|
|
167
|
+
}, _callee2);
|
|
168
|
+
}));
|
|
179
169
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
changeVisiblilty: function changeVisiblilty(visibility) {
|
|
183
|
-
if (visibility === 4) {
|
|
184
|
-
if (userSelectRef.current) {
|
|
185
|
-
userSelectRef.current.open();
|
|
170
|
+
function openShareModal() {
|
|
171
|
+
return _openShareModal.apply(this, arguments);
|
|
186
172
|
}
|
|
187
173
|
|
|
188
|
-
return;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
},
|
|
196
|
-
onCopyOkr: function onCopyOkr() {
|
|
197
|
-
// @ts-ignore
|
|
198
|
-
window.openCopyOkrModal({
|
|
199
|
-
okrId: detailInfo.workId,
|
|
200
|
-
okrType: detailInfo.okrType
|
|
201
|
-
});
|
|
202
|
-
},
|
|
203
|
-
onChangeOkrFollow: function () {
|
|
204
|
-
var _onChangeOkrFollow = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(follow) {
|
|
205
|
-
var res;
|
|
206
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
207
|
-
while (1) {
|
|
208
|
-
switch (_context3.prev = _context3.next) {
|
|
209
|
-
case 0:
|
|
210
|
-
_context3.next = 2;
|
|
211
|
-
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"));
|
|
212
|
-
|
|
213
|
-
case 2:
|
|
214
|
-
res = _context3.sent;
|
|
174
|
+
return openShareModal;
|
|
175
|
+
}(),
|
|
176
|
+
changeVisiblilty: function changeVisiblilty(visibility) {
|
|
177
|
+
if (visibility === 4) {
|
|
178
|
+
if (userSelectRef.current) {
|
|
179
|
+
userSelectRef.current.open();
|
|
180
|
+
}
|
|
215
181
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
break;
|
|
219
|
-
}
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
220
184
|
|
|
221
|
-
|
|
222
|
-
|
|
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;
|
|
223
225
|
break;
|
|
224
|
-
}
|
|
225
226
|
|
|
226
|
-
|
|
227
|
-
|
|
227
|
+
case 9:
|
|
228
|
+
_context3.next = 11;
|
|
229
|
+
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
228
230
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
break;
|
|
231
|
+
case 11:
|
|
232
|
+
context.setGeneralRoleType(follow ? 3 : 0); // 关注
|
|
232
233
|
|
|
233
|
-
|
|
234
|
-
_context3.next = 11;
|
|
235
|
-
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
234
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
236
235
|
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
if (!follow) {
|
|
237
|
+
commonContext.refreshAll();
|
|
238
|
+
}
|
|
239
239
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
case 14:
|
|
247
|
-
case "end":
|
|
248
|
-
return _context3.stop();
|
|
240
|
+
case 14:
|
|
241
|
+
case "end":
|
|
242
|
+
return _context3.stop();
|
|
243
|
+
}
|
|
249
244
|
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}));
|
|
253
|
-
|
|
254
|
-
function onChangeOkrFollow(_x3) {
|
|
255
|
-
return _onChangeOkrFollow.apply(this, arguments);
|
|
256
|
-
}
|
|
245
|
+
}, _callee3);
|
|
246
|
+
}));
|
|
257
247
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
var _onFinishOrReOpen = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(isFinish) {
|
|
262
|
-
var res;
|
|
263
|
-
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
264
|
-
while (1) {
|
|
265
|
-
switch (_context4.prev = _context4.next) {
|
|
266
|
-
case 0:
|
|
267
|
-
_context4.next = 2;
|
|
268
|
-
return (0, _confirm["default"])(isFinish ? (0, _getLocale.getLocale)("OKR_MyO_Areycloseobjective") : (0, _getLocale.getLocale)("OKR_MyO_Err_Restart"));
|
|
269
|
-
|
|
270
|
-
case 2:
|
|
271
|
-
res = _context4.sent;
|
|
272
|
-
|
|
273
|
-
if (!res) {
|
|
274
|
-
_context4.next = 13;
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
248
|
+
function onChangeOkrFollow(_x3) {
|
|
249
|
+
return _onChangeOkrFollow.apply(this, arguments);
|
|
250
|
+
}
|
|
277
251
|
|
|
278
|
-
|
|
279
|
-
|
|
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;
|
|
280
282
|
break;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
_context4.next = 7;
|
|
284
|
-
return (0, _requestApis.close)(detailInfo.workId);
|
|
285
283
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
284
|
+
case 9:
|
|
285
|
+
_context4.next = 11;
|
|
286
|
+
return (0, _requestApis.start)(detailInfo.workId);
|
|
289
287
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
return (0, _requestApis.start)(detailInfo.workId);
|
|
288
|
+
case 11:
|
|
289
|
+
commonContext.refreshAll(); // 刷新
|
|
293
290
|
|
|
294
|
-
|
|
295
|
-
commonContext.refreshAll(); // 刷新
|
|
291
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
296
292
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
return _context4.stop();
|
|
293
|
+
case 13:
|
|
294
|
+
case "end":
|
|
295
|
+
return _context4.stop();
|
|
296
|
+
}
|
|
302
297
|
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}));
|
|
298
|
+
}, _callee4);
|
|
299
|
+
}));
|
|
306
300
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
return onFinishOrReOpen;
|
|
312
|
-
}(),
|
|
313
|
-
onQuit: function () {
|
|
314
|
-
var _onQuit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
315
|
-
var res;
|
|
316
|
-
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
317
|
-
while (1) {
|
|
318
|
-
switch (_context5.prev = _context5.next) {
|
|
319
|
-
case 0:
|
|
320
|
-
_context5.next = 2;
|
|
321
|
-
return (0, _confirm["default"])((0, _getLocale.getLocale)("OKR_MyO_Err_Quit"), (0, _getLocale.getLocale)("OKR_MyO_Err_Inchargec"));
|
|
322
|
-
|
|
323
|
-
case 2:
|
|
324
|
-
res = _context5.sent;
|
|
325
|
-
|
|
326
|
-
if (!res) {
|
|
327
|
-
_context5.next = 8;
|
|
328
|
-
break;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
_context5.next = 6;
|
|
332
|
-
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 2);
|
|
333
|
-
|
|
334
|
-
case 6:
|
|
335
|
-
// context.setGeneralRoleType(0)
|
|
336
|
-
commonContext.refreshAll(); // 刷新
|
|
337
|
-
|
|
338
|
-
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
301
|
+
function onFinishOrReOpen(_x4) {
|
|
302
|
+
return _onFinishOrReOpen.apply(this, arguments);
|
|
303
|
+
}
|
|
339
304
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
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
|
+
}
|
|
343
338
|
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}));
|
|
339
|
+
}, _callee5);
|
|
340
|
+
}));
|
|
347
341
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
342
|
+
function onQuit() {
|
|
343
|
+
return _onQuit.apply(this, arguments);
|
|
344
|
+
}
|
|
351
345
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
346
|
+
return onQuit;
|
|
347
|
+
}()
|
|
348
|
+
});
|
|
349
|
+
}
|
|
355
350
|
}, [detailInfo, context.generalRoleType, context.generalPrincipalUser, context.generalVisibility.visibility]);
|
|
356
351
|
var parent = null;
|
|
357
352
|
|
|
358
353
|
if (context.generalParent) {
|
|
359
354
|
if (context.generalParent.parentKr) {
|
|
360
355
|
parent = {
|
|
361
|
-
type:
|
|
356
|
+
type: 'kr',
|
|
362
357
|
id: context.generalParent.parentKr.mileStoneId,
|
|
363
358
|
name: context.generalParent.parentKr.mileStoneName
|
|
364
359
|
};
|
|
365
360
|
} else if (context.generalParent.parentOkr) {
|
|
366
361
|
parent = {
|
|
367
|
-
type:
|
|
362
|
+
type: 'okr',
|
|
368
363
|
id: context.generalParent.parentOkr.workId,
|
|
369
364
|
name: context.generalParent.parentOkr.workName
|
|
370
365
|
};
|
|
@@ -373,8 +368,6 @@ function OkrDetailHeader(_ref) {
|
|
|
373
368
|
|
|
374
369
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
|
|
375
370
|
actions: actions,
|
|
376
|
-
approvalSetting: approvalSetting,
|
|
377
|
-
detailInfo: detailInfo,
|
|
378
371
|
actionComponent: /*#__PURE__*/_react["default"].createElement(_wechatBtn["default"], {
|
|
379
372
|
id: detailInfo.workId,
|
|
380
373
|
objType: 62,
|
|
@@ -387,17 +380,13 @@ function OkrDetailHeader(_ref) {
|
|
|
387
380
|
className: "tu-icon-liebiao-duiqinubiao"
|
|
388
381
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
389
382
|
onClick: function onClick() {
|
|
390
|
-
return parent.type ===
|
|
383
|
+
return parent.type === 'okr' ? _drawerManager["default"].open('okrDetail', {
|
|
391
384
|
okrId: parent.id
|
|
392
|
-
}) : _drawerManager["default"].open(
|
|
385
|
+
}) : _drawerManager["default"].open('krDetail', {
|
|
393
386
|
krId: parent.id
|
|
394
387
|
});
|
|
395
388
|
}
|
|
396
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type ===
|
|
397
|
-
status: {
|
|
398
|
-
title: (0, _constant.getApproveStatusTextMap)(okrInfo.applyState),
|
|
399
|
-
color: approveStatusColor
|
|
400
|
-
}
|
|
389
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null
|
|
401
390
|
}), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
|
|
402
391
|
visible: shareVisible,
|
|
403
392
|
onClose: closeShareModal,
|
|
@@ -434,7 +423,7 @@ function OkrDetailHeader(_ref) {
|
|
|
434
423
|
});
|
|
435
424
|
|
|
436
425
|
case 2:
|
|
437
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
426
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'));
|
|
438
427
|
|
|
439
428
|
setTimeout(function () {
|
|
440
429
|
commonContext.refreshAll();
|
|
@@ -458,7 +447,7 @@ function OkrDetailHeader(_ref) {
|
|
|
458
447
|
})
|
|
459
448
|
}, /*#__PURE__*/_react["default"].createElement("span", null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
460
449
|
style: {
|
|
461
|
-
textAlign:
|
|
450
|
+
textAlign: 'right',
|
|
462
451
|
height: 0
|
|
463
452
|
}
|
|
464
453
|
}, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
@@ -472,9 +461,9 @@ function OkrDetailHeader(_ref) {
|
|
|
472
461
|
selectNodes: context.generalVisibility.visibilityScope || {},
|
|
473
462
|
trigger: /*#__PURE__*/_react["default"].createElement("div", {
|
|
474
463
|
style: {
|
|
475
|
-
visibility:
|
|
464
|
+
visibility: 'hidden',
|
|
476
465
|
zIndex: -1,
|
|
477
|
-
display:
|
|
466
|
+
display: 'inline-block',
|
|
478
467
|
height: 0
|
|
479
468
|
}
|
|
480
469
|
}, "empty select")
|
|
@@ -27,8 +27,6 @@ var _schedule = _interopRequireDefault(require("./schedule"));
|
|
|
27
27
|
|
|
28
28
|
var _requestApis = require("./request-apis");
|
|
29
29
|
|
|
30
|
-
var _helper = require("./helper");
|
|
31
|
-
|
|
32
30
|
var _okrReview = _interopRequireDefault(require("../okr-review"));
|
|
33
31
|
|
|
34
32
|
var _reportList = _interopRequireDefault(require("../eReport/eReportLists/reportList"));
|
|
@@ -175,14 +173,7 @@ function OkrDetail(props) {
|
|
|
175
173
|
var _useState23 = (0, _react.useState)(),
|
|
176
174
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
177
175
|
generalRoleType = _useState24[0],
|
|
178
|
-
setGeneralRoleType = _useState24[1];
|
|
179
|
-
|
|
180
|
-
var _useState25 = (0, _react.useState)({
|
|
181
|
-
isOpen: false
|
|
182
|
-
}),
|
|
183
|
-
_useState26 = _slicedToArray(_useState25, 2),
|
|
184
|
-
approvalSetting = _useState26[0],
|
|
185
|
-
setApprovalSetting = _useState26[1]; // 计算元素的ref,用于实现 tabs 吸顶,点赞吸底
|
|
176
|
+
setGeneralRoleType = _useState24[1]; // 计算元素的ref,用于实现 tabs 吸顶,点赞吸底
|
|
186
177
|
|
|
187
178
|
|
|
188
179
|
var tabRef = (0, _react.useRef)();
|
|
@@ -212,18 +203,9 @@ function OkrDetail(props) {
|
|
|
212
203
|
getData();
|
|
213
204
|
};
|
|
214
205
|
|
|
215
|
-
var getApprovalShow = function getApprovalShow() {
|
|
216
|
-
(0, _requestApis.getOkrApprovalSettingInfo)().then(function (resp) {
|
|
217
|
-
if (resp.Code === 1) {
|
|
218
|
-
setApprovalSetting((0, _helper.getApprovalOpenItem)(resp.Data));
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
};
|
|
222
|
-
|
|
223
206
|
(0, _react.useEffect)(function () {
|
|
224
207
|
setLoading(true);
|
|
225
208
|
getData();
|
|
226
|
-
getApprovalShow();
|
|
227
209
|
}, []);
|
|
228
210
|
(0, _react.useEffect)(function () {
|
|
229
211
|
if (!okrInfo || !okrInfo.workId) return;
|
|
@@ -294,8 +276,7 @@ function OkrDetail(props) {
|
|
|
294
276
|
changeTabActive: changeTabActive,
|
|
295
277
|
refreshAll: refreshAll,
|
|
296
278
|
setOkrInfo: setOkrInfo,
|
|
297
|
-
refreshKrs: refreshKrs
|
|
298
|
-
approvalSetting: approvalSetting
|
|
279
|
+
refreshKrs: refreshKrs
|
|
299
280
|
})
|
|
300
281
|
}, /*#__PURE__*/_react["default"].createElement(_context.GeneralDataContext.Provider, {
|
|
301
282
|
value: {
|
|
@@ -43,8 +43,6 @@ var _auth = require("../../../utils/auth");
|
|
|
43
43
|
|
|
44
44
|
var _getLocale = require("../../../utils/getLocale");
|
|
45
45
|
|
|
46
|
-
var _helper = require("../helper");
|
|
47
|
-
|
|
48
46
|
require("./index.css");
|
|
49
47
|
|
|
50
48
|
var _excluded = ["mileStoneId"];
|
|
@@ -153,8 +151,7 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
153
151
|
setShowOkrEvalute = _useContext.setShowOkrEvalute;
|
|
154
152
|
|
|
155
153
|
var _useContext2 = (0, _react.useContext)(_context2.CommonContext),
|
|
156
|
-
refreshAll = _useContext2.refreshAll
|
|
157
|
-
approvalSetting = _useContext2.approvalSetting;
|
|
154
|
+
refreshAll = _useContext2.refreshAll;
|
|
158
155
|
|
|
159
156
|
var parentId = generalParent.parentId,
|
|
160
157
|
parentOkr = generalParent.parentOkr,
|
|
@@ -443,11 +440,9 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
443
440
|
padding: "0 32px 0 18px"
|
|
444
441
|
}, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
|
|
445
442
|
data: krs,
|
|
446
|
-
|
|
447
|
-
okrInfo: okrInfo,
|
|
448
|
-
draggable: canEditOkr && (0, _helper.getApprovalIsShow)(approvalSetting, "changeOkrName", okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState),
|
|
443
|
+
draggable: canEditOkr,
|
|
449
444
|
onDrop: onOkrItemDropHandler
|
|
450
|
-
}))), (canEditOkr || isInnerUser) &&
|
|
445
|
+
}))), (canEditOkr || isInnerUser) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
451
446
|
ref: wrapperRef,
|
|
452
447
|
className: (0, _classnames["default"])("".concat(preCls, "__addkr"))
|
|
453
448
|
}, /*#__PURE__*/_react["default"].createElement(_paddingLayout["default"], null, createKrShow ? /*#__PURE__*/_react["default"].createElement(_createKrItem["default"], {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.workDelete = exports.updateVisibility = exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.updateProgressDesc = exports.updateProgress = exports.updateParentId = exports.updateOkrVisibility = exports.updateOkrPrincipal = exports.updateOkrName = exports.updateOScore = exports.updateOCommitType = exports.updateOClassify = exports.updateKrProgressAndStatus = exports.updateKrPrincipal = exports.updateKrName = exports.updateKrDate = exports.updateConfidenceIndex = exports.updateClassify = exports.updateChildOkrWeight = exports.transferPrincipal = exports.start = exports.setTaskPriority = exports.saveODesc = exports.remindAction = exports.krChangeOrder = exports.getRelWorks = exports.getRelProgress = exports.getProgress = exports.getPraiseComments = exports.getOrg = exports.getOkrUsers = exports.getOkrDetail = exports.
|
|
6
|
+
exports.workDelete = exports.updateVisibility = exports.updateTaskStatus = exports.updateTaskPrincipal = exports.updateTaskDate = exports.updateProgressDesc = exports.updateProgress = exports.updateParentId = exports.updateOkrVisibility = exports.updateOkrPrincipal = exports.updateOkrName = exports.updateOScore = exports.updateOCommitType = exports.updateOClassify = exports.updateKrProgressAndStatus = exports.updateKrPrincipal = exports.updateKrName = exports.updateKrDate = exports.updateConfidenceIndex = exports.updateClassify = exports.updateChildOkrWeight = exports.transferPrincipal = exports.start = exports.setTaskPriority = exports.saveODesc = exports.remindAction = exports.krChangeOrder = exports.getRelWorks = exports.getRelProgress = exports.getProgress = exports.getPraiseComments = exports.getOrg = exports.getOkrUsers = exports.getOkrDetail = exports.getKrsByCondition = exports.getKrs = exports.getFeedById = exports.deleteUser = exports.deleteProgressDesc = exports.deleteKr = exports.createNewKr = exports.close = exports.cancelRel = exports.cancelPraise = exports.cancelParentOkr = exports.addUserRelation = exports.addUser = exports.addPraise = exports.addComment = void 0;
|
|
7
7
|
|
|
8
8
|
var _qs = _interopRequireDefault(require("qs"));
|
|
9
9
|
|
|
@@ -110,12 +110,6 @@ var getOkrDetail = function getOkrDetail(_ref5) {
|
|
|
110
110
|
|
|
111
111
|
exports.getOkrDetail = getOkrDetail;
|
|
112
112
|
|
|
113
|
-
var getOkrApprovalSettingInfo = function getOkrApprovalSettingInfo() {
|
|
114
|
-
return (0, _request.rget)("v1")("WorkManageSetting/GetOkrApproval");
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
exports.getOkrApprovalSettingInfo = getOkrApprovalSettingInfo;
|
|
118
|
-
|
|
119
113
|
var updateClassify = function updateClassify(_ref6) {
|
|
120
114
|
var okrId = _ref6.okrId,
|
|
121
115
|
okrClassify = _ref6.okrClassify;
|