@titaui/pc 1.11.28 → 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.
- package/lib/components/avatar/name-avatar/index.css +1 -0
- package/lib/components/avatar/name-avatar/index.js +22 -13
- package/lib/components/button/rect-btn/index.css +45 -11
- package/lib/components/button/rect-btn/index.js +12 -6
- package/lib/components/change-okr-modal/index.js +2 -1
- package/lib/components/checkbox/index.css +3 -3
- package/lib/components/create-okr-modal/index.js +3 -1
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/dialog-confirm/index.css +2 -2
- package/lib/components/drawer/headerAction.js +5 -1
- package/lib/components/drawer/headerDrop.js +42 -4
- package/lib/components/drawer/index.css +33 -0
- package/lib/components/drawer/index.js +26 -3
- package/lib/components/dynamic/dynamic-list/index.js +14 -6
- package/lib/components/dynamic/index.js +9 -12
- package/lib/components/dynamic/request-api.js +7 -68
- package/lib/components/nav-top/index.js +8 -4
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +20 -4
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
- package/lib/components/okr-detail/components/header/index.js +10 -3
- package/lib/components/okr-detail/components/header/o-name.js +10 -3
- package/lib/components/okr-detail/components/o-classify.js +5 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +15 -9
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +98 -43
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +55 -0
- package/lib/components/okr-detail/detail-header/index.css +11 -0
- package/lib/components/okr-detail/detail-header/index.js +228 -234
- package/lib/components/okr-detail/helper.js +108 -0
- package/lib/components/okr-detail/index.js +21 -2
- package/lib/components/okr-detail/okr-list/index.js +13 -6
- package/lib/components/okr-detail/request-apis.js +10 -4
- package/lib/components/okr-flow/export-modal/index.js +21 -3
- package/lib/components/okr-period-selector/index.js +9 -5
- package/lib/components/okr-period-selector/select-cycle.js +23 -19
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +16 -10
- package/lib/components/task-relation-modal/request-api.js +2 -1
- package/lib/components/textarea/index.css +142 -0
- package/lib/components/textarea/index.js +259 -0
- package/lib/components/toast/index.js +5 -3
- package/lib/index.js +40 -0
- package/lib/pages/new-okr-list/header/common.js +52 -0
- package/lib/pages/new-okr-list/header/index.css +45 -0
- package/lib/pages/new-okr-list/header/index.js +38 -16
- package/lib/{components/dynamic/dynamic-liking/index.js → pages/new-okr-list/header/operate-record.js} +91 -39
- package/lib/pages/new-okr-list/index.js +3 -1
- package/lib/pages/new-okr-list/list/index.js +19 -2
- package/lib/pages/new-okr-list/request-api.js +8 -2
- package/lib/pages/okr-map/unsupport-ie/index.js +3 -5
- package/lib/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- 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/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/delete-confirm/style.js +0 -38
|
@@ -27,6 +27,8 @@ var _schedule = _interopRequireDefault(require("./schedule"));
|
|
|
27
27
|
|
|
28
28
|
var _requestApis = require("./request-apis");
|
|
29
29
|
|
|
30
|
+
var _helper = require("./helper");
|
|
31
|
+
|
|
30
32
|
var _okrReview = _interopRequireDefault(require("../okr-review"));
|
|
31
33
|
|
|
32
34
|
var _reportList = _interopRequireDefault(require("../eReport/eReportLists/reportList"));
|
|
@@ -173,7 +175,14 @@ function OkrDetail(props) {
|
|
|
173
175
|
var _useState23 = (0, _react.useState)(),
|
|
174
176
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
175
177
|
generalRoleType = _useState24[0],
|
|
176
|
-
setGeneralRoleType = _useState24[1];
|
|
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 吸顶,点赞吸底
|
|
177
186
|
|
|
178
187
|
|
|
179
188
|
var tabRef = (0, _react.useRef)();
|
|
@@ -203,9 +212,18 @@ function OkrDetail(props) {
|
|
|
203
212
|
getData();
|
|
204
213
|
};
|
|
205
214
|
|
|
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
|
+
|
|
206
223
|
(0, _react.useEffect)(function () {
|
|
207
224
|
setLoading(true);
|
|
208
225
|
getData();
|
|
226
|
+
getApprovalShow();
|
|
209
227
|
}, []);
|
|
210
228
|
(0, _react.useEffect)(function () {
|
|
211
229
|
if (!okrInfo || !okrInfo.workId) return;
|
|
@@ -276,7 +294,8 @@ function OkrDetail(props) {
|
|
|
276
294
|
changeTabActive: changeTabActive,
|
|
277
295
|
refreshAll: refreshAll,
|
|
278
296
|
setOkrInfo: setOkrInfo,
|
|
279
|
-
refreshKrs: refreshKrs
|
|
297
|
+
refreshKrs: refreshKrs,
|
|
298
|
+
approvalSetting: approvalSetting
|
|
280
299
|
})
|
|
281
300
|
}, /*#__PURE__*/_react["default"].createElement(_context.GeneralDataContext.Provider, {
|
|
282
301
|
value: {
|
|
@@ -43,6 +43,8 @@ var _auth = require("../../../utils/auth");
|
|
|
43
43
|
|
|
44
44
|
var _getLocale = require("../../../utils/getLocale");
|
|
45
45
|
|
|
46
|
+
var _helper = require("../helper");
|
|
47
|
+
|
|
46
48
|
require("./index.css");
|
|
47
49
|
|
|
48
50
|
var _excluded = ["mileStoneId"];
|
|
@@ -96,6 +98,7 @@ var preCls = "okr-detail-okrs-list";
|
|
|
96
98
|
|
|
97
99
|
var treeDataFormate = function treeDataFormate(nodes) {
|
|
98
100
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "kr";
|
|
101
|
+
var canEditOkr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
99
102
|
var formateNodes = [];
|
|
100
103
|
nodes.forEach(function (it, index) {
|
|
101
104
|
var title = "";
|
|
@@ -107,7 +110,8 @@ var treeDataFormate = function treeDataFormate(nodes) {
|
|
|
107
110
|
title: title,
|
|
108
111
|
isLeaf: true,
|
|
109
112
|
nodeType: type,
|
|
110
|
-
data: it
|
|
113
|
+
data: it,
|
|
114
|
+
canEditOkr: canEditOkr
|
|
111
115
|
});
|
|
112
116
|
});
|
|
113
117
|
return formateNodes;
|
|
@@ -151,7 +155,8 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
151
155
|
setShowOkrEvalute = _useContext.setShowOkrEvalute;
|
|
152
156
|
|
|
153
157
|
var _useContext2 = (0, _react.useContext)(_context2.CommonContext),
|
|
154
|
-
refreshAll = _useContext2.refreshAll
|
|
158
|
+
refreshAll = _useContext2.refreshAll,
|
|
159
|
+
approvalSetting = _useContext2.approvalSetting;
|
|
155
160
|
|
|
156
161
|
var parentId = generalParent.parentId,
|
|
157
162
|
parentOkr = generalParent.parentOkr,
|
|
@@ -272,9 +277,9 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
272
277
|
updateKrs();
|
|
273
278
|
}, []);
|
|
274
279
|
(0, _react.useEffect)(function () {
|
|
275
|
-
var strucKrs = treeDataFormate(pureKrs, "kr");
|
|
280
|
+
var strucKrs = treeDataFormate(pureKrs, "kr", canEditOkr);
|
|
276
281
|
setKrs(strucKrs);
|
|
277
|
-
}, [pureKrs]);
|
|
282
|
+
}, [pureKrs, canEditOkr]);
|
|
278
283
|
|
|
279
284
|
var onAddKrHandler = function onAddKrHandler(kr) {
|
|
280
285
|
refreshAll();
|
|
@@ -440,9 +445,11 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
440
445
|
padding: "0 32px 0 18px"
|
|
441
446
|
}, /*#__PURE__*/_react["default"].createElement(_okrTree["default"], {
|
|
442
447
|
data: krs,
|
|
443
|
-
|
|
448
|
+
approvalSetting: approvalSetting,
|
|
449
|
+
okrInfo: okrInfo,
|
|
450
|
+
draggable: canEditOkr && (okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState) === _helper.EApproveStatus.UnderApproval,
|
|
444
451
|
onDrop: onOkrItemDropHandler
|
|
445
|
-
}))), (canEditOkr || isInnerUser) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
452
|
+
}))), (canEditOkr || isInnerUser) && (0, _helper.getApprovalOkr)(approvalSetting, "createOkr", okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
446
453
|
ref: wrapperRef,
|
|
447
454
|
className: (0, _classnames["default"])("".concat(preCls, "__addkr"))
|
|
448
455
|
}, /*#__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.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;
|
|
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.getOkrApprovalSettingInfo = 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,6 +110,12 @@ 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
|
+
|
|
113
119
|
var updateClassify = function updateClassify(_ref6) {
|
|
114
120
|
var okrId = _ref6.okrId,
|
|
115
121
|
okrClassify = _ref6.okrClassify;
|
|
@@ -407,7 +413,7 @@ var deleteUser = function deleteUser(delUserId, okrId, relation) {
|
|
|
407
413
|
exports.deleteUser = deleteUser;
|
|
408
414
|
|
|
409
415
|
var workDelete = function workDelete(data) {
|
|
410
|
-
return (0, _request.rdelete)("
|
|
416
|
+
return (0, _request.rdelete)("v1")("okr/deleteV2?workId=".concat(data.workId), {
|
|
411
417
|
data: data
|
|
412
418
|
});
|
|
413
419
|
};
|
|
@@ -415,7 +421,7 @@ var workDelete = function workDelete(data) {
|
|
|
415
421
|
exports.workDelete = workDelete;
|
|
416
422
|
|
|
417
423
|
var start = function start(okrId) {
|
|
418
|
-
return (0, _request.rpost)("v1")("
|
|
424
|
+
return (0, _request.rpost)("v1")("okr/Start", {
|
|
419
425
|
work_id: okrId
|
|
420
426
|
}, {
|
|
421
427
|
headers: {
|
|
@@ -428,7 +434,7 @@ var start = function start(okrId) {
|
|
|
428
434
|
exports.start = start;
|
|
429
435
|
|
|
430
436
|
var close = function close(okrId) {
|
|
431
|
-
return (0, _request.rpost)("v1")("
|
|
437
|
+
return (0, _request.rpost)("v1")("okr/Close", {
|
|
432
438
|
work_id: okrId
|
|
433
439
|
}, {
|
|
434
440
|
headers: {
|
|
@@ -155,6 +155,8 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
155
155
|
};
|
|
156
156
|
_context.next = 12;
|
|
157
157
|
return (0, _html2canvas["default"])(okrMapRef, opts).then(function (result) {
|
|
158
|
+
var _window, _window$BSGlobal, _window$BSGlobal$logi, _window2, _window2$BSGlobal, _window2$BSGlobal$ten;
|
|
159
|
+
|
|
158
160
|
if ((0, _bsGlobal.isWx)() && window.WWOpenData) {
|
|
159
161
|
if (window.WWOpenData.enableCanvasSharing) {
|
|
160
162
|
window.WWOpenData.enableCanvasSharing();
|
|
@@ -165,11 +167,27 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
165
167
|
}
|
|
166
168
|
}
|
|
167
169
|
|
|
170
|
+
var userId = (_window = window) === null || _window === void 0 ? void 0 : (_window$BSGlobal = _window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$logi = _window$BSGlobal.loginUserInfo) === null || _window$BSGlobal$logi === void 0 ? void 0 : _window$BSGlobal$logi.Id;
|
|
171
|
+
var telentId = (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$BSGlobal = _window2.BSGlobal) === null || _window2$BSGlobal === void 0 ? void 0 : (_window2$BSGlobal$ten = _window2$BSGlobal.tenantInfo) === null || _window2$BSGlobal$ten === void 0 ? void 0 : _window2$BSGlobal$ten.Id;
|
|
168
172
|
var imgUrl = result.toDataURL('image/png'); // 得到图片的base64编码数据
|
|
173
|
+
// @ts-ignore
|
|
169
174
|
|
|
170
175
|
// 得到图片的base64编码数据
|
|
176
|
+
// @ts-ignore
|
|
177
|
+
window.titaTracker && window.titaTracker("action").record({
|
|
178
|
+
actionName: userId + '租户:' + telentId + '我得到了图片' + imgUrl.slice(1, 200),
|
|
179
|
+
actionGroup: 'okr地图图片',
|
|
180
|
+
productName: 'okr地图导出'
|
|
181
|
+
});
|
|
171
182
|
(0, _requestApis.getBase64DownloadUrl)(imgUrl.split(',')[1]).then(function (url) {
|
|
172
|
-
var image = new Image();
|
|
183
|
+
var image = new Image(); // @ts-ignore
|
|
184
|
+
|
|
185
|
+
// @ts-ignore
|
|
186
|
+
window.titaTracker && window.titaTracker("action").record({
|
|
187
|
+
actionName: userId + '租户:' + telentId + '我获得了地址' + url.Data.obj,
|
|
188
|
+
actionGroup: 'okr地图接口',
|
|
189
|
+
productName: 'okr地图导出'
|
|
190
|
+
});
|
|
173
191
|
image.setAttribute('crossOrigin', 'anonymous');
|
|
174
192
|
|
|
175
193
|
image.onload = function () {
|
|
@@ -188,9 +206,9 @@ var ExportMapModal = function ExportMapModal(props) {
|
|
|
188
206
|
a.download = 'okr地图'; // 设置图片名称
|
|
189
207
|
|
|
190
208
|
// 设置图片名称
|
|
191
|
-
a.href = url.Data.obj; // 将生成的URL设置为a
|
|
209
|
+
a.href = url.Data.obj; // 将生成的URL设置为a
|
|
192
210
|
|
|
193
|
-
// 将生成的URL设置为a
|
|
211
|
+
// 将生成的URL设置为a
|
|
194
212
|
a.dispatchEvent(event); // 触发a的单击事件
|
|
195
213
|
|
|
196
214
|
// 触发a的单击事件
|
|
@@ -17,6 +17,8 @@ var _selectCycle = _interopRequireDefault(require("./select-cycle"));
|
|
|
17
17
|
|
|
18
18
|
var _requestApis = require("./request-apis");
|
|
19
19
|
|
|
20
|
+
var _getLocale = require("../../utils/getLocale");
|
|
21
|
+
|
|
20
22
|
require("./index.css");
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -68,12 +70,14 @@ function _default(props) {
|
|
|
68
70
|
}, []);
|
|
69
71
|
|
|
70
72
|
var handleChangeCyecle = function handleChangeCyecle(data) {
|
|
71
|
-
(0, _requestApis.updateOCyecle)(okrId, data).then(function () {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
});
|
|
73
|
+
(0, _requestApis.updateOCyecle)(okrId, data).then(function (resp) {
|
|
74
|
+
if (resp.Code === 1) {
|
|
75
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
setCycle(data);
|
|
78
|
+
} else {
|
|
79
|
+
_toast["default"].Error(resp.Message);
|
|
80
|
+
}
|
|
77
81
|
});
|
|
78
82
|
};
|
|
79
83
|
|
|
@@ -49,7 +49,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
49
49
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
50
50
|
|
|
51
51
|
function _formatCycleData(periodParams, getCycleRange) {
|
|
52
|
-
if (!periodParams) return
|
|
52
|
+
if (!periodParams) return '';
|
|
53
53
|
var startDate = periodParams.startDate;
|
|
54
54
|
var endDate = periodParams.endDate;
|
|
55
55
|
|
|
@@ -58,7 +58,7 @@ function _formatCycleData(periodParams, getCycleRange) {
|
|
|
58
58
|
endDate = periodParams.endDate.slice(5);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
return "".concat(_periodSelector["default"].formatPeriod(periodParams)).concat(getCycleRange ? ",".concat(startDate, "~").concat(endDate) :
|
|
61
|
+
return "".concat(_periodSelector["default"].formatPeriod(periodParams)).concat(getCycleRange ? ",".concat(startDate, "~").concat(endDate) : '');
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
function CreateCycle(_ref) {
|
|
@@ -94,21 +94,21 @@ function CreateCycle(_ref) {
|
|
|
94
94
|
setCycleSetting = _useState4[1];
|
|
95
95
|
|
|
96
96
|
(0, _react.useEffect)(function () {
|
|
97
|
-
var settings = localStorage.getItem(
|
|
97
|
+
var settings = localStorage.getItem('OKR_CYCLE_SETTING');
|
|
98
98
|
|
|
99
99
|
if (settings) {
|
|
100
100
|
setCycleSetting(JSON.parse(settings));
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
var url = (0, _helper.getApiUrl)(
|
|
105
|
-
(0, _helper.taker)(url,
|
|
104
|
+
var url = (0, _helper.getApiUrl)('okr/cycleSetting');
|
|
105
|
+
(0, _helper.taker)(url, 'GET').then(function (res) {
|
|
106
106
|
if (res.Code == 1) {
|
|
107
107
|
setCycleSetting(res.Data);
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
}, []);
|
|
111
|
-
var cycleWrapperRef = (0, _react.useRef)(document.createElement(
|
|
111
|
+
var cycleWrapperRef = (0, _react.useRef)(document.createElement('div'));
|
|
112
112
|
|
|
113
113
|
var onPeriodSelectorChangeHandler = function onPeriodSelectorChangeHandler(c) {
|
|
114
114
|
setSelfCycle(_objectSpread(_objectSpread({}, selfCycle), c));
|
|
@@ -148,13 +148,13 @@ function CreateCycle(_ref) {
|
|
|
148
148
|
},
|
|
149
149
|
ref: cycleWrapperRef,
|
|
150
150
|
style: {
|
|
151
|
-
backgroundColor:
|
|
152
|
-
boxShadow:
|
|
151
|
+
backgroundColor: 'white',
|
|
152
|
+
boxShadow: '0px 4px 12px 0px rgb(127 145 180 / 20%)',
|
|
153
153
|
borderRadius: 4
|
|
154
154
|
}
|
|
155
155
|
}, /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
156
156
|
style: {
|
|
157
|
-
width:
|
|
157
|
+
width: '100%'
|
|
158
158
|
},
|
|
159
159
|
selected: selfCycle,
|
|
160
160
|
showFullCycle: false,
|
|
@@ -176,9 +176,9 @@ function CreateCycle(_ref) {
|
|
|
176
176
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
177
|
className: "okr-detail-date-cycle__date-line",
|
|
178
178
|
style: {
|
|
179
|
-
borderBottom:
|
|
179
|
+
borderBottom: '1px solid #F0F2F5'
|
|
180
180
|
}
|
|
181
|
-
}, (0, _getLocale.getLocale)(
|
|
181
|
+
}, (0, _getLocale.getLocale)('Mod_StartDate'), "\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
182
182
|
format: "YYYY/MM/DD",
|
|
183
183
|
controlled: true,
|
|
184
184
|
onConfirm: onStartDateConfirmHandler,
|
|
@@ -193,7 +193,7 @@ function CreateCycle(_ref) {
|
|
|
193
193
|
className: "tu-icon-arrow-down okr-detail-date-cycle__select-time-down-icon"
|
|
194
194
|
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
195
195
|
className: "okr-detail-date-cycle__date-line"
|
|
196
|
-
}, (0, _getLocale.getLocale)(
|
|
196
|
+
}, (0, _getLocale.getLocale)('Mod_EndDate'), "\uFF1A", /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
197
197
|
format: "YYYY/MM/DD",
|
|
198
198
|
controlled: true,
|
|
199
199
|
onConfirm: onEndDateCOnfirmHandler,
|
|
@@ -208,8 +208,8 @@ function CreateCycle(_ref) {
|
|
|
208
208
|
className: "tu-icon-arrow-down okr-detail-date-cycle__select-time-down-icon"
|
|
209
209
|
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
210
210
|
style: {
|
|
211
|
-
display:
|
|
212
|
-
justifyContent:
|
|
211
|
+
display: 'flex',
|
|
212
|
+
justifyContent: 'flex-end'
|
|
213
213
|
}
|
|
214
214
|
}, /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
215
215
|
size: "s",
|
|
@@ -217,15 +217,15 @@ function CreateCycle(_ref) {
|
|
|
217
217
|
marginRight: 12
|
|
218
218
|
},
|
|
219
219
|
onClick: onCancelClickHandler
|
|
220
|
-
}, (0, _getLocale.getLocale)(
|
|
220
|
+
}, (0, _getLocale.getLocale)('Mod_Cancel')), /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
221
221
|
size: "s",
|
|
222
222
|
type: "primary",
|
|
223
223
|
onClick: onSureClickHandler
|
|
224
|
-
}, (0, _getLocale.getLocale)(
|
|
224
|
+
}, (0, _getLocale.getLocale)('OKR_MyO_Butt_Determine'))));
|
|
225
225
|
} else {
|
|
226
|
-
return /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
226
|
+
return canEdit ? /*#__PURE__*/_react["default"].createElement(_periodSelector["default"], {
|
|
227
227
|
style: {
|
|
228
|
-
width:
|
|
228
|
+
width: '100%'
|
|
229
229
|
},
|
|
230
230
|
selected: cycle,
|
|
231
231
|
showFullCycle: false,
|
|
@@ -245,7 +245,11 @@ function CreateCycle(_ref) {
|
|
|
245
245
|
btnRef: btnRef,
|
|
246
246
|
clickCallback: function clickCallback() {},
|
|
247
247
|
text: _formatCycleData(cycle, getCycleRange)
|
|
248
|
-
}))
|
|
248
|
+
})) : renderInnerContent({
|
|
249
|
+
btnRef: btnRef,
|
|
250
|
+
clickCallback: function clickCallback() {},
|
|
251
|
+
text: _formatCycleData(cycle, getCycleRange)
|
|
252
|
+
});
|
|
249
253
|
}
|
|
250
254
|
}
|
|
251
255
|
|
|
@@ -80,7 +80,7 @@ var OperationRecord = /*#__PURE__*/function (_PureComponent) {
|
|
|
80
80
|
|
|
81
81
|
_this.setState({
|
|
82
82
|
operationTrackList: newOperationTrackList,
|
|
83
|
-
operationTrackTotal: _mockData.OperationData.length
|
|
83
|
+
operationTrackTotal: (_mockData.OperationData === null || _mockData.OperationData === void 0 ? void 0 : _mockData.OperationData.length) || 0
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
});
|
|
@@ -17,7 +17,7 @@ var OperationRecordWrapper = _styledComponents["default"].div(_templateObject ||
|
|
|
17
17
|
|
|
18
18
|
exports.OperationRecordWrapper = OperationRecordWrapper;
|
|
19
19
|
|
|
20
|
-
var OperationRecordTotal = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom:
|
|
20
|
+
var OperationRecordTotal = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom: 16px;\n font-size: 12px;\n color: #8f9ca6;\n display: inline-block;\n cursor: pointer;\n\n &:hover {\n color: #2879ff;\n }\n\n p {\n line-height: 17px;\n\n &::before {\n float: right;\n margin-left: 4px;\n }\n }\n"])));
|
|
21
21
|
|
|
22
22
|
exports.OperationRecordTotal = OperationRecordTotal;
|
|
23
23
|
|
|
@@ -41,12 +41,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
41
41
|
|
|
42
42
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
43
|
|
|
44
|
-
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
45
|
-
|
|
46
44
|
var prefix = "publish-dynamic-modal";
|
|
47
|
-
|
|
48
|
-
var
|
|
49
|
-
_objectDestructuringEmpty(_ref);
|
|
45
|
+
var PublishDynamicModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
46
|
+
var onSubmitSuccess = _ref.onSubmitSuccess;
|
|
50
47
|
|
|
51
48
|
var _useState = (0, _react.useState)(false),
|
|
52
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -82,10 +79,10 @@ var PublishDynamicModal = function PublishDynamicModal(_ref) {
|
|
|
82
79
|
localStorage.removeItem("mblogLocalStroage_".concat((0, _bsGlobal.getUserInfo)().Id, "_commentsTypeKey_").concat(isShare ? "share" : "announcement"));
|
|
83
80
|
setVisible(false);
|
|
84
81
|
setSubmitStatus(1);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
82
|
+
|
|
83
|
+
if (onSubmitSuccess) {
|
|
84
|
+
onSubmitSuccess();
|
|
85
|
+
}
|
|
89
86
|
} else {
|
|
90
87
|
_toast["default"].Error(resp.Message, {
|
|
91
88
|
canClose: false
|
|
@@ -146,6 +143,13 @@ var PublishDynamicModal = function PublishDynamicModal(_ref) {
|
|
|
146
143
|
setVisible(true);
|
|
147
144
|
};
|
|
148
145
|
|
|
146
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
147
|
+
return {
|
|
148
|
+
hide: hidePublishDynamicModal,
|
|
149
|
+
showShareModal: showPublishShareDynamicModal,
|
|
150
|
+
showAnnouncementModal: showPublishAnnouncementDynamicModal
|
|
151
|
+
};
|
|
152
|
+
});
|
|
149
153
|
(0, _react.useEffect)(function () {
|
|
150
154
|
// @ts-ignore
|
|
151
155
|
window.hidePublishDynamicModal = hidePublishDynamicModal; // @ts-ignore
|
|
@@ -188,7 +192,9 @@ var PublishDynamicModal = function PublishDynamicModal(_ref) {
|
|
|
188
192
|
,
|
|
189
193
|
onMblogSubmit: onMblogSubmit
|
|
190
194
|
})));
|
|
195
|
+
});
|
|
196
|
+
PublishDynamicModal.defaultProps = {
|
|
197
|
+
onSubmitSuccess: function onSubmitSuccess() {}
|
|
191
198
|
};
|
|
192
|
-
|
|
193
199
|
var _default = PublishDynamicModal;
|
|
194
200
|
exports["default"] = _default;
|
|
@@ -15,7 +15,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
15
15
|
|
|
16
16
|
var okrSearch = function okrSearch(params) {
|
|
17
17
|
return (0, _request.rpost)("v1")("okr/search", _objectSpread(_objectSpread({}, params), {}, {
|
|
18
|
-
orderType: 1
|
|
18
|
+
orderType: 1,
|
|
19
|
+
includeCreateFailApprovalOkr: false
|
|
19
20
|
})).then(function (res) {
|
|
20
21
|
return res.Data;
|
|
21
22
|
});
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
.titaui-textArea {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
position: relative;
|
|
4
|
+
min-height: 36px;
|
|
5
|
+
background: #ffffff;
|
|
6
|
+
cursor: text;
|
|
7
|
+
border-radius: 8px;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
padding: 7px 0;
|
|
11
|
+
transition: border 0.2s ease 0.2s, box-shadow 0.2s ease 0.2s;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.titaui-textArea.has-error {
|
|
15
|
+
border: 1px solid #f05e5e !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.titaui-textArea:hover {
|
|
19
|
+
border: 1px solid #2879ff;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.titaui-textArea > input {
|
|
23
|
+
flex-grow: 1;
|
|
24
|
+
border: none;
|
|
25
|
+
padding: 0 12px;
|
|
26
|
+
margin: 0;
|
|
27
|
+
outline: none;
|
|
28
|
+
width: 0;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
color: #3f4755;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.titaui-textArea > input ::-webkit-input-placeholder {
|
|
35
|
+
color: #bfc7d5;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.titaui-textArea > input :-ms-input-placeholder {
|
|
39
|
+
color: #bfc7d5;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.titaui-textArea > input :-moz-input-placeholder {
|
|
43
|
+
color: #bfc7d5;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.titaui-textArea textarea {
|
|
47
|
+
flex: 1;
|
|
48
|
+
line-height: 20px;
|
|
49
|
+
min-height: 20px;
|
|
50
|
+
border: none;
|
|
51
|
+
padding: 0;
|
|
52
|
+
margin: 0;
|
|
53
|
+
outline: none;
|
|
54
|
+
resize: none;
|
|
55
|
+
padding: 0 12px;
|
|
56
|
+
width: 100%;
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
color: #3f4755;
|
|
60
|
+
word-break: break-all;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.titaui-textArea textarea ::-webkit-input-placeholder {
|
|
64
|
+
color: #bfc7d5;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.titaui-textArea textarea :-ms-input-placeholder {
|
|
68
|
+
color: #bfc7d5;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.titaui-textArea textarea :-moz-input-placeholder {
|
|
72
|
+
color: #bfc7d5;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.titaui-textArea.disabled {
|
|
76
|
+
background-color: rgba(240, 242, 245, 0.4);
|
|
77
|
+
border-color: #f0f2f5;
|
|
78
|
+
color: #bfc7d5;
|
|
79
|
+
cursor: default;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.titaui-textArea.disabled > input,
|
|
83
|
+
.titaui-textArea.disabled textarea,
|
|
84
|
+
.titaui-textArea.disabled .tail-wrapper {
|
|
85
|
+
color: #bfc7d5;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.titaui-textArea.disabled:hover {
|
|
89
|
+
border-color: #f0f2f5;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.area-error {
|
|
93
|
+
border: 1px solid #f05e5e !important;
|
|
94
|
+
box-shadow: 0px 0px 6px 0px rgba(240, 94, 94, 0.3);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.area-focus {
|
|
98
|
+
border: 1px solid #2879ff !important;
|
|
99
|
+
box-shadow: 0px 0px 6px 0px rgba(40, 121, 255, 0.3);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.area-normal {
|
|
103
|
+
border: 1px solid #e9ecf0 !important;
|
|
104
|
+
box-shadow: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.inner {
|
|
108
|
+
overflow: auto;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex: 1;
|
|
111
|
+
width: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.err-color {
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
font-weight: 400;
|
|
117
|
+
color: #f05e5e;
|
|
118
|
+
line-height: 18px;
|
|
119
|
+
padding-left: 12px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.commonTextAreaWrapperTopShadow::before {
|
|
123
|
+
content: '';
|
|
124
|
+
border-radius: 8px;
|
|
125
|
+
height: 30px;
|
|
126
|
+
background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 0;
|
|
129
|
+
width: 100%;
|
|
130
|
+
z-index: 2;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.commonTextAreaWrapperBottomShadow::after {
|
|
134
|
+
content: '';
|
|
135
|
+
border-radius: 8px;
|
|
136
|
+
height: 30px;
|
|
137
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
|
|
138
|
+
position: absolute;
|
|
139
|
+
bottom: 0;
|
|
140
|
+
width: 100%;
|
|
141
|
+
z-index: 2;
|
|
142
|
+
}
|