@titaui/pc 1.11.5-beta.4 → 1.11.6
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/.husky/pre-commit +2 -2
- package/lib/components/button/rect-btn/index.css +11 -25
- package/lib/components/button/rect-btn/index.js +4 -8
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/index.js +8 -25
- package/lib/components/nav-top/index.js +2 -6
- package/lib/components/okr-detail/detail-header/actions.js +40 -44
- package/lib/components/okr-detail/detail-header/index.css +2 -2
- package/lib/components/okr-detail/detail-header/index.js +205 -194
- package/lib/components/okr-detail/index.js +2 -0
- package/lib/components/okr-flow/child-node/index.css +10 -46
- package/lib/components/okr-flow/child-node/work-node.js +3 -19
- package/lib/components/okr-flow/export-modal/index.js +2 -26
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +9 -14
- package/lib/components/okr-flow/okr-map/index.js +14 -32
- package/lib/components/okr-flow/request-apis.js +4 -11
- package/lib/components/okr-flow/utils/index.js +28 -68
- package/lib/components/okr-flow/utils/tree-handler.js +1 -9
- package/lib/components/survey-model/contact.js +93 -0
- package/lib/components/survey-model/index.css +141 -0
- package/lib/components/survey-model/index.js +264 -0
- package/lib/components/survey-model/instance.js +86 -0
- package/lib/components/survey-model/request-api.js +80 -0
- package/lib/components/wechat-btn/index.css +14 -0
- package/lib/components/wechat-btn/index.js +333 -0
- package/lib/index.js +91 -115
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -28
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +1 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +4 -29
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +17 -27
- package/lib/pages/okr-map/number-select/index.css +1 -0
- package/lib/utils/auth.js +60 -3
- package/lib/utils/bs-global.js +14 -2
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +1 -1
- 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 -88
|
@@ -19,6 +19,8 @@ var _actions = require("./actions");
|
|
|
19
19
|
|
|
20
20
|
var _confirm = _interopRequireDefault(require("./confirm"));
|
|
21
21
|
|
|
22
|
+
var _wechatBtn = _interopRequireDefault(require("../../wechat-btn"));
|
|
23
|
+
|
|
22
24
|
var _toast = _interopRequireDefault(require("../../toast"));
|
|
23
25
|
|
|
24
26
|
var _requestApis = require("../request-apis");
|
|
@@ -109,7 +111,7 @@ function OkrDetailHeader(_ref) {
|
|
|
109
111
|
}));
|
|
110
112
|
|
|
111
113
|
case 3:
|
|
112
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
114
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
113
115
|
|
|
114
116
|
context.setGeneralVisibility({
|
|
115
117
|
visibility: visibility,
|
|
@@ -132,229 +134,232 @@ function OkrDetailHeader(_ref) {
|
|
|
132
134
|
setShareVisible(false);
|
|
133
135
|
}, []);
|
|
134
136
|
var actions = (0, _react.useMemo)(function () {
|
|
135
|
-
if (!detailInfo)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
137
|
+
if (!detailInfo) {
|
|
138
|
+
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
|
+
}
|
|
161
166
|
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}));
|
|
165
|
-
|
|
166
|
-
function openShareModal() {
|
|
167
|
-
return _openShareModal.apply(this, arguments);
|
|
168
|
-
}
|
|
167
|
+
}, _callee2);
|
|
168
|
+
}));
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
changeVisiblilty: function changeVisiblilty(visibility) {
|
|
173
|
-
if (visibility === 4) {
|
|
174
|
-
if (userSelectRef.current) {
|
|
175
|
-
userSelectRef.current.open();
|
|
170
|
+
function openShareModal() {
|
|
171
|
+
return _openShareModal.apply(this, arguments);
|
|
176
172
|
}
|
|
177
173
|
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
},
|
|
186
|
-
onCopyOkr: function onCopyOkr() {
|
|
187
|
-
// @ts-ignore
|
|
188
|
-
window.openCopyOkrModal({
|
|
189
|
-
okrId: detailInfo.workId,
|
|
190
|
-
okrType: detailInfo.okrType
|
|
191
|
-
});
|
|
192
|
-
},
|
|
193
|
-
onChangeOkrFollow: function () {
|
|
194
|
-
var _onChangeOkrFollow = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(follow) {
|
|
195
|
-
var res;
|
|
196
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
197
|
-
while (1) {
|
|
198
|
-
switch (_context3.prev = _context3.next) {
|
|
199
|
-
case 0:
|
|
200
|
-
_context3.next = 2;
|
|
201
|
-
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"));
|
|
202
|
-
|
|
203
|
-
case 2:
|
|
204
|
-
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
|
+
}
|
|
205
181
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
210
184
|
|
|
211
|
-
|
|
212
|
-
|
|
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;
|
|
213
225
|
break;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
_context3.next = 7;
|
|
217
|
-
return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
|
|
218
226
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
227
|
+
case 9:
|
|
228
|
+
_context3.next = 11;
|
|
229
|
+
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
222
230
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
231
|
+
case 11:
|
|
232
|
+
context.setGeneralRoleType(follow ? 3 : 0); // 关注
|
|
226
233
|
|
|
227
|
-
|
|
228
|
-
context.setGeneralRoleType(follow ? 3 : 0); // 关注
|
|
234
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
229
235
|
|
|
230
|
-
|
|
236
|
+
if (!follow) {
|
|
237
|
+
commonContext.refreshAll();
|
|
238
|
+
}
|
|
231
239
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
case 14:
|
|
237
|
-
case "end":
|
|
238
|
-
return _context3.stop();
|
|
240
|
+
case 14:
|
|
241
|
+
case "end":
|
|
242
|
+
return _context3.stop();
|
|
243
|
+
}
|
|
239
244
|
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}));
|
|
243
|
-
|
|
244
|
-
function onChangeOkrFollow(_x3) {
|
|
245
|
-
return _onChangeOkrFollow.apply(this, arguments);
|
|
246
|
-
}
|
|
245
|
+
}, _callee3);
|
|
246
|
+
}));
|
|
247
247
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
var _onFinishOrReOpen = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(isFinish) {
|
|
252
|
-
var res;
|
|
253
|
-
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
254
|
-
while (1) {
|
|
255
|
-
switch (_context4.prev = _context4.next) {
|
|
256
|
-
case 0:
|
|
257
|
-
_context4.next = 2;
|
|
258
|
-
return (0, _confirm["default"])(isFinish ? (0, _getLocale.getLocale)("OKR_MyO_Areycloseobjective") : (0, _getLocale.getLocale)("OKR_MyO_Err_Restart"));
|
|
259
|
-
|
|
260
|
-
case 2:
|
|
261
|
-
res = _context4.sent;
|
|
262
|
-
|
|
263
|
-
if (!res) {
|
|
264
|
-
_context4.next = 13;
|
|
265
|
-
break;
|
|
266
|
-
}
|
|
248
|
+
function onChangeOkrFollow(_x3) {
|
|
249
|
+
return _onChangeOkrFollow.apply(this, arguments);
|
|
250
|
+
}
|
|
267
251
|
|
|
268
|
-
|
|
269
|
-
|
|
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;
|
|
270
282
|
break;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
_context4.next = 7;
|
|
274
|
-
return (0, _requestApis.close)(detailInfo.workId);
|
|
275
283
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
284
|
+
case 9:
|
|
285
|
+
_context4.next = 11;
|
|
286
|
+
return (0, _requestApis.start)(detailInfo.workId);
|
|
279
287
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
return (0, _requestApis.start)(detailInfo.workId);
|
|
288
|
+
case 11:
|
|
289
|
+
commonContext.refreshAll(); // 刷新
|
|
283
290
|
|
|
284
|
-
|
|
285
|
-
commonContext.refreshAll(); // 刷新
|
|
291
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
286
292
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return _context4.stop();
|
|
293
|
+
case 13:
|
|
294
|
+
case "end":
|
|
295
|
+
return _context4.stop();
|
|
296
|
+
}
|
|
292
297
|
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}));
|
|
298
|
+
}, _callee4);
|
|
299
|
+
}));
|
|
296
300
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
return onFinishOrReOpen;
|
|
302
|
-
}(),
|
|
303
|
-
onQuit: function () {
|
|
304
|
-
var _onQuit = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
305
|
-
var res;
|
|
306
|
-
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
307
|
-
while (1) {
|
|
308
|
-
switch (_context5.prev = _context5.next) {
|
|
309
|
-
case 0:
|
|
310
|
-
_context5.next = 2;
|
|
311
|
-
return (0, _confirm["default"])((0, _getLocale.getLocale)("OKR_MyO_Err_Quit"), (0, _getLocale.getLocale)("OKR_MyO_Err_Inchargec"));
|
|
312
|
-
|
|
313
|
-
case 2:
|
|
314
|
-
res = _context5.sent;
|
|
315
|
-
|
|
316
|
-
if (!res) {
|
|
317
|
-
_context5.next = 8;
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
_context5.next = 6;
|
|
322
|
-
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 2);
|
|
323
|
-
|
|
324
|
-
case 6:
|
|
325
|
-
// context.setGeneralRoleType(0)
|
|
326
|
-
commonContext.refreshAll(); // 刷新
|
|
327
|
-
|
|
328
|
-
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
301
|
+
function onFinishOrReOpen(_x4) {
|
|
302
|
+
return _onFinishOrReOpen.apply(this, arguments);
|
|
303
|
+
}
|
|
329
304
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
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
|
+
}
|
|
333
338
|
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}));
|
|
339
|
+
}, _callee5);
|
|
340
|
+
}));
|
|
337
341
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
342
|
+
function onQuit() {
|
|
343
|
+
return _onQuit.apply(this, arguments);
|
|
344
|
+
}
|
|
341
345
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
346
|
+
return onQuit;
|
|
347
|
+
}()
|
|
348
|
+
});
|
|
349
|
+
}
|
|
345
350
|
}, [detailInfo, context.generalRoleType, context.generalPrincipalUser, context.generalVisibility.visibility]);
|
|
346
351
|
var parent = null;
|
|
347
352
|
|
|
348
353
|
if (context.generalParent) {
|
|
349
354
|
if (context.generalParent.parentKr) {
|
|
350
355
|
parent = {
|
|
351
|
-
type:
|
|
356
|
+
type: 'kr',
|
|
352
357
|
id: context.generalParent.parentKr.mileStoneId,
|
|
353
358
|
name: context.generalParent.parentKr.mileStoneName
|
|
354
359
|
};
|
|
355
360
|
} else if (context.generalParent.parentOkr) {
|
|
356
361
|
parent = {
|
|
357
|
-
type:
|
|
362
|
+
type: 'okr',
|
|
358
363
|
id: context.generalParent.parentOkr.workId,
|
|
359
364
|
name: context.generalParent.parentOkr.workName
|
|
360
365
|
};
|
|
@@ -363,19 +368,25 @@ function OkrDetailHeader(_ref) {
|
|
|
363
368
|
|
|
364
369
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
|
|
365
370
|
actions: actions,
|
|
371
|
+
actionComponent: /*#__PURE__*/_react["default"].createElement(_wechatBtn["default"], {
|
|
372
|
+
id: detailInfo.workId,
|
|
373
|
+
objType: 62,
|
|
374
|
+
name: detailInfo.workName,
|
|
375
|
+
principalUser: detailInfo.principalUser
|
|
376
|
+
}),
|
|
366
377
|
content: parent ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
367
378
|
className: "okr-detail-head-parent"
|
|
368
379
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
369
380
|
className: "tu-icon-liebiao-duiqinubiao"
|
|
370
381
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
371
382
|
onClick: function onClick() {
|
|
372
|
-
return parent.type ===
|
|
383
|
+
return parent.type === 'okr' ? _drawerManager["default"].open('okrDetail', {
|
|
373
384
|
okrId: parent.id
|
|
374
|
-
}) : _drawerManager["default"].open(
|
|
385
|
+
}) : _drawerManager["default"].open('krDetail', {
|
|
375
386
|
krId: parent.id
|
|
376
387
|
});
|
|
377
388
|
}
|
|
378
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type ===
|
|
389
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === 'okr' ? 'O ' : 'KR '), parent.name)) : null
|
|
379
390
|
}), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
|
|
380
391
|
visible: shareVisible,
|
|
381
392
|
onClose: closeShareModal,
|
|
@@ -412,7 +423,7 @@ function OkrDetailHeader(_ref) {
|
|
|
412
423
|
});
|
|
413
424
|
|
|
414
425
|
case 2:
|
|
415
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
426
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Pro_detail_Deletsuccess'));
|
|
416
427
|
|
|
417
428
|
setTimeout(function () {
|
|
418
429
|
commonContext.refreshAll();
|
|
@@ -436,7 +447,7 @@ function OkrDetailHeader(_ref) {
|
|
|
436
447
|
})
|
|
437
448
|
}, /*#__PURE__*/_react["default"].createElement("span", null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
438
449
|
style: {
|
|
439
|
-
textAlign:
|
|
450
|
+
textAlign: 'right',
|
|
440
451
|
height: 0
|
|
441
452
|
}
|
|
442
453
|
}, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
@@ -450,9 +461,9 @@ function OkrDetailHeader(_ref) {
|
|
|
450
461
|
selectNodes: context.generalVisibility.visibilityScope || {},
|
|
451
462
|
trigger: /*#__PURE__*/_react["default"].createElement("div", {
|
|
452
463
|
style: {
|
|
453
|
-
visibility:
|
|
464
|
+
visibility: 'hidden',
|
|
454
465
|
zIndex: -1,
|
|
455
|
-
display:
|
|
466
|
+
display: 'inline-block',
|
|
456
467
|
height: 0
|
|
457
468
|
}
|
|
458
469
|
}, "empty select")
|
|
@@ -17,6 +17,8 @@ var _header = _interopRequireDefault(require("./components/header"));
|
|
|
17
17
|
|
|
18
18
|
var _tabs = _interopRequireWildcard(require("../tabs"));
|
|
19
19
|
|
|
20
|
+
var _request = require("../../utils/request");
|
|
21
|
+
|
|
20
22
|
var _tabPanelContent = _interopRequireDefault(require("./components/tab-panel-content"));
|
|
21
23
|
|
|
22
24
|
var _baseInfo = _interopRequireDefault(require("./base-info"));
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
.titaui-okr-flow--node {
|
|
38
38
|
position: relative;
|
|
39
39
|
padding: 10px 12px;
|
|
40
|
-
width:
|
|
40
|
+
width: 320px;
|
|
41
|
+
height: 96px;
|
|
41
42
|
background: #ffffff;
|
|
42
43
|
box-shadow: 0px 4px 10px 0px rgba(127, 145, 180, 0.1);
|
|
43
44
|
border-radius: 6px;
|
|
@@ -74,57 +75,20 @@
|
|
|
74
75
|
white-space: unset;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
.titaui-okr-flow--node-krs {
|
|
78
|
-
margin-top: 12px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.titaui-okr-flow--node-kr {
|
|
82
|
-
display: flex;
|
|
83
|
-
line-height: 20px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.titaui-okr-flow--node-kr-icon {
|
|
87
|
-
color: rgba(40, 121, 255, 0.6);
|
|
88
|
-
margin-right: 8px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.titaui-okr-flow--node-kr-title {
|
|
92
|
-
flex: 1;
|
|
93
|
-
font-size: 13px;
|
|
94
|
-
font-weight: 400;
|
|
95
|
-
color: #3F4755;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.titaui-okr-flow--node-kr-progress {
|
|
99
|
-
width: 32px;
|
|
100
|
-
text-align: right;
|
|
101
|
-
margin-left: 8px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.titaui-okr-flow--node-kr-status--normal {
|
|
105
|
-
color: #2879ff;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.titaui-okr-flow--node-kr-status--risk {
|
|
109
|
-
color: #f6bd16;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.titaui-okr-flow--node-kr-status--expired {
|
|
113
|
-
color: #f05e5e;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.titaui-okr-flow--node-kr-status--complete {
|
|
117
|
-
color: #5ad8a6;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
78
|
.titaui-okr-flow--node-title {
|
|
121
79
|
max-width: 252px;
|
|
80
|
+
height: 44px;
|
|
122
81
|
margin-right: 54px;
|
|
123
82
|
margin-bottom: 8px;
|
|
124
|
-
line-height:
|
|
83
|
+
line-height: 22px;
|
|
125
84
|
color: #141c28;
|
|
126
85
|
font-size: 14px;
|
|
127
|
-
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
text-overflow: ellipsis;
|
|
88
|
+
display: -webkit-box;
|
|
89
|
+
text-overflow: ellipsis;
|
|
90
|
+
-webkit-box-orient: vertical;
|
|
91
|
+
-webkit-line-clamp: 2;
|
|
128
92
|
}
|
|
129
93
|
|
|
130
94
|
.titaui-okr-flow--node-desp {
|
|
@@ -71,7 +71,6 @@ function WorkNode(_ref) {
|
|
|
71
71
|
manualRiskLevel = data.manualRiskLevel,
|
|
72
72
|
progress = data.progress,
|
|
73
73
|
okrClassify = data.okrClassify,
|
|
74
|
-
Krs = data.Krs,
|
|
75
74
|
cycleType = data.cycleType,
|
|
76
75
|
startDate = data.startDate,
|
|
77
76
|
endDate = data.endDate,
|
|
@@ -93,8 +92,6 @@ function WorkNode(_ref) {
|
|
|
93
92
|
imgWidth = _useState6[0],
|
|
94
93
|
setImgWidth = _useState6[1];
|
|
95
94
|
|
|
96
|
-
var bodyr = (0, _react.useRef)();
|
|
97
|
-
|
|
98
95
|
var getOkrTypeMap = function getOkrTypeMap() {
|
|
99
96
|
return {
|
|
100
97
|
1: (0, _getLocale.getLocale)("OKR_MyO_Pop_Individual"),
|
|
@@ -213,13 +210,12 @@ function WorkNode(_ref) {
|
|
|
213
210
|
}; // 1:正常 2:有风险 3:过期 4:完成 5:过期完成 ,
|
|
214
211
|
|
|
215
212
|
|
|
216
|
-
var riskLevelSuffix = ["normal", "normal", "risk", "expired", "complete", "complete_over"
|
|
213
|
+
var riskLevelSuffix = ["normal", "normal", "risk", "expired", "complete", "complete_over"];
|
|
217
214
|
if (!MapOkrVisible) return /*#__PURE__*/_react["default"].createElement("div", {
|
|
218
215
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node"), "".concat(_precls["default"], "--node__private"))
|
|
219
216
|
});
|
|
220
217
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "--node"), _defineProperty({}, "".concat(_precls["default"], "--node__search"), isSearchRes))
|
|
222
|
-
ref: bodyr
|
|
218
|
+
className: (0, _classnames["default"])("".concat(_precls["default"], "--node"), _defineProperty({}, "".concat(_precls["default"], "--node__search"), isSearchRes))
|
|
223
219
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
224
220
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-title"))
|
|
225
221
|
}, workName, /*#__PURE__*/_react["default"].createElement(_okrClassify["default"], {
|
|
@@ -234,19 +230,7 @@ function WorkNode(_ref) {
|
|
|
234
230
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-type"))
|
|
235
231
|
}, getOkrTypeMap()[okrType])), /*#__PURE__*/_react["default"].createElement("span", {
|
|
236
232
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-cycle"))
|
|
237
|
-
}, getCycleTextByType()))),
|
|
238
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-krs"))
|
|
239
|
-
}, Krs.map(function (item, key) {
|
|
240
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
241
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-kr"))
|
|
242
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
243
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-kr-icon"))
|
|
244
|
-
}, "KR", item.SortNum + 1), /*#__PURE__*/_react["default"].createElement("div", {
|
|
245
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-kr-title"))
|
|
246
|
-
}, item.mileStoneName), /*#__PURE__*/_react["default"].createElement("div", {
|
|
247
|
-
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-kr-progress ").concat(_precls["default"], "--node-kr-status--").concat(riskLevelSuffix[item.riskLevel]))
|
|
248
|
-
}, item.progress, "%"));
|
|
249
|
-
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
233
|
+
}, getCycleTextByType()))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
250
234
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-status"), "".concat(_precls["default"], "--node-status__").concat(riskLevelSuffix[manualRiskLevel]))
|
|
251
235
|
}, /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
252
236
|
text: "".concat(progress, "%"),
|