@titaui/pc 1.11.21-beta.10 → 1.11.21-beta.2
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/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/headerAction.js +5 -1
- package/lib/components/drawer/headerDrop.js +41 -4
- package/lib/components/drawer/index.css +44 -0
- package/lib/components/drawer/index.js +36 -7
- package/lib/components/nav-top/index.js +6 -2
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +16 -4
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
- package/lib/components/okr-detail/components/header/index.js +9 -3
- package/lib/components/okr-detail/components/header/o-name.js +9 -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 +9 -6
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/index.js +206 -195
- package/lib/components/okr-detail/helper.js +62 -0
- package/lib/components/okr-detail/index.js +21 -2
- package/lib/components/okr-detail/okr-list/index.js +8 -3
- package/lib/components/okr-detail/request-apis.js +7 -1
- package/lib/components/okr-period-selector/select-cycle.js +23 -19
- package/lib/components/task-relation-modal/request-api.js +2 -1
- package/lib/components/textarea/index.css +120 -0
- package/lib/components/textarea/index.js +257 -0
- package/lib/components/wechat-btn/index.js +27 -15
- 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/pages/new-okr-list/header/operate-record.js +124 -0
- 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/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- package/package.json +1 -1
|
@@ -13,6 +13,8 @@ var _getLocale = require("../../../../utils/getLocale");
|
|
|
13
13
|
|
|
14
14
|
var _tools = require("../../../../utils/tools");
|
|
15
15
|
|
|
16
|
+
var _helper = require("../../helper");
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
19
|
|
|
18
20
|
function OName(props) {
|
|
@@ -20,11 +22,15 @@ function OName(props) {
|
|
|
20
22
|
okrName = props.okrName,
|
|
21
23
|
setIsEdit = props.setIsEdit,
|
|
22
24
|
okrStatus = props.okrStatus,
|
|
23
|
-
children = props.children
|
|
25
|
+
children = props.children,
|
|
26
|
+
approvalSetting = props.approvalSetting,
|
|
27
|
+
applyState = props.applyState;
|
|
24
28
|
|
|
25
29
|
var handleEditClick = function handleEditClick() {
|
|
26
|
-
if (
|
|
27
|
-
|
|
30
|
+
if ((0, _helper.getApprovalIsShow)(approvalSetting, "changeOkrName", applyState)) {
|
|
31
|
+
if (editable) {
|
|
32
|
+
setIsEdit(true);
|
|
33
|
+
}
|
|
28
34
|
}
|
|
29
35
|
};
|
|
30
36
|
|
|
@@ -47,6 +47,8 @@ var _EditKrWightModal = _interopRequireDefault(require("../../../../../edit-kr-w
|
|
|
47
47
|
|
|
48
48
|
var _okrProgressModal = _interopRequireDefault(require("../../../../../okr-progress-modal"));
|
|
49
49
|
|
|
50
|
+
var _helper = require("../../../../helper");
|
|
51
|
+
|
|
50
52
|
var _getLocale = require("../../../../../../utils/getLocale");
|
|
51
53
|
|
|
52
54
|
require("./index.css");
|
|
@@ -98,7 +100,8 @@ function _default(props) {
|
|
|
98
100
|
|
|
99
101
|
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
100
102
|
refreshAll = _useContext.refreshAll,
|
|
101
|
-
okrInfo = _useContext.okrInfo
|
|
103
|
+
okrInfo = _useContext.okrInfo,
|
|
104
|
+
approvalSetting = _useContext.approvalSetting;
|
|
102
105
|
|
|
103
106
|
var _useState = (0, _react.useState)(data.confidenceIndex),
|
|
104
107
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -315,7 +318,7 @@ function _default(props) {
|
|
|
315
318
|
}, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("span", {
|
|
316
319
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-title"))
|
|
317
320
|
}, /*#__PURE__*/_react["default"].createElement(_editableInput["default"], {
|
|
318
|
-
editable: krCanEdit,
|
|
321
|
+
editable: krCanEdit && (0, _helper.getApprovalIsShow)(approvalSetting, "changeOkrName", okrInfo.applyState),
|
|
319
322
|
defaultValue: krName,
|
|
320
323
|
emptyMessage: "KR\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",
|
|
321
324
|
onKeyDown: onKrNameChangeHandler,
|
|
@@ -329,10 +332,10 @@ function _default(props) {
|
|
|
329
332
|
name: user.name,
|
|
330
333
|
id: user.userId,
|
|
331
334
|
width: 68,
|
|
332
|
-
editable: krCanEdit,
|
|
335
|
+
editable: krCanEdit && okrInfo.applyState !== _helper.EApproveStatus.UnderApproval,
|
|
333
336
|
onEditUser: onEditUserHandler,
|
|
334
337
|
nameTips: function nameTips(name) {
|
|
335
|
-
return /*#__PURE__*/_react["default"].createElement("span", null,
|
|
338
|
+
return /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_Text_Owner'), name);
|
|
336
339
|
}
|
|
337
340
|
})), showKrWeight && /*#__PURE__*/_react["default"].createElement(OkrRowColumn, {
|
|
338
341
|
width: 60,
|
|
@@ -348,7 +351,7 @@ function _default(props) {
|
|
|
348
351
|
marginLeft: 16
|
|
349
352
|
}, /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
350
353
|
data: data,
|
|
351
|
-
editable: krCanEdit
|
|
354
|
+
editable: krCanEdit && (0, _helper.getApprovalIsShow)(approvalSetting, 'changeOkrTime', okrInfo.applyState)
|
|
352
355
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
353
356
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-actions"))
|
|
354
357
|
}, showHeart && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -377,7 +380,7 @@ function _default(props) {
|
|
|
377
380
|
evaluateValue: evaluateValue,
|
|
378
381
|
setEvaluateValue: onEvaluateChangeHanler,
|
|
379
382
|
isEvaluate: isEvaluate
|
|
380
|
-
})), krCanEdit && /*#__PURE__*/_react["default"].createElement("div", {
|
|
383
|
+
})), krCanEdit && okrInfo.applyState !== _helper.EApproveStatus.UnderApproval && /*#__PURE__*/_react["default"].createElement("div", {
|
|
381
384
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-delete")),
|
|
382
385
|
onClick: function onClick() {
|
|
383
386
|
return setDeleteModalVisible(true);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getApproveStatusTextMap = exports.ApproveStatusColor = exports.ApproveStatus = void 0;
|
|
7
|
+
|
|
8
|
+
var _getLocale = require("../../../utils/getLocale");
|
|
9
|
+
|
|
10
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
|
|
12
|
+
var ApproveStatus;
|
|
13
|
+
exports.ApproveStatus = ApproveStatus;
|
|
14
|
+
|
|
15
|
+
(function (ApproveStatus) {
|
|
16
|
+
ApproveStatus[ApproveStatus["None"] = 0] = "None";
|
|
17
|
+
ApproveStatus[ApproveStatus["WaitCommit"] = 6] = "WaitCommit";
|
|
18
|
+
ApproveStatus[ApproveStatus["Rejected"] = 3] = "Rejected";
|
|
19
|
+
ApproveStatus[ApproveStatus["UnderApproval"] = 1] = "UnderApproval";
|
|
20
|
+
ApproveStatus[ApproveStatus["ApproveAgree"] = 2] = "ApproveAgree";
|
|
21
|
+
ApproveStatus[ApproveStatus["WithDraw"] = 4] = "WithDraw";
|
|
22
|
+
ApproveStatus[ApproveStatus["Done"] = 5] = "Done";
|
|
23
|
+
})(ApproveStatus || (exports.ApproveStatus = ApproveStatus = {}));
|
|
24
|
+
|
|
25
|
+
var getApproveStatusTextMap = function getApproveStatusTextMap(status) {
|
|
26
|
+
var _ApproveStatusTextMap;
|
|
27
|
+
|
|
28
|
+
var ApproveStatusTextMap = (_ApproveStatusTextMap = {}, _defineProperty(_ApproveStatusTextMap, ApproveStatus.WaitCommit, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Rejected, (0, _getLocale.getLocale)('OKR_MyO_Tobesubmitted')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.UnderApproval, (0, _getLocale.getLocale)('Pro_detail_Approval')), _defineProperty(_ApproveStatusTextMap, ApproveStatus.ApproveAgree, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.WithDraw, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.None, ''), _defineProperty(_ApproveStatusTextMap, ApproveStatus.Done, ''), _ApproveStatusTextMap);
|
|
29
|
+
return ApproveStatusTextMap[status];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.getApproveStatusTextMap = getApproveStatusTextMap;
|
|
33
|
+
|
|
34
|
+
var ApproveStatusColor = function ApproveStatusColor(status) {
|
|
35
|
+
var _ApprovalStatusColorM;
|
|
36
|
+
|
|
37
|
+
var ApprovalStatusColorMap = (_ApprovalStatusColorM = {}, _defineProperty(_ApprovalStatusColorM, ApproveStatus.WaitCommit, {
|
|
38
|
+
color: '#F0A326',
|
|
39
|
+
bgColor: 'rgba(240, 163, 38, 0.1)'
|
|
40
|
+
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.Rejected, {
|
|
41
|
+
color: '#F0A326',
|
|
42
|
+
bgColor: 'rgba(240, 163, 38, 0.1)'
|
|
43
|
+
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.UnderApproval, {
|
|
44
|
+
color: '#2879FF',
|
|
45
|
+
bgColor: 'rgba(40, 121, 255, 0.1)'
|
|
46
|
+
}), _defineProperty(_ApprovalStatusColorM, ApproveStatus.ApproveAgree, {
|
|
47
|
+
color: '#ffffff',
|
|
48
|
+
bgColor: '#ffffff'
|
|
49
|
+
}), _ApprovalStatusColorM);
|
|
50
|
+
return ApprovalStatusColorMap[status];
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.ApproveStatusColor = ApproveStatusColor;
|
|
@@ -29,6 +29,8 @@ var _okrShare = _interopRequireDefault(require("../../okr-share"));
|
|
|
29
29
|
|
|
30
30
|
var _context7 = require("../context");
|
|
31
31
|
|
|
32
|
+
var _constant = require("./constant");
|
|
33
|
+
|
|
32
34
|
var _deleteConfirm = _interopRequireDefault(require("./delete-confirm/delete-confirm"));
|
|
33
35
|
|
|
34
36
|
var _drawerManager = _interopRequireDefault(require("../../drawer-manager"));
|
|
@@ -85,6 +87,9 @@ function OkrDetailHeader(_ref) {
|
|
|
85
87
|
var loginUserId = window.BSGlobal.loginUserInfo.Id;
|
|
86
88
|
var context = (0, _react.useContext)(_context7.GeneralDataContext);
|
|
87
89
|
var commonContext = (0, _react.useContext)(_context7.CommonContext);
|
|
90
|
+
var approvalSetting = commonContext.approvalSetting,
|
|
91
|
+
okrInfo = commonContext.okrInfo;
|
|
92
|
+
var approveStatusColor = (0, _constant.ApproveStatusColor)(detailInfo.applyState);
|
|
88
93
|
var changVisiblity = (0, _react.useCallback)( /*#__PURE__*/function () {
|
|
89
94
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(workId, visibility) {
|
|
90
95
|
var visibilityScope,
|
|
@@ -111,7 +116,7 @@ function OkrDetailHeader(_ref) {
|
|
|
111
116
|
}));
|
|
112
117
|
|
|
113
118
|
case 3:
|
|
114
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
119
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
115
120
|
|
|
116
121
|
context.setGeneralVisibility({
|
|
117
122
|
visibility: visibility,
|
|
@@ -136,230 +141,230 @@ function OkrDetailHeader(_ref) {
|
|
|
136
141
|
var actions = (0, _react.useMemo)(function () {
|
|
137
142
|
if (!detailInfo) {
|
|
138
143
|
return [];
|
|
139
|
-
}
|
|
140
|
-
return (0, _actions.getOkrHeadActions)({
|
|
141
|
-
roleType: context.generalRoleType,
|
|
142
|
-
principalUser: context.generalPrincipalUser,
|
|
143
|
-
visibility: context.generalVisibility.visibility,
|
|
144
|
-
detailInfo: detailInfo,
|
|
145
|
-
openShareModal: function () {
|
|
146
|
-
var _openShareModal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
147
|
-
var krss;
|
|
148
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
149
|
-
while (1) {
|
|
150
|
-
switch (_context2.prev = _context2.next) {
|
|
151
|
-
case 0:
|
|
152
|
-
_context2.next = 2;
|
|
153
|
-
return (0, _requestApis.getKrs)({
|
|
154
|
-
okrId: detailInfo.workId
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
case 2:
|
|
158
|
-
krss = _context2.sent;
|
|
159
|
-
setKrs(krss);
|
|
160
|
-
setShareVisible(true);
|
|
161
|
-
|
|
162
|
-
case 5:
|
|
163
|
-
case "end":
|
|
164
|
-
return _context2.stop();
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}, _callee2);
|
|
168
|
-
}));
|
|
144
|
+
}
|
|
169
145
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
146
|
+
return (0, _actions.getOkrHeadActions)({
|
|
147
|
+
roleType: context.generalRoleType,
|
|
148
|
+
principalUser: context.generalPrincipalUser,
|
|
149
|
+
visibility: context.generalVisibility.visibility,
|
|
150
|
+
detailInfo: detailInfo,
|
|
151
|
+
openShareModal: function () {
|
|
152
|
+
var _openShareModal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
153
|
+
var krss;
|
|
154
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
155
|
+
while (1) {
|
|
156
|
+
switch (_context2.prev = _context2.next) {
|
|
157
|
+
case 0:
|
|
158
|
+
_context2.next = 2;
|
|
159
|
+
return (0, _requestApis.getKrs)({
|
|
160
|
+
okrId: detailInfo.workId
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
case 2:
|
|
164
|
+
krss = _context2.sent;
|
|
165
|
+
setKrs(krss);
|
|
166
|
+
setShareVisible(true);
|
|
173
167
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
if (userSelectRef.current) {
|
|
179
|
-
userSelectRef.current.open();
|
|
168
|
+
case 5:
|
|
169
|
+
case "end":
|
|
170
|
+
return _context2.stop();
|
|
171
|
+
}
|
|
180
172
|
}
|
|
173
|
+
}, _callee2);
|
|
174
|
+
}));
|
|
175
|
+
|
|
176
|
+
function openShareModal() {
|
|
177
|
+
return _openShareModal.apply(this, arguments);
|
|
178
|
+
}
|
|
181
179
|
|
|
182
|
-
|
|
180
|
+
return openShareModal;
|
|
181
|
+
}(),
|
|
182
|
+
changeVisiblilty: function changeVisiblilty(visibility) {
|
|
183
|
+
if (visibility === 4) {
|
|
184
|
+
if (userSelectRef.current) {
|
|
185
|
+
userSelectRef.current.open();
|
|
183
186
|
}
|
|
184
187
|
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
_context3.next = 7;
|
|
221
|
-
return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
|
|
222
|
-
|
|
223
|
-
case 7:
|
|
224
|
-
_context3.next = 11;
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
changVisiblity(detailInfo.workId, visibility);
|
|
192
|
+
},
|
|
193
|
+
onDeleteOkr: function onDeleteOkr(e) {
|
|
194
|
+
popRef.current.getRef().show(e.target);
|
|
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;
|
|
215
|
+
|
|
216
|
+
if (!res) {
|
|
217
|
+
_context3.next = 14;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (!follow) {
|
|
222
|
+
_context3.next = 9;
|
|
225
223
|
break;
|
|
224
|
+
}
|
|
226
225
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
226
|
+
_context3.next = 7;
|
|
227
|
+
return (0, _requestApis.addUser)(loginUserId, detailInfo.workId, 3);
|
|
230
228
|
|
|
231
|
-
|
|
232
|
-
|
|
229
|
+
case 7:
|
|
230
|
+
_context3.next = 11;
|
|
231
|
+
break;
|
|
233
232
|
|
|
234
|
-
|
|
233
|
+
case 9:
|
|
234
|
+
_context3.next = 11;
|
|
235
|
+
return (0, _requestApis.deleteUser)(loginUserId, detailInfo.workId, 3);
|
|
235
236
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
237
|
+
case 11:
|
|
238
|
+
context.setGeneralRoleType(follow ? 3 : 0); // 关注
|
|
239
239
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
240
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
241
|
+
|
|
242
|
+
if (!follow) {
|
|
243
|
+
commonContext.refreshAll();
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
case 14:
|
|
247
|
+
case "end":
|
|
248
|
+
return _context3.stop();
|
|
244
249
|
}
|
|
245
|
-
}
|
|
246
|
-
})
|
|
250
|
+
}
|
|
251
|
+
}, _callee3);
|
|
252
|
+
}));
|
|
247
253
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
254
|
+
function onChangeOkrFollow(_x3) {
|
|
255
|
+
return _onChangeOkrFollow.apply(this, arguments);
|
|
256
|
+
}
|
|
251
257
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
_context4.next = 7;
|
|
278
|
-
return (0, _requestApis.close)(detailInfo.workId);
|
|
279
|
-
|
|
280
|
-
case 7:
|
|
281
|
-
_context4.next = 11;
|
|
258
|
+
return onChangeOkrFollow;
|
|
259
|
+
}(),
|
|
260
|
+
onFinishOrReOpen: function () {
|
|
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
|
+
}
|
|
277
|
+
|
|
278
|
+
if (!isFinish) {
|
|
279
|
+
_context4.next = 9;
|
|
282
280
|
break;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
_context4.next = 7;
|
|
284
|
+
return (0, _requestApis.close)(detailInfo.workId);
|
|
283
285
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
case 7:
|
|
287
|
+
_context4.next = 11;
|
|
288
|
+
break;
|
|
287
289
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
+
case 9:
|
|
291
|
+
_context4.next = 11;
|
|
292
|
+
return (0, _requestApis.start)(detailInfo.workId);
|
|
290
293
|
|
|
291
|
-
|
|
294
|
+
case 11:
|
|
295
|
+
commonContext.refreshAll(); // 刷新
|
|
292
296
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
298
|
+
|
|
299
|
+
case 13:
|
|
300
|
+
case "end":
|
|
301
|
+
return _context4.stop();
|
|
297
302
|
}
|
|
298
|
-
}
|
|
299
|
-
})
|
|
303
|
+
}
|
|
304
|
+
}, _callee4);
|
|
305
|
+
}));
|
|
300
306
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
307
|
+
function onFinishOrReOpen(_x4) {
|
|
308
|
+
return _onFinishOrReOpen.apply(this, arguments);
|
|
309
|
+
}
|
|
304
310
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
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"));
|
|
339
|
+
|
|
340
|
+
case 8:
|
|
341
|
+
case "end":
|
|
342
|
+
return _context5.stop();
|
|
338
343
|
}
|
|
339
|
-
}
|
|
340
|
-
})
|
|
344
|
+
}
|
|
345
|
+
}, _callee5);
|
|
346
|
+
}));
|
|
341
347
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
348
|
+
function onQuit() {
|
|
349
|
+
return _onQuit.apply(this, arguments);
|
|
350
|
+
}
|
|
345
351
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
352
|
+
return onQuit;
|
|
353
|
+
}()
|
|
354
|
+
});
|
|
350
355
|
}, [detailInfo, context.generalRoleType, context.generalPrincipalUser, context.generalVisibility.visibility]);
|
|
351
356
|
var parent = null;
|
|
352
357
|
|
|
353
358
|
if (context.generalParent) {
|
|
354
359
|
if (context.generalParent.parentKr) {
|
|
355
360
|
parent = {
|
|
356
|
-
type:
|
|
361
|
+
type: "kr",
|
|
357
362
|
id: context.generalParent.parentKr.mileStoneId,
|
|
358
363
|
name: context.generalParent.parentKr.mileStoneName
|
|
359
364
|
};
|
|
360
365
|
} else if (context.generalParent.parentOkr) {
|
|
361
366
|
parent = {
|
|
362
|
-
type:
|
|
367
|
+
type: "okr",
|
|
363
368
|
id: context.generalParent.parentOkr.workId,
|
|
364
369
|
name: context.generalParent.parentOkr.workName
|
|
365
370
|
};
|
|
@@ -368,6 +373,8 @@ function OkrDetailHeader(_ref) {
|
|
|
368
373
|
|
|
369
374
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_drawer["default"].Header, {
|
|
370
375
|
actions: actions,
|
|
376
|
+
approvalSetting: approvalSetting,
|
|
377
|
+
detailInfo: detailInfo,
|
|
371
378
|
actionComponent: /*#__PURE__*/_react["default"].createElement(_wechatBtn["default"], {
|
|
372
379
|
id: detailInfo.workId,
|
|
373
380
|
objType: 62,
|
|
@@ -380,13 +387,17 @@ function OkrDetailHeader(_ref) {
|
|
|
380
387
|
className: "tu-icon-liebiao-duiqinubiao"
|
|
381
388
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
382
389
|
onClick: function onClick() {
|
|
383
|
-
return parent.type ===
|
|
390
|
+
return parent.type === "okr" ? _drawerManager["default"].open("okrDetail", {
|
|
384
391
|
okrId: parent.id
|
|
385
|
-
}) : _drawerManager["default"].open(
|
|
392
|
+
}) : _drawerManager["default"].open("krDetail", {
|
|
386
393
|
krId: parent.id
|
|
387
394
|
});
|
|
388
395
|
}
|
|
389
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type ===
|
|
396
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, parent.type === "okr" ? "O " : "KR "), parent.name)) : null,
|
|
397
|
+
status: {
|
|
398
|
+
title: (0, _constant.getApproveStatusTextMap)(okrInfo.applyState),
|
|
399
|
+
color: approveStatusColor
|
|
400
|
+
}
|
|
390
401
|
}), /*#__PURE__*/_react["default"].createElement(_okrShare["default"], {
|
|
391
402
|
visible: shareVisible,
|
|
392
403
|
onClose: closeShareModal,
|
|
@@ -423,7 +434,7 @@ function OkrDetailHeader(_ref) {
|
|
|
423
434
|
});
|
|
424
435
|
|
|
425
436
|
case 2:
|
|
426
|
-
_toast["default"].Success((0, _getLocale.getLocale)(
|
|
437
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Pro_detail_Deletsuccess"));
|
|
427
438
|
|
|
428
439
|
setTimeout(function () {
|
|
429
440
|
commonContext.refreshAll();
|
|
@@ -447,7 +458,7 @@ function OkrDetailHeader(_ref) {
|
|
|
447
458
|
})
|
|
448
459
|
}, /*#__PURE__*/_react["default"].createElement("span", null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
449
460
|
style: {
|
|
450
|
-
textAlign:
|
|
461
|
+
textAlign: "right",
|
|
451
462
|
height: 0
|
|
452
463
|
}
|
|
453
464
|
}, /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
@@ -461,9 +472,9 @@ function OkrDetailHeader(_ref) {
|
|
|
461
472
|
selectNodes: context.generalVisibility.visibilityScope || {},
|
|
462
473
|
trigger: /*#__PURE__*/_react["default"].createElement("div", {
|
|
463
474
|
style: {
|
|
464
|
-
visibility:
|
|
475
|
+
visibility: "hidden",
|
|
465
476
|
zIndex: -1,
|
|
466
|
-
display:
|
|
477
|
+
display: "inline-block",
|
|
467
478
|
height: 0
|
|
468
479
|
}
|
|
469
480
|
}, "empty select")
|