@titaui/pc 1.12.0-beta.0 → 1.12.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/avatar/name-avatar/index.css +1 -0
- package/lib/components/avatar/name-avatar/index.js +22 -13
- package/lib/components/avatar/text-avatar/index.css +2 -2
- package/lib/components/avatar/text-avatar/index.js +6 -6
- 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 +7 -6
- package/lib/components/checkbox/index.css +3 -3
- package/lib/{pages/aha2021 → components/contact-kefu}/img/canceled.svg +0 -0
- package/lib/{pages/aha2021 → components/contact-kefu}/img/kefu.svg +0 -0
- package/lib/{pages/aha2021 → components/contact-kefu}/img/not-try.png +0 -0
- package/lib/components/contact-kefu/img/notice.png +0 -0
- package/lib/{pages/aha2021 → components/contact-kefu}/img/try.png +0 -0
- package/lib/components/contact-kefu/index.css +85 -0
- package/lib/components/contact-kefu/index.js +102 -0
- package/lib/components/create-okr-modal/index.js +45 -41
- 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/constant.js +38 -33
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +48 -10
- package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +4 -2
- package/lib/components/dynamic/new-ui.css +4 -4
- package/lib/components/dynamic/online-broadcast/data.js +19 -1
- package/lib/components/e-priority/index.css +4 -4
- package/lib/components/e-priority/index.js +10 -2
- package/lib/components/form/form-fields/radios/index.css +4 -0
- package/lib/components/form/form-fields/radios/index.js +4 -3
- package/lib/components/mblog/components/MblogContent.js +5 -2
- package/lib/components/menus/export-modules/appraisal-menus/menus.js +4 -3
- package/lib/components/nav-top/components/menu/img/new.svg +30 -0
- package/lib/components/nav-top/components/menu/img/wecome-temp.png +0 -0
- package/lib/components/nav-top/components/menu/index.css +91 -0
- package/lib/components/nav-top/components/menu/index.js +72 -24
- package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +2 -1
- package/lib/components/nav-top/components/user-message/components/todos/index.css +1 -0
- package/lib/components/nav-top/index.js +6 -2
- 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/base-okr-type/index.css +4 -0
- package/lib/components/okr-detail/components/base-okr-type/object-type.js +1 -0
- 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 +16 -16
- 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 +111 -54
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +63 -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 -4
- package/lib/components/okr-detail/okr-list/index.js +13 -6
- package/lib/components/okr-detail/request-apis.js +14 -8
- package/lib/components/okr-flow/child-node/index.css +1 -1
- package/lib/components/okr-flow/export-modal/index.js +66 -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/radio/index.css +3 -3
- package/lib/components/survey-model/index.js +3 -0
- package/lib/components/task-relation-modal/index.js +0 -1
- package/lib/components/task-relation-modal/request-api.js +2 -1
- package/lib/components/task-relation-modal/tree-node/category-node/index.css +0 -11
- package/lib/components/task-relation-modal/tree-node/category-node/index.js +1 -3
- package/lib/components/task-relation-modal/tree-node/kr-node/index.css +0 -16
- package/lib/components/task-relation-modal/tree-node/kr-node/index.js +0 -6
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.css +0 -16
- package/lib/components/task-relation-modal/tree-node/milestone-node/index.js +0 -4
- package/lib/components/task-tree/index.js +1 -7
- package/lib/components/task-tree/task-item-node/constant.js +39 -22
- package/lib/components/task-tree/task-item-node/e-status-dropdown.js +38 -8
- package/lib/components/task-tree/task-item-node/e-task.js +24 -24
- package/lib/components/task-tree/task-item-node/index.css +28 -18
- package/lib/components/task-tree/task-tree.css +1 -1
- package/lib/components/textarea/index.css +142 -0
- package/lib/components/textarea/index.js +262 -0
- package/lib/components/time-picker/time-picker.js +34 -102
- package/lib/components/time-picker/timer-picker-input.js +0 -6
- package/lib/components/toast/index.js +5 -3
- package/lib/components/user-selector/category-selector-panel/index.js +6 -1
- package/lib/components/user-selector/category-selector-panel/subordinate-tree.js +61 -0
- package/lib/components/user-selector/constant.js +10 -2
- package/lib/components/user-selector/empty/index.css +5 -0
- package/lib/components/user-selector/empty/index.js +9 -3
- package/lib/components/user-selector/export-modules/depart-search-selector/index.js +45 -17
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +3 -1
- package/lib/components/user-selector/images/no-auth.png +0 -0
- package/lib/components/user-selector/request-apis.js +28 -9
- package/lib/components/user-selector/searched-panel/index.js +21 -7
- package/lib/components-v1/radio/radio.js +1 -1
- package/lib/index.js +48 -0
- package/lib/pages/aha2021/index.css +1 -26
- package/lib/pages/aha2021/index.js +3 -82
- 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 +40 -16
- package/lib/pages/new-okr-list/header/operate-record.js +136 -0
- package/lib/pages/new-okr-list/index.js +4 -2
- 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 +1 -1
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +0 -38
- package/lib/components/task-tree/mock.js +0 -944
|
@@ -84,7 +84,8 @@ function Inform(props) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
if (objType === _constant.EObjType.Interview) {
|
|
87
|
-
(0, _tools.openPage)(
|
|
87
|
+
messageType !== 153 && (0, _tools.openPage)( // 153:删除面谈的通知类型
|
|
88
|
+
"".concat(_constant.apiServer, "/u/").concat(_constant.userId, "/Home#/interview?reactRouterName=detail&hideNavTop=true&recordId=").concat(objId, "&toUserId=").concat(user === null || user === void 0 ? void 0 : user.userId));
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
91
|
|
|
@@ -15,6 +15,8 @@ var _bsGlobal = require("../../utils/bs-global");
|
|
|
15
15
|
|
|
16
16
|
var _userOwnMenu = _interopRequireDefault(require("./components/user-own-menu"));
|
|
17
17
|
|
|
18
|
+
var _useGlobalValue = _interopRequireDefault(require("./useGlobalValue"));
|
|
19
|
+
|
|
18
20
|
var _menu = _interopRequireDefault(require("./components/menu"));
|
|
19
21
|
|
|
20
22
|
var _userMessage = _interopRequireDefault(require("./components/user-message"));
|
|
@@ -170,5 +172,7 @@ var NavTop = function NavTop() {
|
|
|
170
172
|
}, /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null)));
|
|
171
173
|
};
|
|
172
174
|
|
|
173
|
-
var _default = NavTop;
|
|
174
|
-
|
|
175
|
+
var _default = NavTop; // @ts-ignore
|
|
176
|
+
|
|
177
|
+
exports["default"] = _default;
|
|
178
|
+
NavTop.useGlobalValue = _useGlobalValue["default"];
|
|
@@ -13,6 +13,10 @@ var _okrPeriodSelector = _interopRequireDefault(require("../../../../okr-period-
|
|
|
13
13
|
|
|
14
14
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
15
15
|
|
|
16
|
+
var _context = require("../../../context");
|
|
17
|
+
|
|
18
|
+
var _helper = require("../../../helper");
|
|
19
|
+
|
|
16
20
|
require("./index.css");
|
|
17
21
|
|
|
18
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -40,14 +44,22 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
40
44
|
_ref$canEdit = _ref.canEdit,
|
|
41
45
|
canEdit = _ref$canEdit === void 0 ? false : _ref$canEdit;
|
|
42
46
|
|
|
47
|
+
var _useContext = (0, _react.useContext)(_context.CommonContext),
|
|
48
|
+
okrInfo = _useContext.okrInfo,
|
|
49
|
+
approvalSetting = _useContext.approvalSetting;
|
|
50
|
+
|
|
51
|
+
var canCycleEdit = canEdit && (0, _helper.getApprovalOkr)(approvalSetting, "changeOkrTime", okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes);
|
|
52
|
+
|
|
43
53
|
var _useState = (0, _react.useState)(false),
|
|
44
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
45
55
|
isFocus = _useState2[0],
|
|
46
56
|
setIsFocus = _useState2[1];
|
|
47
57
|
|
|
48
58
|
var handleButtonFocus = (0, _react.useCallback)(function () {
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
if (canCycleEdit) {
|
|
60
|
+
setIsFocus(true);
|
|
61
|
+
}
|
|
62
|
+
}, [canCycleEdit]);
|
|
51
63
|
var handleButtonBlur = (0, _react.useCallback)(function () {
|
|
52
64
|
setIsFocus(false);
|
|
53
65
|
}, []);
|
|
@@ -57,9 +69,10 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
57
69
|
clickCallback = _ref2.clickCallback,
|
|
58
70
|
text = _ref2.text;
|
|
59
71
|
return /*#__PURE__*/_react["default"].createElement("button", {
|
|
72
|
+
type: "button",
|
|
60
73
|
onFocus: handleButtonFocus,
|
|
61
74
|
onBlur: handleButtonBlur,
|
|
62
|
-
className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!
|
|
75
|
+
className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!canCycleEdit && "base-info-date-cycle__button--disable"),
|
|
63
76
|
ref: btnRef,
|
|
64
77
|
onClick: clickCallback
|
|
65
78
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -78,10 +91,13 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
78
91
|
cycle: cycle,
|
|
79
92
|
setCycle: setCycle,
|
|
80
93
|
okrId: okrId,
|
|
81
|
-
canEdit:
|
|
94
|
+
canEdit: canCycleEdit,
|
|
82
95
|
getCycleRange: true
|
|
83
96
|
}));
|
|
84
97
|
};
|
|
85
98
|
|
|
99
|
+
DateCycle.defaultProps = {
|
|
100
|
+
canEdit: false
|
|
101
|
+
};
|
|
86
102
|
var _default = DateCycle;
|
|
87
103
|
exports["default"] = _default;
|
|
@@ -21,6 +21,10 @@ var _popConfirm = _interopRequireDefault(require("../../../../../components-v1/p
|
|
|
21
21
|
|
|
22
22
|
var _getLocale = require("../../../../../utils/getLocale");
|
|
23
23
|
|
|
24
|
+
var _context2 = require("../../../context");
|
|
25
|
+
|
|
26
|
+
var _helper = require("../../../helper");
|
|
27
|
+
|
|
24
28
|
require("./index.css");
|
|
25
29
|
|
|
26
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -60,6 +64,10 @@ var Principal = function Principal(_ref) {
|
|
|
60
64
|
selectUser = _useState2[0],
|
|
61
65
|
setSelectUser = _useState2[1];
|
|
62
66
|
|
|
67
|
+
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
68
|
+
okrInfo = _useContext.okrInfo,
|
|
69
|
+
approvalSetting = _useContext.approvalSetting;
|
|
70
|
+
|
|
63
71
|
var handleSelected = function handleSelected(_ref2) {
|
|
64
72
|
var _ref3 = _slicedToArray(_ref2, 1),
|
|
65
73
|
user = _ref3[0];
|
|
@@ -114,7 +122,7 @@ var Principal = function Principal(_ref) {
|
|
|
114
122
|
}, (0, _getLocale.getLocale)("Mod_Owner")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
115
123
|
className: "base-info-other-infos__principal-user",
|
|
116
124
|
ref: selectUserRef
|
|
117
|
-
}, canEdit ? /*#__PURE__*/_react["default"].createElement(_popConfirm["default"], {
|
|
125
|
+
}, canEdit && (0, _helper.getApprovalOkr)(approvalSetting, "changeOkrName", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes) ? /*#__PURE__*/_react["default"].createElement(_popConfirm["default"], {
|
|
118
126
|
ref: popConfirmRef,
|
|
119
127
|
showArrow: false,
|
|
120
128
|
style: {
|
|
@@ -248,6 +248,7 @@ var ObjectType = /*#__PURE__*/function (_Component) {
|
|
|
248
248
|
|
|
249
249
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_radio.RadioGroup, {
|
|
250
250
|
name: "okrType",
|
|
251
|
+
className: "confim-radio",
|
|
251
252
|
labelText: (0, _getLocale.getLocale)("Mod_Type"),
|
|
252
253
|
style: {
|
|
253
254
|
marginBottom: 8
|
|
@@ -31,6 +31,8 @@ var _progress = _interopRequireDefault(require("../../../progress"));
|
|
|
31
31
|
|
|
32
32
|
var _utils = require("../../../progress/utils");
|
|
33
33
|
|
|
34
|
+
var _helper = require("../../helper");
|
|
35
|
+
|
|
34
36
|
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
35
37
|
|
|
36
38
|
var _auth = require("../../../../utils/auth");
|
|
@@ -85,6 +87,8 @@ function Header(props) {
|
|
|
85
87
|
setGeneralOkrClassify = _useContext.setGeneralOkrClassify,
|
|
86
88
|
showOkrEvalute = _useContext.showOkrEvalute;
|
|
87
89
|
|
|
90
|
+
var commonContext = (0, _react.useContext)(_context.CommonContext);
|
|
91
|
+
var approvalSetting = commonContext.approvalSetting;
|
|
88
92
|
var showOScore = (_window = window) === null || _window === void 0 ? void 0 : (_window$BSGlobal = _window.BSGlobal) === null || _window$BSGlobal === void 0 ? void 0 : (_window$BSGlobal$OkrA = _window$BSGlobal.OkrAdvancedSetting) === null || _window$BSGlobal$OkrA === void 0 ? void 0 : (_window$BSGlobal$OkrA2 = _window$BSGlobal$OkrA.KRSetting) === null || _window$BSGlobal$OkrA2 === void 0 ? void 0 : _window$BSGlobal$OkrA2.OScore;
|
|
89
93
|
var _okrInfo$progressGrow = okrInfo.progressGrow,
|
|
90
94
|
progressGrow = _okrInfo$progressGrow === void 0 ? 0 : _okrInfo$progressGrow,
|
|
@@ -156,7 +160,7 @@ function Header(props) {
|
|
|
156
160
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
161
|
className: "".concat(precls, "__avatar")
|
|
158
162
|
}, /*#__PURE__*/_react["default"].createElement(_oAvatar["default"], {
|
|
159
|
-
editable: editable,
|
|
163
|
+
editable: editable && (okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState) !== 1,
|
|
160
164
|
okrId: okrInfo.workId
|
|
161
165
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
162
166
|
className: "".concat(precls, "__content")
|
|
@@ -164,7 +168,10 @@ function Header(props) {
|
|
|
164
168
|
editable: editable,
|
|
165
169
|
okrName: okrName,
|
|
166
170
|
setIsEdit: setIsEdit,
|
|
167
|
-
okrStatus: okrInfo.status
|
|
171
|
+
okrStatus: okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.status,
|
|
172
|
+
OkrAndKrApprovalTypes: okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes,
|
|
173
|
+
applyState: okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState,
|
|
174
|
+
approvalSetting: approvalSetting
|
|
168
175
|
}, /*#__PURE__*/_react["default"].createElement(_oClassify["default"], {
|
|
169
176
|
editable: editable,
|
|
170
177
|
okrId: okrInfo.workId,
|
|
@@ -187,7 +194,7 @@ function Header(props) {
|
|
|
187
194
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
188
195
|
className: "".concat(precls, "__action-item")
|
|
189
196
|
}, /*#__PURE__*/_react["default"].createElement(_oCycle["default"], {
|
|
190
|
-
editable: editable,
|
|
197
|
+
editable: editable && (0, _helper.getApprovalOkr)(approvalSetting, "changeOkrTime", okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes),
|
|
191
198
|
okrId: okrInfo.workId
|
|
192
199
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
193
200
|
className: "".concat(precls, "__action-item")
|
|
@@ -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,16 @@ 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,
|
|
28
|
+
OkrAndKrApprovalTypes = props.OkrAndKrApprovalTypes;
|
|
24
29
|
|
|
25
30
|
var handleEditClick = function handleEditClick() {
|
|
26
|
-
if (
|
|
27
|
-
|
|
31
|
+
if ((0, _helper.getApprovalOkr)(approvalSetting, "changeOkrName", applyState, OkrAndKrApprovalTypes)) {
|
|
32
|
+
if (editable) {
|
|
33
|
+
setIsEdit(true);
|
|
34
|
+
}
|
|
28
35
|
}
|
|
29
36
|
};
|
|
30
37
|
|
|
@@ -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");
|
|
@@ -94,11 +96,13 @@ function _default(props) {
|
|
|
94
96
|
var data = props.data,
|
|
95
97
|
index = props.index,
|
|
96
98
|
title = props.title,
|
|
97
|
-
key = props.key
|
|
99
|
+
key = props.key,
|
|
100
|
+
canEditOkr = props.canEditOkr;
|
|
98
101
|
|
|
99
102
|
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
100
103
|
refreshAll = _useContext.refreshAll,
|
|
101
|
-
okrInfo = _useContext.okrInfo
|
|
104
|
+
okrInfo = _useContext.okrInfo,
|
|
105
|
+
approvalSetting = _useContext.approvalSetting;
|
|
102
106
|
|
|
103
107
|
var _useState = (0, _react.useState)(data.confidenceIndex),
|
|
104
108
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -155,7 +159,7 @@ function _default(props) {
|
|
|
155
159
|
var hasAuth = new _auth.KRAuth({
|
|
156
160
|
user: data.user,
|
|
157
161
|
createUserId: data.createUserId
|
|
158
|
-
}).hasAuth();
|
|
162
|
+
}).hasAuth() || canEditOkr;
|
|
159
163
|
var livetime = okrInfo.status != 2;
|
|
160
164
|
return hasAuth && livetime;
|
|
161
165
|
}),
|
|
@@ -219,17 +223,13 @@ function _default(props) {
|
|
|
219
223
|
updateProgressWay: updateProgressWay
|
|
220
224
|
}).then(function (res) {
|
|
221
225
|
if (res.Code == 1) {
|
|
222
|
-
_toast["default"].Success("
|
|
223
|
-
top: 60
|
|
224
|
-
});
|
|
226
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
225
227
|
|
|
226
228
|
refreshAll();
|
|
227
229
|
updateKrs();
|
|
228
230
|
setKrModalVsible(false);
|
|
229
231
|
} else {
|
|
230
|
-
_toast["default"].Error(res.Message
|
|
231
|
-
top: 60
|
|
232
|
-
});
|
|
232
|
+
_toast["default"].Error(res.Message);
|
|
233
233
|
}
|
|
234
234
|
});
|
|
235
235
|
};
|
|
@@ -251,7 +251,7 @@ function _default(props) {
|
|
|
251
251
|
setDeleteModalVisible(false);
|
|
252
252
|
|
|
253
253
|
if (!Message) {
|
|
254
|
-
_toast["default"].Success((0, _getLocale.getLocale)("
|
|
254
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
255
255
|
|
|
256
256
|
setTimeout(function () {
|
|
257
257
|
refreshAll();
|
|
@@ -280,7 +280,7 @@ function _default(props) {
|
|
|
280
280
|
workId: data.workId,
|
|
281
281
|
workMileStoneId: data.mileStoneId
|
|
282
282
|
}).then(function () {
|
|
283
|
-
_toast["default"].Success("
|
|
283
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Mod_Successfuloperat"));
|
|
284
284
|
});
|
|
285
285
|
};
|
|
286
286
|
|
|
@@ -315,7 +315,7 @@ function _default(props) {
|
|
|
315
315
|
}, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("span", {
|
|
316
316
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-title"))
|
|
317
317
|
}, /*#__PURE__*/_react["default"].createElement(_editableInput["default"], {
|
|
318
|
-
editable: krCanEdit,
|
|
318
|
+
editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, "changeOkrName", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes),
|
|
319
319
|
defaultValue: krName,
|
|
320
320
|
emptyMessage: "KR\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",
|
|
321
321
|
onKeyDown: onKrNameChangeHandler,
|
|
@@ -329,10 +329,10 @@ function _default(props) {
|
|
|
329
329
|
name: user.name,
|
|
330
330
|
id: user.userId,
|
|
331
331
|
width: 68,
|
|
332
|
-
editable: krCanEdit,
|
|
332
|
+
editable: krCanEdit && okrInfo.applyState !== _helper.EApproveStatus.UnderApproval,
|
|
333
333
|
onEditUser: onEditUserHandler,
|
|
334
334
|
nameTips: function nameTips(name) {
|
|
335
|
-
return /*#__PURE__*/_react["default"].createElement("span", null,
|
|
335
|
+
return /*#__PURE__*/_react["default"].createElement("span", null, (0, _getLocale.getLocale)('OKR_MyO_Text_Owner'), name);
|
|
336
336
|
}
|
|
337
337
|
})), showKrWeight && /*#__PURE__*/_react["default"].createElement(OkrRowColumn, {
|
|
338
338
|
width: 60,
|
|
@@ -348,7 +348,7 @@ function _default(props) {
|
|
|
348
348
|
marginLeft: 16
|
|
349
349
|
}, /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
350
350
|
data: data,
|
|
351
|
-
editable: krCanEdit
|
|
351
|
+
editable: krCanEdit && (0, _helper.getApprovalKr)(approvalSetting, "changeOkrTime", okrInfo.applyState, okrInfo === null || okrInfo === void 0 ? void 0 : okrInfo.OkrAndKrApprovalTypes, data === null || data === void 0 ? void 0 : data.KrApprovalTypes)
|
|
352
352
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
353
353
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-actions"))
|
|
354
354
|
}, showHeart && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -377,7 +377,7 @@ function _default(props) {
|
|
|
377
377
|
evaluateValue: evaluateValue,
|
|
378
378
|
setEvaluateValue: onEvaluateChangeHanler,
|
|
379
379
|
isEvaluate: isEvaluate
|
|
380
|
-
})), krCanEdit && /*#__PURE__*/_react["default"].createElement("div", {
|
|
380
|
+
})), krCanEdit && okrInfo.applyState !== _helper.EApproveStatus.UnderApproval && /*#__PURE__*/_react["default"].createElement("div", {
|
|
381
381
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-delete")),
|
|
382
382
|
onClick: function onClick() {
|
|
383
383
|
return setDeleteModalVisible(true);
|
|
@@ -15,6 +15,10 @@ var _requestApis = require("../../../../request-apis");
|
|
|
15
15
|
|
|
16
16
|
var _rangePickerPop = _interopRequireDefault(require("../../../../../range-picker-pop"));
|
|
17
17
|
|
|
18
|
+
var _toast = _interopRequireDefault(require("../../../../../toast"));
|
|
19
|
+
|
|
20
|
+
var _getLocale = require("../../../../../../utils/getLocale");
|
|
21
|
+
|
|
18
22
|
require("./index.css");
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -68,6 +72,12 @@ function _default(props) {
|
|
|
68
72
|
kr: data,
|
|
69
73
|
startDate: startDate,
|
|
70
74
|
endDate: endDate
|
|
75
|
+
}).then(function (resp) {
|
|
76
|
+
if (resp.Code === 1) {
|
|
77
|
+
_toast["default"].Success((0, _getLocale.getLocale)('Mod_Successfuloperat'));
|
|
78
|
+
} else {
|
|
79
|
+
_toast["default"].Error(resp.Message);
|
|
80
|
+
}
|
|
71
81
|
});
|
|
72
82
|
rangePicker.current.setRange({
|
|
73
83
|
startDate: startDate,
|
|
@@ -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;
|
|
@@ -9,13 +9,15 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _getLocale = require("../../../../utils/getLocale");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _dialogConfirm = _interopRequireDefault(require("../../../dialog-confirm"));
|
|
15
15
|
|
|
16
16
|
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _form = _interopRequireDefault(require("../../../form"));
|
|
19
|
+
|
|
20
|
+
require("./index.css");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
23
|
|
|
@@ -35,61 +37,116 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
35
37
|
|
|
36
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
39
|
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
var prefix = "okr-detail-delete-confirm";
|
|
41
|
+
var Radios = _form["default"].Fields.Radios;
|
|
42
|
+
var radios = [{
|
|
43
|
+
label: /*#__PURE__*/_react["default"].createElement("span", {
|
|
44
|
+
className: "".concat(prefix, "__option-text")
|
|
45
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_OdeletionNTask")),
|
|
46
|
+
value: 0
|
|
47
|
+
}, {
|
|
48
|
+
label: /*#__PURE__*/_react["default"].createElement("span", {
|
|
49
|
+
className: "".concat(prefix, "__option-text")
|
|
50
|
+
}, (0, _getLocale.getLocale)("OKR_MyO_Text_OdeletionTask"), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
51
|
+
overlay: (0, _getLocale.getLocale)("Pro_detail_Tasksapproval"),
|
|
52
|
+
placement: "top",
|
|
53
|
+
zIndex: 15000
|
|
54
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
55
|
+
className: "".concat(prefix, "__icon tu-icon-wiki")
|
|
56
|
+
}))),
|
|
57
|
+
value: 1
|
|
58
|
+
}, {
|
|
59
|
+
label: /*#__PURE__*/_react["default"].createElement("span", {
|
|
60
|
+
className: "".concat(prefix, "__option-text")
|
|
61
|
+
}, (0, _getLocale.getLocale)("Pro_detail_Attheametime"), /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
62
|
+
overlay: (0, _getLocale.getLocale)("Pro_detail_Tasksapproval"),
|
|
63
|
+
placement: "top",
|
|
64
|
+
zIndex: 15000
|
|
65
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
|
+
className: "".concat(prefix, "__icon tu-icon-wiki")
|
|
67
|
+
}))),
|
|
68
|
+
value: 2
|
|
69
|
+
}];
|
|
70
|
+
var OkrDeletePop = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
71
|
+
var onCancel = _ref.onCancel,
|
|
72
|
+
onConfirm = _ref.onConfirm,
|
|
73
|
+
approvalSetting = _ref.approvalSetting,
|
|
74
|
+
okrInfo = _ref.okrInfo;
|
|
75
|
+
|
|
76
|
+
var _useState = (0, _react.useState)(false),
|
|
59
77
|
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
-
|
|
61
|
-
|
|
78
|
+
showConfirmPop = _useState2[0],
|
|
79
|
+
setShowConfirmPop = _useState2[1];
|
|
62
80
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
onClick: function onClick() {
|
|
71
|
-
return setSelected(option.id);
|
|
72
|
-
}
|
|
73
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.Icon, {
|
|
74
|
-
className: selected == option.id ? "tu-icon-singlebox-avtive" : "tu-icon-singlebox-have"
|
|
75
|
-
}), /*#__PURE__*/_react["default"].createElement("p", null, option.text), option.tips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
76
|
-
overlay: option.tips,
|
|
77
|
-
placement: "top",
|
|
78
|
-
zIndex: 15000
|
|
79
|
-
}, /*#__PURE__*/_react["default"].createElement(_style.Icon, {
|
|
80
|
-
className: "tu-icon-warning"
|
|
81
|
-
})));
|
|
82
|
-
})), /*#__PURE__*/_react["default"].createElement(_style.ButtonGroup, null, /*#__PURE__*/_react["default"].createElement(_titaUi.Button, {
|
|
83
|
-
onClick: function onClick() {
|
|
81
|
+
var _useState3 = (0, _react.useState)(0),
|
|
82
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
83
|
+
selected = _useState4[0],
|
|
84
|
+
setSelected = _useState4[1];
|
|
85
|
+
|
|
86
|
+
var handleCancelClick = function handleCancelClick() {
|
|
87
|
+
if (onCancel) {
|
|
84
88
|
onCancel();
|
|
85
89
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
|
|
91
|
+
setShowConfirmPop(false);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var handleConfirmClick = function handleConfirmClick() {
|
|
95
|
+
if (onConfirm) {
|
|
96
|
+
onConfirm(selected);
|
|
90
97
|
}
|
|
91
|
-
}, (0, _getLocale.getLocale)("Pro_detail_Submission"))));
|
|
92
|
-
}
|
|
93
98
|
|
|
94
|
-
|
|
99
|
+
setShowConfirmPop(false);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
var show = function show() {
|
|
103
|
+
setShowConfirmPop(true);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
var hide = function hide() {
|
|
107
|
+
setShowConfirmPop(false);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var showApprovalCmp = (0, _react.useMemo)(function () {
|
|
111
|
+
return approvalSetting.isOpen && approvalSetting.deleteOkr && !okrInfo.OkrAndKrApprovalTypes.includes(53);
|
|
112
|
+
}, [approvalSetting, okrInfo]);
|
|
113
|
+
|
|
114
|
+
var handleChangeDeleteRadios = function handleChangeDeleteRadios(value) {
|
|
115
|
+
setSelected(value);
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
119
|
+
return {
|
|
120
|
+
show: show,
|
|
121
|
+
hide: hide
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
var renderDialogConfirm = (0, _react.useMemo)(function () {
|
|
125
|
+
return /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
126
|
+
zIndex: 1200,
|
|
127
|
+
visible: showConfirmPop,
|
|
128
|
+
type: "warning",
|
|
129
|
+
className: prefix
|
|
130
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
131
|
+
type: "title"
|
|
132
|
+
}, showApprovalCmp ? (0, _getLocale.getLocale)("OKR_MyO_Deleteoapproval") : (0, _getLocale.getLocale)("OKR_MyO_Determinedeletiono")), /*#__PURE__*/_react["default"].createElement("span", {
|
|
133
|
+
type: "content"
|
|
134
|
+
}, !showApprovalCmp && (0, _getLocale.getLocale)("OKR_MyO_Text_Odeletion"), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(Radios, {
|
|
135
|
+
radios: radios,
|
|
136
|
+
value: 0,
|
|
137
|
+
onChange: handleChangeDeleteRadios
|
|
138
|
+
}))), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"].CancelButton, {
|
|
139
|
+
type: "button",
|
|
140
|
+
onClick: handleCancelClick
|
|
141
|
+
}, (0, _getLocale.getLocale)("Mod_Cancel")), /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"].SureButton, {
|
|
142
|
+
type: "button",
|
|
143
|
+
onClick: handleConfirmClick
|
|
144
|
+
}, showApprovalCmp ? (0, _getLocale.getLocale)("OKR_MyO_Submittedapproval") : (0, _getLocale.getLocale)("Pro_detail_Submission")));
|
|
145
|
+
}, [showConfirmPop, selected]);
|
|
146
|
+
return renderDialogConfirm;
|
|
147
|
+
});
|
|
148
|
+
OkrDeletePop.defaultProps = {
|
|
149
|
+
onCancel: function onCancel() {}
|
|
150
|
+
};
|
|
151
|
+
var _default = OkrDeletePop;
|
|
95
152
|
exports["default"] = _default;
|