@titaui/pc 1.12.7 → 1.12.8
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/change-okr-modal/Item.js +19 -18
- package/lib/components/change-okr-modal/styledComponents.js +9 -9
- package/lib/components/create-okr-modal/createSuccessCmp.js +47 -19
- package/lib/components/create-okr-modal/fields/index.css +14 -3
- package/lib/components/create-okr-modal/fields/o-new-name.js +31 -20
- package/lib/components/create-okr-modal/fields/okr-parent.js +7 -5
- package/lib/components/create-okr-modal/index.js +197 -132
- package/lib/components/create-okr-modal/kr-items/index.css +23 -13
- package/lib/components/create-okr-modal/kr-items/krDatas.js +95 -76
- package/lib/components/create-okr-modal/kr-items/krItem.js +54 -57
- package/lib/components/create-okr-modal/style.js +5 -5
- package/lib/components/dynamic/components/title/index.js +1 -1
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +7 -7
- package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +17 -17
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +9 -9
- package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +3 -1
- package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +3 -1
- package/lib/components/eReport/eReportLists/reportList.js +29 -30
- package/lib/components/eReport/eReportShare/style.js +1 -1
- package/lib/components/edit-kr-wight/EditKrWightModal.js +11 -9
- package/lib/components/nav-top/components/menu/index.js +3 -3
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +1 -1
- package/lib/components/nav-top/components/user-message/components/todos/todo-item.js +3 -3
- package/lib/components/okr-detail/components/ao-nice/index.css +0 -1
- package/lib/components/okr-detail/components/header/edit-name.js +76 -39
- package/lib/components/okr-detail/components/header/index.css +122 -41
- package/lib/components/okr-detail/components/header/index.js +45 -48
- package/lib/components/okr-detail/components/header/o-classify.js +154 -0
- package/lib/components/okr-detail/components/header/o-name.js +7 -5
- package/lib/components/okr-detail/components/o-progress-update/index.js +2 -2
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +3 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.css +66 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +174 -64
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/index.js +9 -9
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +15 -13
- package/lib/components/okr-detail/components/tab-panel-content/index.css +1 -0
- package/lib/components/okr-detail/detail-header/index.js +11 -5
- package/lib/components/okr-detail/okr-list/create-kr-item/index.css +17 -0
- package/lib/components/okr-detail/okr-list/create-kr-item/index.js +75 -53
- package/lib/components/okr-detail/okr-list/index.css +9 -0
- package/lib/components/okr-detail/okr-list/index.js +25 -25
- package/lib/components/okr-detail/request-apis.js +73 -69
- package/lib/components/okr-detail/schedule/components/kr-progress/index.js +3 -1
- package/lib/components/okr-detail/schedule/components/o-progress/index.js +34 -32
- package/lib/components/okr-detail/schedule/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-flow/child-node/kr-node.js +3 -1
- package/lib/components/okr-flow/child-node/work-node.js +3 -1
- package/lib/components/okr-flow/export-modal/index.js +6 -6
- package/lib/components/okr-progress/components/kr-progress/index.js +5 -3
- package/lib/components/okr-progress/components/o-progress/index.js +3 -1
- package/lib/components/okr-progress/components/o-progress-update/index.js +2 -2
- package/lib/components/okr-progress/components/sub-o-progress/index.js +3 -1
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +3 -3
- package/lib/components/okr-share/common-painter/openDataPainter.js +9 -6
- package/lib/components/okr-share/common-painter/utils.js +187 -36
- package/lib/components/okr-share/index.css +5 -4
- package/lib/components/okr-share/pink-card/card.js +3 -3
- package/lib/components/okr-share/pink-card/drawKrs.js +97 -18
- package/lib/components/okr-share/pink-card/index.js +20 -12
- package/lib/components/open-data-painter/index.js +6 -5
- package/lib/components/search-key-handle/index.js +12 -10
- package/lib/components/task-relation-modal/okr-relation/tree/task-tree/index.css +2 -2
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +4 -4
- package/lib/components/task-relation-modal/tree-node/o-node/index.js +8 -8
- package/lib/components/upload/components/uploadedPreview.js +17 -17
- package/lib/components/upload/index.js +23 -23
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +14 -14
- package/lib/components/user-selector/searched-panel/index.js +4 -4
- package/lib/components/wechat-btn/index.css +5 -1
- package/lib/components-v1/userSelector/components/SingleMode.js +7 -5
- package/lib/pages/home/components/data-list/table/columns/krName.js +3 -1
- package/lib/pages/home/components/data-list/table/columns/okrName.js +4 -2
- package/lib/pages/new-okr-list/header/index.js +15 -15
- package/lib/utils/hooks.js +5 -5
- package/lib/utils/open-data.js +216 -66
- package/lib/utils/tita-okr-cycle.js +3 -3
- package/package.json +2 -1
|
@@ -37,6 +37,8 @@ var _getLocale = require("../../../../../utils/getLocale");
|
|
|
37
37
|
|
|
38
38
|
var _i18nFrontTranslate = require("../../../../../utils/i18n-front-translate");
|
|
39
39
|
|
|
40
|
+
var _openData = require("../../../../../utils/open-data");
|
|
41
|
+
|
|
40
42
|
require("./index.css");
|
|
41
43
|
|
|
42
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -103,12 +105,12 @@ var OProgress = function OProgress(_ref) {
|
|
|
103
105
|
editOProgressVisiable = _useState12[0],
|
|
104
106
|
setEditOProgressVisiable = _useState12[1];
|
|
105
107
|
|
|
106
|
-
var _useState13 = (0, _react.useState)(
|
|
108
|
+
var _useState13 = (0, _react.useState)(''),
|
|
107
109
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
108
110
|
editOProgressContent = _useState14[0],
|
|
109
111
|
setEditOProgressContent = _useState14[1];
|
|
110
112
|
|
|
111
|
-
var _useState15 = (0, _react.useState)(
|
|
113
|
+
var _useState15 = (0, _react.useState)(''),
|
|
112
114
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
113
115
|
editOProgressId = _useState16[0],
|
|
114
116
|
setEditOProgressId = _useState16[1];
|
|
@@ -143,9 +145,9 @@ var OProgress = function OProgress(_ref) {
|
|
|
143
145
|
};
|
|
144
146
|
|
|
145
147
|
var handleModalOkClick = function handleModalOkClick() {
|
|
146
|
-
(0, _requestApis.updateProgressDesc)(editOProgressId, okrInfo.workId, editOProgressContent ||
|
|
148
|
+
(0, _requestApis.updateProgressDesc)(editOProgressId, okrInfo.workId, editOProgressContent || '').then(function (resp) {
|
|
147
149
|
if (resp.Code === 1) {
|
|
148
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
150
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'), {
|
|
149
151
|
canClose: false
|
|
150
152
|
});
|
|
151
153
|
|
|
@@ -158,7 +160,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
158
160
|
});
|
|
159
161
|
}
|
|
160
162
|
})["catch"](function (e) {
|
|
161
|
-
_toast["default"].Error(
|
|
163
|
+
_toast["default"].Error('网络异常', {
|
|
162
164
|
canClose: false
|
|
163
165
|
});
|
|
164
166
|
});
|
|
@@ -177,7 +179,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
177
179
|
onClick: onOpenModal
|
|
178
180
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
179
181
|
className: "tu-icon-gengxin o-progress__func-btn-icon"
|
|
180
|
-
}), (0, _getLocale.getLocale)(
|
|
182
|
+
}), (0, _getLocale.getLocale)('OKR_MyO_Prog_Butt_Update'));
|
|
181
183
|
};
|
|
182
184
|
|
|
183
185
|
var handleRemind = (0, _react.useCallback)(function () {
|
|
@@ -188,7 +190,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
188
190
|
type: 2
|
|
189
191
|
}).then(function (resp) {
|
|
190
192
|
if (resp.Code === 1) {
|
|
191
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
193
|
+
_toast["default"].Success((0, _getLocale.getLocale)('OKR_MyO_Prog_Remindersu'), {
|
|
192
194
|
canClose: false
|
|
193
195
|
});
|
|
194
196
|
} else {
|
|
@@ -197,7 +199,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
197
199
|
});
|
|
198
200
|
}
|
|
199
201
|
})["catch"](function (e) {
|
|
200
|
-
_toast["default"].Error(
|
|
202
|
+
_toast["default"].Error('网络异常', {
|
|
201
203
|
canClose: false
|
|
202
204
|
});
|
|
203
205
|
})["finally"](function () {
|
|
@@ -212,7 +214,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
212
214
|
work_id: okrInfo.workId
|
|
213
215
|
}).then(function (resp) {
|
|
214
216
|
if (resp.Code === 1) {
|
|
215
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
217
|
+
_toast["default"].Success((0, _getLocale.getLocale)('OKR_MyO_Prog_Remindersu'), {
|
|
216
218
|
canClose: false
|
|
217
219
|
});
|
|
218
220
|
} else {
|
|
@@ -221,7 +223,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
221
223
|
});
|
|
222
224
|
}
|
|
223
225
|
})["catch"](function (e) {
|
|
224
|
-
_toast["default"].Error(
|
|
226
|
+
_toast["default"].Error('网络异常', {
|
|
225
227
|
canClose: false
|
|
226
228
|
});
|
|
227
229
|
});
|
|
@@ -245,7 +247,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
245
247
|
}, [generalPrincipalUser]);
|
|
246
248
|
(0, _react.useEffect)(function () {
|
|
247
249
|
// @ts-ignore
|
|
248
|
-
var dom = document.querySelector(
|
|
250
|
+
var dom = document.querySelector('.o-progress__contnet-wrapper').querySelector('.okr-progress-item-wrapper'); // @ts-ignore
|
|
249
251
|
|
|
250
252
|
var height = dom ? dom.offsetHeight : 0; // 为了解决展开内容编辑过后收起时计算的高度是根据展开的算 16是第一个目标进展在展开和收起所以列表的时候的padding-bottom差
|
|
251
253
|
|
|
@@ -265,53 +267,53 @@ var OProgress = function OProgress(_ref) {
|
|
|
265
267
|
type: "warning"
|
|
266
268
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
267
269
|
type: "title"
|
|
268
|
-
}, (0, _getLocale.getLocale)(
|
|
270
|
+
}, (0, _getLocale.getLocale)('OKR_DR_Pop_Areyousure')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
269
271
|
type: "content"
|
|
270
|
-
}, (0, _getLocale.getLocale)(
|
|
272
|
+
}, (0, _getLocale.getLocale)('OKR_DR_Pop_ThesystemOKR')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.CancelButton, {
|
|
271
273
|
type: "button",
|
|
272
274
|
onClick: handleCancelRemind
|
|
273
|
-
}, (0, _getLocale.getLocale)(
|
|
275
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_dialogConfirm.SureButton, {
|
|
274
276
|
type: "button",
|
|
275
277
|
onClick: handleEnsureRemind
|
|
276
|
-
}, (0, _getLocale.getLocale)(
|
|
278
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Determine')));
|
|
277
279
|
}, [showRemindDialogConfirm, handleCancelRemind, handleEnsureRemind]);
|
|
278
280
|
var renderEmptyCmp = (0, _react.useMemo)(function () {
|
|
279
281
|
var renderUpdateBtn = function renderUpdateBtn(_ref3) {
|
|
280
282
|
var onOpenModal = _ref3.onOpenModal;
|
|
281
283
|
return /*#__PURE__*/_react["default"].createElement("button", {
|
|
282
|
-
className: "o-progress__empty-button ".concat(isPrincipalUser ?
|
|
284
|
+
className: "o-progress__empty-button ".concat(isPrincipalUser ? '' : 'o-progress__empty-button--not-principaluser'),
|
|
283
285
|
onClick: onOpenModal
|
|
284
|
-
}, (0, _getLocale.getLocale)(
|
|
286
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Prog_Butt_Update'));
|
|
285
287
|
};
|
|
286
288
|
|
|
287
289
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
288
290
|
className: (0, _classnames["default"])({
|
|
289
|
-
|
|
290
|
-
|
|
291
|
+
'o-progress__empty-wrapper': true,
|
|
292
|
+
'o-progress__empty-wrapper--not-principaluser': hasOtherProgress
|
|
291
293
|
})
|
|
292
294
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
293
295
|
width: 128,
|
|
294
296
|
src: _scheduleEmpty["default"]
|
|
295
297
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
296
298
|
className: "o-progress__empty-text"
|
|
297
|
-
}, isPrincipalUser ? (0, _getLocale.getLocale)(
|
|
299
|
+
}, isPrincipalUser ? (0, _getLocale.getLocale)('OKR_MyO_KRP_tochecko') : (0, _getLocale.getLocale)('OKR_MyO_Pr_Text_Nooprogress')), isPrincipalUser && /*#__PURE__*/_react["default"].createElement(_oProgressUpdate["default"], {
|
|
298
300
|
okrInfo: okrInfo,
|
|
299
301
|
renderContent: renderUpdateBtn,
|
|
300
302
|
setUpdateData: setUpdateProgress
|
|
301
303
|
}), !isCanEditProgress && /*#__PURE__*/_react["default"].createElement("button", {
|
|
302
304
|
className: "o-progress__empty-button",
|
|
303
305
|
onClick: handleRemindClick
|
|
304
|
-
}, (0, _getLocale.getLocale)(
|
|
306
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pr_Butt_Reminder')), isCanEditProgress && !isPrincipalUser && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("button", {
|
|
305
307
|
className: "o-progress__empty-button",
|
|
306
308
|
onClick: handleRemindClick
|
|
307
|
-
}, (0, _getLocale.getLocale)(
|
|
309
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Pr_Butt_Reminder')), /*#__PURE__*/_react["default"].createElement(_oProgressUpdate["default"], {
|
|
308
310
|
okrInfo: okrInfo,
|
|
309
311
|
renderContent: renderUpdateBtn,
|
|
310
312
|
setUpdateData: setUpdateProgress
|
|
311
313
|
})));
|
|
312
314
|
}, [hasOtherProgress]);
|
|
313
315
|
var renderDefaultRemindCmp = (0, _react.useMemo)(function () {
|
|
314
|
-
var text = isPrincipalUser ? (0, _auth.hasSuperior)() ? (0, _getLocale.getLocale)(
|
|
316
|
+
var text = isPrincipalUser ? (0, _auth.hasSuperior)() ? (0, _getLocale.getLocale)('OKR_MyO_Prog_Butt_Remind') : null : (0, _getLocale.getLocale)('OKR_MyO_Pr_Butt_Reminder');
|
|
315
317
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
316
318
|
className: "o-progress__func-btn",
|
|
317
319
|
onClick: handleRemindClick
|
|
@@ -324,7 +326,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
324
326
|
}, oProgressData.length === 0 ? renderEmptyCmp : /*#__PURE__*/_react["default"].createElement("div", {
|
|
325
327
|
className: "o-progress__header"
|
|
326
328
|
}, /*#__PURE__*/_react["default"].createElement(_title["default"], {
|
|
327
|
-
title: (0, _getLocale.getLocale)(
|
|
329
|
+
title: (0, _getLocale.getLocale)('OKR_MyO_Prog_Objectiveprogress')
|
|
328
330
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
329
331
|
className: "o-progress__func-btns"
|
|
330
332
|
}, okrInfo.status === 2 ? null : renderDefaultRemindCmp, isCanEditProgress ? /*#__PURE__*/_react["default"].createElement(_oProgressUpdate["default"], {
|
|
@@ -332,12 +334,12 @@ var OProgress = function OProgress(_ref) {
|
|
|
332
334
|
renderContent: renderContent,
|
|
333
335
|
setUpdateData: setUpdateProgress
|
|
334
336
|
}) : null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
335
|
-
className: "o-progress__contnet-wrapper ".concat(isMoreThanOneProgress && isShowAll ?
|
|
337
|
+
className: "o-progress__contnet-wrapper ".concat(isMoreThanOneProgress && isShowAll ? '' : 'o-progress__content-wrapper--fold'),
|
|
336
338
|
style: {
|
|
337
|
-
height: isShowAll ?
|
|
339
|
+
height: isShowAll ? 'auto' : "".concat(initHeight, "px")
|
|
338
340
|
}
|
|
339
341
|
}, oProgressData && oProgressData.map(function (item, index) {
|
|
340
|
-
var rightTip =
|
|
342
|
+
var rightTip = '';
|
|
341
343
|
|
|
342
344
|
if (okrInfo.status !== 2 && okrInfo.progress !== 100 && index === 0 && isCanEditProgress) {
|
|
343
345
|
rightTip = (0, _util.getToNowTime)(item.time);
|
|
@@ -346,7 +348,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
346
348
|
return /*#__PURE__*/_react["default"].createElement(_okrProgressDetail["default"], {
|
|
347
349
|
key: item.id,
|
|
348
350
|
riskLevel: item.riskLevel,
|
|
349
|
-
title: item.title,
|
|
351
|
+
title: (0, _openData.parseString)(item.title || ''),
|
|
350
352
|
percent: item.percent,
|
|
351
353
|
oldPercent: item.oldPercent,
|
|
352
354
|
content: item.content,
|
|
@@ -361,8 +363,8 @@ var OProgress = function OProgress(_ref) {
|
|
|
361
363
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
362
364
|
className: "o-progress__shrink-text",
|
|
363
365
|
onClick: handleChangeShowAll
|
|
364
|
-
}, isShowAll ? (0, _getLocale.getLocale)(
|
|
365
|
-
className: isShowAll ?
|
|
366
|
+
}, isShowAll ? (0, _getLocale.getLocale)('OKR_MyO_Prog_Butt_Fold') : (0, _getLocale.getLocale)('OKR_MyO_Pr_Butt_Viewall'), /*#__PURE__*/_react["default"].createElement("i", {
|
|
367
|
+
className: isShowAll ? 'tu-icon-arrow-up' : 'tu-icon-arrow-down'
|
|
366
368
|
}))) : null, /*#__PURE__*/_react["default"].createElement(_titaUi.Modal, {
|
|
367
369
|
className: "common-modal o-progress__modal",
|
|
368
370
|
maskClosable: false,
|
|
@@ -373,9 +375,9 @@ var OProgress = function OProgress(_ref) {
|
|
|
373
375
|
visible: editOProgressVisiable,
|
|
374
376
|
width: 600
|
|
375
377
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
376
|
-
className: "o-progress__textarea-wrapper ".concat(hasError ?
|
|
378
|
+
className: "o-progress__textarea-wrapper ".concat(hasError ? 'o-progress__textarea-wrapper--error' : '')
|
|
377
379
|
}, /*#__PURE__*/_react["default"].createElement("textarea", {
|
|
378
|
-
placeholder: (0, _getLocale.getLocale)(
|
|
380
|
+
placeholder: (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Pleprogress'),
|
|
379
381
|
className: "o-progress__textarea",
|
|
380
382
|
value: editOProgressContent,
|
|
381
383
|
onChange: handleTextareaChange
|
|
@@ -15,6 +15,8 @@ var _scheduleO = _interopRequireDefault(require("../../img/schedule-o.svg"));
|
|
|
15
15
|
|
|
16
16
|
var _drawerManager = _interopRequireDefault(require("../../../../drawer-manager"));
|
|
17
17
|
|
|
18
|
+
var _openData = require("../../../../../utils/open-data");
|
|
19
|
+
|
|
18
20
|
require("./index.css");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -30,7 +32,7 @@ var renderTitle = function renderTitle(title, workId) {
|
|
|
30
32
|
okrId: workId
|
|
31
33
|
});
|
|
32
34
|
}
|
|
33
|
-
}, title));
|
|
35
|
+
}, (0, _openData.parseString)(title)));
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
var SubOProgress = function SubOProgress(_ref) {
|
|
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
var _CircleProgress = _interopRequireDefault(require("../../../components-v1/progress/CircleProgress"));
|
|
13
13
|
|
|
14
|
+
var _openData = require("../../../utils/open-data");
|
|
15
|
+
|
|
14
16
|
var _creator = _interopRequireDefault(require("./fields/creator"));
|
|
15
17
|
|
|
16
18
|
var _precls = _interopRequireDefault(require("../precls"));
|
|
@@ -50,7 +52,7 @@ function KrNode(_ref) {
|
|
|
50
52
|
color: "#5AD8A6",
|
|
51
53
|
marginRight: 8
|
|
52
54
|
}
|
|
53
|
-
}, "KR", SortNum + 1), mileStoneName), /*#__PURE__*/_react["default"].createElement("div", {
|
|
55
|
+
}, "KR", SortNum + 1), (0, _openData.parseString)(mileStoneName)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
54
56
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-desp"))
|
|
55
57
|
}, /*#__PURE__*/_react["default"].createElement(_creator["default"], {
|
|
56
58
|
creator: user || {}
|
|
@@ -33,6 +33,8 @@ var _getLocale = require("../../../utils/getLocale");
|
|
|
33
33
|
|
|
34
34
|
var _tools = require("../../../utils/tools");
|
|
35
35
|
|
|
36
|
+
var _openData2 = require("../../../utils/open-data");
|
|
37
|
+
|
|
36
38
|
var _drawerManager = _interopRequireDefault(require("../../../components/drawer-manager"));
|
|
37
39
|
|
|
38
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -241,7 +243,7 @@ function WorkNode(_ref) {
|
|
|
241
243
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
242
244
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-title")),
|
|
243
245
|
onClick: openODetail
|
|
244
|
-
}, (0, _tools.htmlDecodeByRegExp)(workName), /*#__PURE__*/_react["default"].createElement(_okrClassify["default"], {
|
|
246
|
+
}, (0, _openData2.parseString)((0, _tools.htmlDecodeByRegExp)(workName)), /*#__PURE__*/_react["default"].createElement(_okrClassify["default"], {
|
|
245
247
|
classify: okrClassify
|
|
246
248
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
247
249
|
className: (0, _classnames["default"])("".concat(_precls["default"], "--node-desp")),
|
|
@@ -206,9 +206,9 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
206
206
|
// });
|
|
207
207
|
|
|
208
208
|
Sentry.withScope(function (scope) {
|
|
209
|
-
scope.setTag(
|
|
210
|
-
scope.setTag(
|
|
211
|
-
scope.setExtra(
|
|
209
|
+
scope.setTag('error-level', "P0");
|
|
210
|
+
scope.setTag('error-type', '地图导出-图片生成');
|
|
211
|
+
scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
|
|
212
212
|
});
|
|
213
213
|
(0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
|
|
214
214
|
var image = new Image(); // @ts-ignore
|
|
@@ -219,9 +219,9 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
219
219
|
// });
|
|
220
220
|
|
|
221
221
|
Sentry.withScope(function (scope) {
|
|
222
|
-
scope.setTag(
|
|
223
|
-
scope.setTag(
|
|
224
|
-
scope.setExtra(
|
|
222
|
+
scope.setTag('error-level', "P0");
|
|
223
|
+
scope.setTag('error-type', '地图导出-图片地址');
|
|
224
|
+
scope.setExtra('userMessage', userId + '租户:' + telentId + '我得到了图片大小为:' + size + ',路径为' + imgUrl);
|
|
225
225
|
});
|
|
226
226
|
|
|
227
227
|
_toast["default"].Warning('图片上传成功,准备本地下载', {
|
|
@@ -15,10 +15,12 @@ var _tooltipText = _interopRequireDefault(require("../../../tooltip/tooltip-text
|
|
|
15
15
|
|
|
16
16
|
var _drawerManager = _interopRequireDefault(require("../../../drawer-manager"));
|
|
17
17
|
|
|
18
|
-
require("./index.css");
|
|
19
|
-
|
|
20
18
|
var _getLocale = require("../../../../utils/getLocale");
|
|
21
19
|
|
|
20
|
+
var _openData = require("../../../../utils/open-data");
|
|
21
|
+
|
|
22
|
+
require("./index.css");
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
25
|
|
|
24
26
|
var renderTitle = function renderTitle(index, title, id) {
|
|
@@ -33,7 +35,7 @@ var renderTitle = function renderTitle(index, title, id) {
|
|
|
33
35
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
34
36
|
className: "kr-progress__order"
|
|
35
37
|
}, "KR", index + 1), /*#__PURE__*/_react["default"].createElement(_tooltipText["default"], {
|
|
36
|
-
text: title,
|
|
38
|
+
text: (0, _openData.parseString)(title),
|
|
37
39
|
maxWidth: 600,
|
|
38
40
|
exClass: "kr-progress__title-text"
|
|
39
41
|
}));
|
|
@@ -35,6 +35,8 @@ var _getLocale = require("../../../../utils/getLocale");
|
|
|
35
35
|
|
|
36
36
|
var _i18nFrontTranslate = require("../../../../utils/i18n-front-translate");
|
|
37
37
|
|
|
38
|
+
var _openData = require("../../../../utils/open-data");
|
|
39
|
+
|
|
38
40
|
require("./index.css");
|
|
39
41
|
|
|
40
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -329,7 +331,7 @@ var OProgress = function OProgress(_ref) {
|
|
|
329
331
|
return /*#__PURE__*/_react["default"].createElement(_okrProgressDetail["default"], {
|
|
330
332
|
key: item.id,
|
|
331
333
|
riskLevel: item.riskLevel,
|
|
332
|
-
title: item.title,
|
|
334
|
+
title: (0, _openData.parseString)(item.title),
|
|
333
335
|
percent: item.percent,
|
|
334
336
|
oldPercent: item.oldPercent,
|
|
335
337
|
content: item.content,
|
|
@@ -52,7 +52,7 @@ function OProgressUpdate(props) {
|
|
|
52
52
|
renderContent = props.renderContent,
|
|
53
53
|
setUpdateData = props.setUpdateData,
|
|
54
54
|
_props$title = props.title,
|
|
55
|
-
title = _props$title === void 0 ? (0, _getLocale.getLocale)(
|
|
55
|
+
title = _props$title === void 0 ? (0, _getLocale.getLocale)('OKR_MyO_Pop_Upd_Upd') : _props$title;
|
|
56
56
|
|
|
57
57
|
var _useState = (0, _react.useState)(false),
|
|
58
58
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -81,7 +81,7 @@ function OProgressUpdate(props) {
|
|
|
81
81
|
data = _context.sent;
|
|
82
82
|
|
|
83
83
|
if (data.Code === 1) {
|
|
84
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
84
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Per_Ma_form_Updatesuc'));
|
|
85
85
|
|
|
86
86
|
setVisible(false);
|
|
87
87
|
} else {
|
|
@@ -15,6 +15,8 @@ var _scheduleO = _interopRequireDefault(require("../../img/schedule-o.svg"));
|
|
|
15
15
|
|
|
16
16
|
var _drawerManager = _interopRequireDefault(require("../../../drawer-manager"));
|
|
17
17
|
|
|
18
|
+
var _openData = require("../../../../utils/open-data");
|
|
19
|
+
|
|
18
20
|
require("./index.css");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -31,7 +33,7 @@ var renderTitle = function renderTitle(title, workId) {
|
|
|
31
33
|
okrId: workId
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
|
-
}, title));
|
|
36
|
+
}, (0, _openData.parseString)(title)));
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
var SubOProgress = function SubOProgress(_ref) {
|
|
@@ -13,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
|
|
14
14
|
var _common = require("../../../common");
|
|
15
15
|
|
|
16
|
+
var _openData = require("../../../../../utils/open-data");
|
|
17
|
+
|
|
16
18
|
var _style = require("./style");
|
|
17
19
|
|
|
18
20
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
@@ -21,8 +23,6 @@ var _UserSelectorPop = _interopRequireDefault(require("../../../../../components
|
|
|
21
23
|
|
|
22
24
|
var _requestV = require("../../../../../utils/request-v1");
|
|
23
25
|
|
|
24
|
-
var _openData = require("../../../../../utils/open-data");
|
|
25
|
-
|
|
26
26
|
var _mblog = require("../../../../../utils/mblog");
|
|
27
27
|
|
|
28
28
|
var _ConfirmPop = _interopRequireDefault(require("../../../../delete-confirm-pop/ConfirmPop"));
|
|
@@ -614,7 +614,7 @@ var ReviewBody = /*#__PURE__*/function (_PureComponent) {
|
|
|
614
614
|
className: ObjData.ObjType == 65 ? "review-kr" : "tu-icon-OKR"
|
|
615
615
|
}, ObjData.ObjType == 65 ? "KR".concat(ObjData.ObjIndex == 0 ? "" : ObjData.ObjIndex) : ""), /*#__PURE__*/_react["default"].createElement("p", {
|
|
616
616
|
className: "okr-name"
|
|
617
|
-
}, (0, _mblog.htmlDecodeByRegExp)(ObjData.ObjName)))), /*#__PURE__*/_react["default"].createElement(_style.ReviewWorth, null, /*#__PURE__*/_react["default"].createElement(_style.ReviewCatalog, null, (0, _getLocale.getLocale)("OKR_MyO_KRP_Pop_Value")), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
|
|
617
|
+
}, (0, _openData.parseString)((0, _mblog.htmlDecodeByRegExp)(ObjData.ObjName))))), /*#__PURE__*/_react["default"].createElement(_style.ReviewWorth, null, /*#__PURE__*/_react["default"].createElement(_style.ReviewCatalog, null, (0, _getLocale.getLocale)("OKR_MyO_KRP_Pop_Value")), /*#__PURE__*/_react["default"].createElement(_textarea["default"], {
|
|
618
618
|
maxLength: 5000,
|
|
619
619
|
value: (0, _mblog.htmlDecodeByRegExp)(data.gains),
|
|
620
620
|
initialHeight: 56,
|
|
@@ -20,10 +20,13 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
20
20
|
var getOpenData = function getOpenData(_ref) {
|
|
21
21
|
var id = _ref.id,
|
|
22
22
|
name = _ref.name,
|
|
23
|
-
type = _ref.type
|
|
24
|
-
|
|
23
|
+
type = _ref.type,
|
|
24
|
+
openId = _ref.openId;
|
|
25
|
+
openId = openId || (0, _openData.getOpenId)(id, type); //@ts-ignore
|
|
26
|
+
|
|
25
27
|
if (!window.WWOpenData || !openId) return Promise.resolve(name);
|
|
26
28
|
return new Promise(function (resolve, reject) {
|
|
29
|
+
//@ts-ignore
|
|
27
30
|
window.WWOpenData.prefetch({
|
|
28
31
|
items: [{
|
|
29
32
|
id: openId,
|
|
@@ -37,7 +40,7 @@ var getOpenData = function getOpenData(_ref) {
|
|
|
37
40
|
if (data && data.items[0]) {
|
|
38
41
|
resolve(data.items[0].data);
|
|
39
42
|
} else {
|
|
40
|
-
resolve(name);
|
|
43
|
+
resolve(name || '');
|
|
41
44
|
}
|
|
42
45
|
});
|
|
43
46
|
});
|
|
@@ -75,18 +78,18 @@ function _openDataPainter() {
|
|
|
75
78
|
name = _context.sent;
|
|
76
79
|
|
|
77
80
|
case 6:
|
|
78
|
-
_ctx$measureText = ctx.measureText(name), width = _ctx$measureText.width;
|
|
81
|
+
_ctx$measureText = ctx.measureText(name || ''), width = _ctx$measureText.width;
|
|
79
82
|
actualWidth = Math.min(width, maxWidth);
|
|
80
83
|
return _context.abrupt("return", {
|
|
81
84
|
width: actualWidth,
|
|
82
85
|
height: lineHeight,
|
|
83
86
|
draw: function draw(ctx, x, y) {
|
|
84
87
|
ctx.save();
|
|
85
|
-
ctx.textBaseline =
|
|
88
|
+
ctx.textBaseline = 'middle';
|
|
86
89
|
ctx.beginPath();
|
|
87
90
|
ctx.rect(x, y, actualWidth, lineHeight);
|
|
88
91
|
ctx.clip();
|
|
89
|
-
ctx.fillText(name, x, y + lineHeight / 2);
|
|
92
|
+
ctx.fillText(name || '', x, y + lineHeight / 2);
|
|
90
93
|
ctx.closePath();
|
|
91
94
|
ctx.restore();
|
|
92
95
|
}
|