@titaui/pc 1.11.40-beta.1 → 1.11.40
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 +0 -1
- package/lib/components/avatar/name-avatar/index.js +13 -22
- package/lib/components/button/rect-btn/index.css +11 -45
- package/lib/components/button/rect-btn/index.js +6 -12
- package/lib/components/change-okr-modal/index.js +1 -2
- package/lib/components/checkbox/index.css +3 -3
- package/lib/components/create-okr-modal/index.js +41 -45
- 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 +1 -5
- package/lib/components/drawer/headerDrop.js +4 -42
- package/lib/components/drawer/index.css +0 -33
- package/lib/components/drawer/index.js +3 -26
- package/lib/components/dynamic/new-ui.css +4 -4
- package/lib/components/nav-top/index.js +2 -6
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
- package/lib/components/okr-detail/components/header/index.js +3 -10
- package/lib/components/okr-detail/components/header/o-name.js +3 -10
- package/lib/components/okr-detail/components/o-classify.js +1 -5
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +14 -13
- package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +39 -97
- package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
- package/lib/components/okr-detail/detail-header/index.css +0 -11
- package/lib/components/okr-detail/detail-header/index.js +234 -228
- package/lib/components/okr-detail/index.js +4 -21
- package/lib/components/okr-detail/okr-list/index.js +3 -8
- package/lib/components/okr-detail/request-apis.js +4 -10
- package/lib/components/okr-period-selector/index.js +5 -9
- package/lib/components/okr-period-selector/select-cycle.js +19 -23
- package/lib/components/operation-records/index.js +1 -1
- package/lib/components/operation-records/style.js +1 -1
- package/lib/components/task-relation-modal/request-api.js +1 -2
- package/lib/components/toast/index.js +3 -5
- package/lib/index.js +0 -40
- package/lib/pages/new-okr-list/header/index.css +0 -45
- package/lib/pages/new-okr-list/header/index.js +16 -38
- package/lib/pages/new-okr-list/index.js +1 -3
- package/lib/pages/new-okr-list/list/index.js +2 -19
- package/lib/pages/new-okr-list/request-api.js +2 -8
- package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
- package/lib/utils/format-time.js +1 -8
- package/lib/utils/open-data.js +1 -5
- package/package.json +1 -1
- package/lib/components/okr-detail/detail-header/constant.js +0 -53
- package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
- package/lib/components/okr-detail/helper.js +0 -108
- package/lib/components/textarea/index.css +0 -142
- package/lib/components/textarea/index.js +0 -259
- package/lib/pages/new-okr-list/header/common.js +0 -52
- package/lib/pages/new-okr-list/header/operate-record.js +0 -131
|
@@ -9,8 +9,6 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _helper = require("../okr-detail/helper");
|
|
13
|
-
|
|
14
12
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -46,9 +44,7 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
46
44
|
colorInDrop = _ref.colorInDrop,
|
|
47
45
|
hoverColorInDrop = _ref.hoverColorInDrop,
|
|
48
46
|
_onClick = _ref.onClick,
|
|
49
|
-
onClose = _ref.onClose
|
|
50
|
-
approvalSetting = _ref.approvalSetting,
|
|
51
|
-
detailInfo = _ref.detailInfo;
|
|
47
|
+
onClose = _ref.onClose;
|
|
52
48
|
|
|
53
49
|
var _useState = (0, _react.useState)(false),
|
|
54
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -56,37 +52,7 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
56
52
|
setHover = _useState2[1];
|
|
57
53
|
|
|
58
54
|
var hasIcon = !!icon && typeof icon === "string";
|
|
59
|
-
|
|
60
|
-
var OkrAndKrApprovalTypes = detailInfo === null || detailInfo === void 0 ? void 0 : detailInfo.OkrAndKrApprovalTypes;
|
|
61
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, icon === 'tu-icon-del' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _helper.getApprovalOkr)(approvalSetting, 'deleteOkr', applyState, OkrAndKrApprovalTypes) ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
|
-
className: "header-drop-item",
|
|
63
|
-
style: {
|
|
64
|
-
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
65
|
-
},
|
|
66
|
-
onClick: function onClick(e) {
|
|
67
|
-
_onClick && _onClick(e);
|
|
68
|
-
onClose(false);
|
|
69
|
-
},
|
|
70
|
-
onMouseOver: function onMouseOver() {
|
|
71
|
-
return setHover(true);
|
|
72
|
-
},
|
|
73
|
-
onMouseOut: function onMouseOut() {
|
|
74
|
-
return setHover(false);
|
|
75
|
-
}
|
|
76
|
-
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
77
|
-
className: "header-drop-item-icon",
|
|
78
|
-
style: {
|
|
79
|
-
color: hover ? hoverIconColorInDrop || hoverColorInDrop || hoverColor : iconColorInDrop || colorInDrop || color
|
|
80
|
-
}
|
|
81
|
-
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
|
-
className: icon
|
|
83
|
-
}) : icon), title) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
|
-
className: "header-drop-item-approval"
|
|
85
|
-
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
|
-
className: "header-drop-item-icon"
|
|
87
|
-
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
88
|
-
className: icon
|
|
89
|
-
}) : icon), title)) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
55
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
90
56
|
className: "header-drop-item",
|
|
91
57
|
style: {
|
|
92
58
|
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
@@ -108,23 +74,19 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
108
74
|
}
|
|
109
75
|
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
110
76
|
className: icon
|
|
111
|
-
}) : icon), title)
|
|
77
|
+
}) : icon), title);
|
|
112
78
|
};
|
|
113
79
|
|
|
114
80
|
var HeaderDrop = function HeaderDrop(_ref2) {
|
|
115
81
|
var visible = _ref2.visible,
|
|
116
82
|
onVisibleChange = _ref2.onVisibleChange,
|
|
117
83
|
items = _ref2.items,
|
|
118
|
-
children = _ref2.children
|
|
119
|
-
approvalSetting = _ref2.approvalSetting,
|
|
120
|
-
detailInfo = _ref2.detailInfo;
|
|
84
|
+
children = _ref2.children;
|
|
121
85
|
var renderDrop = (0, _react.useMemo)(function () {
|
|
122
86
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
87
|
className: "titaui-drawer-header-action-drop-wrapper"
|
|
124
88
|
}, items.map(function (item) {
|
|
125
89
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropItem, _extends({}, item, {
|
|
126
|
-
detailInfo: detailInfo,
|
|
127
|
-
approvalSetting: approvalSetting,
|
|
128
90
|
onClose: function onClose() {
|
|
129
91
|
return onVisibleChange(false);
|
|
130
92
|
}
|
|
@@ -164,39 +164,6 @@
|
|
|
164
164
|
background-repeat: no-repeat;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval {
|
|
168
|
-
height: 32px;
|
|
169
|
-
display: flex;
|
|
170
|
-
align-items: center;
|
|
171
|
-
padding: 0 23px;
|
|
172
|
-
cursor: pointer;
|
|
173
|
-
color: #BFC7D5;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon {
|
|
177
|
-
font-size: 18px;
|
|
178
|
-
color: inherit;
|
|
179
|
-
width: 18px;
|
|
180
|
-
height: 18px;
|
|
181
|
-
cursor: pointer;
|
|
182
|
-
margin-right: 10px;
|
|
183
|
-
background-size: contain;
|
|
184
|
-
background-position: center center;
|
|
185
|
-
background-repeat: no-repeat;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon > span {
|
|
189
|
-
display: flex;
|
|
190
|
-
align-items: center;
|
|
191
|
-
justify-content: center;
|
|
192
|
-
color: inherit;
|
|
193
|
-
width: 18px;
|
|
194
|
-
height: 18px;
|
|
195
|
-
background-size: contain;
|
|
196
|
-
background-position: center center;
|
|
197
|
-
background-repeat: no-repeat;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
167
|
.drawer-left .drawer-content-wrapper,
|
|
201
168
|
.drawer-right .drawer-content-wrapper,
|
|
202
169
|
.drawer-left .drawer-content,
|
|
@@ -25,9 +25,7 @@ require("./index.css");
|
|
|
25
25
|
|
|
26
26
|
var _context = _interopRequireDefault(require("../drawer-manager/context"));
|
|
27
27
|
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex", "autoClosable"];
|
|
28
|
+
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex"];
|
|
31
29
|
|
|
32
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
31
|
|
|
@@ -72,8 +70,6 @@ var Drawer = function Drawer(props) {
|
|
|
72
70
|
bodyStyle = props.bodyStyle,
|
|
73
71
|
_props$zIndex = props.zIndex,
|
|
74
72
|
zIndex = _props$zIndex === void 0 ? 1200 : _props$zIndex,
|
|
75
|
-
_props$autoClosable = props.autoClosable,
|
|
76
|
-
autoClosable = _props$autoClosable === void 0 ? false : _props$autoClosable,
|
|
77
73
|
rest = _objectWithoutProperties(props, _excluded);
|
|
78
74
|
|
|
79
75
|
var handleAfterVisibleChange = (0, _react.useCallback)(function (opened) {
|
|
@@ -93,20 +89,6 @@ var Drawer = function Drawer(props) {
|
|
|
93
89
|
return children;
|
|
94
90
|
}
|
|
95
91
|
|
|
96
|
-
var autoClose = function autoClose(e) {
|
|
97
|
-
if ((0, _dom.hasAncestorElement)(e.target, 'document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add')) return;
|
|
98
|
-
onClose();
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
(0, _react.useEffect)(function () {
|
|
102
|
-
if (autoClosable) {
|
|
103
|
-
document.addEventListener('mousedown', autoClose);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return function () {
|
|
107
|
-
document.removeEventListener('mousedown', autoClose);
|
|
108
|
-
};
|
|
109
|
-
}, []);
|
|
110
92
|
return /*#__PURE__*/_react["default"].createElement(DrawerContext.Provider, {
|
|
111
93
|
value: {
|
|
112
94
|
close: function close() {
|
|
@@ -141,10 +123,7 @@ function DrawerHeader(_ref) {
|
|
|
141
123
|
content = _ref.content,
|
|
142
124
|
style = _ref.style,
|
|
143
125
|
onClose = _ref.onClose,
|
|
144
|
-
actionComponent = _ref.actionComponent
|
|
145
|
-
onlyShowContent = _ref.onlyShowContent,
|
|
146
|
-
approvalSetting = _ref.approvalSetting,
|
|
147
|
-
detailInfo = _ref.detailInfo;
|
|
126
|
+
actionComponent = _ref.actionComponent;
|
|
148
127
|
var drawer = (0, _react.useContext)(DrawerContext);
|
|
149
128
|
var manager = (0, _react.useContext)(_context["default"]);
|
|
150
129
|
var showClose = closable && (!!onClose || !!drawer);
|
|
@@ -173,11 +152,9 @@ function DrawerHeader(_ref) {
|
|
|
173
152
|
style: {
|
|
174
153
|
flex: 1
|
|
175
154
|
}
|
|
176
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null,
|
|
155
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
|
|
177
156
|
return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
|
|
178
157
|
}), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
|
|
179
|
-
approvalSetting: approvalSetting,
|
|
180
|
-
detailInfo: detailInfo,
|
|
181
158
|
title: (0, _getLocale.getLocale)('Mod_MoreOperate'),
|
|
182
159
|
icon: "tu-icon-10",
|
|
183
160
|
children: collapsedActions
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.titaui-new-ui-dynamic__no-more-data::before {
|
|
132
|
-
content:
|
|
132
|
+
content: "";
|
|
133
133
|
display: inline-block;
|
|
134
134
|
margin-right: 12px;
|
|
135
135
|
width: 192px;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.titaui-new-ui-dynamic__no-more-data::after {
|
|
142
|
-
content:
|
|
142
|
+
content: "";
|
|
143
143
|
display: inline-block;
|
|
144
144
|
margin-left: 12px;
|
|
145
145
|
width: 192px;
|
|
@@ -150,8 +150,8 @@
|
|
|
150
150
|
|
|
151
151
|
.titaui-new-ui-dynamic__go-to-top {
|
|
152
152
|
position: fixed;
|
|
153
|
-
bottom:
|
|
154
|
-
right:
|
|
153
|
+
bottom: 128px;
|
|
154
|
+
right: 24px;
|
|
155
155
|
display: flex;
|
|
156
156
|
align-items: center;
|
|
157
157
|
justify-content: center;
|
|
@@ -15,8 +15,6 @@ 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
|
-
|
|
20
18
|
var _menu = _interopRequireDefault(require("./components/menu"));
|
|
21
19
|
|
|
22
20
|
var _userMessage = _interopRequireDefault(require("./components/user-message"));
|
|
@@ -172,7 +170,5 @@ var NavTop = function NavTop() {
|
|
|
172
170
|
}, /*#__PURE__*/_react["default"].createElement(_userOwnMenu["default"], null)));
|
|
173
171
|
};
|
|
174
172
|
|
|
175
|
-
var _default = NavTop;
|
|
176
|
-
|
|
177
|
-
exports["default"] = _default;
|
|
178
|
-
NavTop.useGlobalValue = _useGlobalValue["default"];
|
|
173
|
+
var _default = NavTop;
|
|
174
|
+
exports["default"] = _default;
|
|
@@ -13,10 +13,6 @@ 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
|
-
|
|
20
16
|
require("./index.css");
|
|
21
17
|
|
|
22
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -44,22 +40,14 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
44
40
|
_ref$canEdit = _ref.canEdit,
|
|
45
41
|
canEdit = _ref$canEdit === void 0 ? false : _ref$canEdit;
|
|
46
42
|
|
|
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
|
-
|
|
53
43
|
var _useState = (0, _react.useState)(false),
|
|
54
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
55
45
|
isFocus = _useState2[0],
|
|
56
46
|
setIsFocus = _useState2[1];
|
|
57
47
|
|
|
58
48
|
var handleButtonFocus = (0, _react.useCallback)(function () {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
}, [canCycleEdit]);
|
|
49
|
+
canEdit && setIsFocus(true);
|
|
50
|
+
}, [canEdit]);
|
|
63
51
|
var handleButtonBlur = (0, _react.useCallback)(function () {
|
|
64
52
|
setIsFocus(false);
|
|
65
53
|
}, []);
|
|
@@ -69,10 +57,9 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
69
57
|
clickCallback = _ref2.clickCallback,
|
|
70
58
|
text = _ref2.text;
|
|
71
59
|
return /*#__PURE__*/_react["default"].createElement("button", {
|
|
72
|
-
type: "button",
|
|
73
60
|
onFocus: handleButtonFocus,
|
|
74
61
|
onBlur: handleButtonBlur,
|
|
75
|
-
className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!
|
|
62
|
+
className: "base-info-date-cycle__button ".concat(isFocus ? "base-info-date-cycle__button--focus" : "", " ").concat(!canEdit && "base-info-date-cycle__button--disable"),
|
|
76
63
|
ref: btnRef,
|
|
77
64
|
onClick: clickCallback
|
|
78
65
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -91,13 +78,10 @@ var DateCycle = function DateCycle(_ref) {
|
|
|
91
78
|
cycle: cycle,
|
|
92
79
|
setCycle: setCycle,
|
|
93
80
|
okrId: okrId,
|
|
94
|
-
canEdit:
|
|
81
|
+
canEdit: canEdit,
|
|
95
82
|
getCycleRange: true
|
|
96
83
|
}));
|
|
97
84
|
};
|
|
98
85
|
|
|
99
|
-
DateCycle.defaultProps = {
|
|
100
|
-
canEdit: false
|
|
101
|
-
};
|
|
102
86
|
var _default = DateCycle;
|
|
103
87
|
exports["default"] = _default;
|
|
@@ -21,10 +21,6 @@ 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
|
-
|
|
28
24
|
require("./index.css");
|
|
29
25
|
|
|
30
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -64,10 +60,6 @@ var Principal = function Principal(_ref) {
|
|
|
64
60
|
selectUser = _useState2[0],
|
|
65
61
|
setSelectUser = _useState2[1];
|
|
66
62
|
|
|
67
|
-
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
68
|
-
okrInfo = _useContext.okrInfo,
|
|
69
|
-
approvalSetting = _useContext.approvalSetting;
|
|
70
|
-
|
|
71
63
|
var handleSelected = function handleSelected(_ref2) {
|
|
72
64
|
var _ref3 = _slicedToArray(_ref2, 1),
|
|
73
65
|
user = _ref3[0];
|
|
@@ -122,7 +114,7 @@ var Principal = function Principal(_ref) {
|
|
|
122
114
|
}, (0, _getLocale.getLocale)("Mod_Owner")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
115
|
className: "base-info-other-infos__principal-user",
|
|
124
116
|
ref: selectUserRef
|
|
125
|
-
}, canEdit
|
|
117
|
+
}, canEdit ? /*#__PURE__*/_react["default"].createElement(_popConfirm["default"], {
|
|
126
118
|
ref: popConfirmRef,
|
|
127
119
|
showArrow: false,
|
|
128
120
|
style: {
|
|
@@ -31,8 +31,6 @@ var _progress = _interopRequireDefault(require("../../../progress"));
|
|
|
31
31
|
|
|
32
32
|
var _utils = require("../../../progress/utils");
|
|
33
33
|
|
|
34
|
-
var _helper = require("../../helper");
|
|
35
|
-
|
|
36
34
|
var _tooltip = _interopRequireDefault(require("../../../tooltip"));
|
|
37
35
|
|
|
38
36
|
var _auth = require("../../../../utils/auth");
|
|
@@ -87,8 +85,6 @@ function Header(props) {
|
|
|
87
85
|
setGeneralOkrClassify = _useContext.setGeneralOkrClassify,
|
|
88
86
|
showOkrEvalute = _useContext.showOkrEvalute;
|
|
89
87
|
|
|
90
|
-
var commonContext = (0, _react.useContext)(_context.CommonContext);
|
|
91
|
-
var approvalSetting = commonContext.approvalSetting;
|
|
92
88
|
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;
|
|
93
89
|
var _okrInfo$progressGrow = okrInfo.progressGrow,
|
|
94
90
|
progressGrow = _okrInfo$progressGrow === void 0 ? 0 : _okrInfo$progressGrow,
|
|
@@ -160,7 +156,7 @@ function Header(props) {
|
|
|
160
156
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
157
|
className: "".concat(precls, "__avatar")
|
|
162
158
|
}, /*#__PURE__*/_react["default"].createElement(_oAvatar["default"], {
|
|
163
|
-
editable: editable
|
|
159
|
+
editable: editable,
|
|
164
160
|
okrId: okrInfo.workId
|
|
165
161
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
166
162
|
className: "".concat(precls, "__content")
|
|
@@ -168,10 +164,7 @@ function Header(props) {
|
|
|
168
164
|
editable: editable,
|
|
169
165
|
okrName: okrName,
|
|
170
166
|
setIsEdit: setIsEdit,
|
|
171
|
-
okrStatus: okrInfo
|
|
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
|
|
167
|
+
okrStatus: okrInfo.status
|
|
175
168
|
}, /*#__PURE__*/_react["default"].createElement(_oClassify["default"], {
|
|
176
169
|
editable: editable,
|
|
177
170
|
okrId: okrInfo.workId,
|
|
@@ -194,7 +187,7 @@ function Header(props) {
|
|
|
194
187
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
195
188
|
className: "".concat(precls, "__action-item")
|
|
196
189
|
}, /*#__PURE__*/_react["default"].createElement(_oCycle["default"], {
|
|
197
|
-
editable: editable
|
|
190
|
+
editable: editable,
|
|
198
191
|
okrId: okrInfo.workId
|
|
199
192
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
200
193
|
className: "".concat(precls, "__action-item")
|
|
@@ -13,8 +13,6 @@ var _getLocale = require("../../../../utils/getLocale");
|
|
|
13
13
|
|
|
14
14
|
var _tools = require("../../../../utils/tools");
|
|
15
15
|
|
|
16
|
-
var _helper = require("../../helper");
|
|
17
|
-
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
17
|
|
|
20
18
|
function OName(props) {
|
|
@@ -22,16 +20,11 @@ function OName(props) {
|
|
|
22
20
|
okrName = props.okrName,
|
|
23
21
|
setIsEdit = props.setIsEdit,
|
|
24
22
|
okrStatus = props.okrStatus,
|
|
25
|
-
children = props.children
|
|
26
|
-
approvalSetting = props.approvalSetting,
|
|
27
|
-
applyState = props.applyState,
|
|
28
|
-
OkrAndKrApprovalTypes = props.OkrAndKrApprovalTypes;
|
|
23
|
+
children = props.children;
|
|
29
24
|
|
|
30
25
|
var handleEditClick = function handleEditClick() {
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
setIsEdit(true);
|
|
34
|
-
}
|
|
26
|
+
if (editable) {
|
|
27
|
+
setIsEdit(true);
|
|
35
28
|
}
|
|
36
29
|
};
|
|
37
30
|
|
|
@@ -47,8 +47,6 @@ 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
|
-
|
|
52
50
|
var _getLocale = require("../../../../../../utils/getLocale");
|
|
53
51
|
|
|
54
52
|
require("./index.css");
|
|
@@ -101,8 +99,7 @@ function _default(props) {
|
|
|
101
99
|
|
|
102
100
|
var _useContext = (0, _react.useContext)(_context2.CommonContext),
|
|
103
101
|
refreshAll = _useContext.refreshAll,
|
|
104
|
-
okrInfo = _useContext.okrInfo
|
|
105
|
-
approvalSetting = _useContext.approvalSetting;
|
|
102
|
+
okrInfo = _useContext.okrInfo;
|
|
106
103
|
|
|
107
104
|
var _useState = (0, _react.useState)(data.confidenceIndex),
|
|
108
105
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -223,13 +220,17 @@ function _default(props) {
|
|
|
223
220
|
updateProgressWay: updateProgressWay
|
|
224
221
|
}).then(function (res) {
|
|
225
222
|
if (res.Code == 1) {
|
|
226
|
-
_toast["default"].Success(
|
|
223
|
+
_toast["default"].Success("修改成功", {
|
|
224
|
+
top: 60
|
|
225
|
+
});
|
|
227
226
|
|
|
228
227
|
refreshAll();
|
|
229
228
|
updateKrs();
|
|
230
229
|
setKrModalVsible(false);
|
|
231
230
|
} else {
|
|
232
|
-
_toast["default"].Error(res.Message
|
|
231
|
+
_toast["default"].Error(res.Message, {
|
|
232
|
+
top: 60
|
|
233
|
+
});
|
|
233
234
|
}
|
|
234
235
|
});
|
|
235
236
|
};
|
|
@@ -251,7 +252,7 @@ function _default(props) {
|
|
|
251
252
|
setDeleteModalVisible(false);
|
|
252
253
|
|
|
253
254
|
if (!Message) {
|
|
254
|
-
_toast["default"].Success((0, _getLocale.getLocale)("
|
|
255
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Pro_detail_Deletsuccess"));
|
|
255
256
|
|
|
256
257
|
setTimeout(function () {
|
|
257
258
|
refreshAll();
|
|
@@ -280,7 +281,7 @@ function _default(props) {
|
|
|
280
281
|
workId: data.workId,
|
|
281
282
|
workMileStoneId: data.mileStoneId
|
|
282
283
|
}).then(function () {
|
|
283
|
-
_toast["default"].Success(
|
|
284
|
+
_toast["default"].Success("修改成功");
|
|
284
285
|
});
|
|
285
286
|
};
|
|
286
287
|
|
|
@@ -315,7 +316,7 @@ function _default(props) {
|
|
|
315
316
|
}, "KR", index + 1), /*#__PURE__*/_react["default"].createElement("span", {
|
|
316
317
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-title"))
|
|
317
318
|
}, /*#__PURE__*/_react["default"].createElement(_editableInput["default"], {
|
|
318
|
-
editable: krCanEdit
|
|
319
|
+
editable: krCanEdit,
|
|
319
320
|
defaultValue: krName,
|
|
320
321
|
emptyMessage: "KR\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",
|
|
321
322
|
onKeyDown: onKrNameChangeHandler,
|
|
@@ -329,10 +330,10 @@ function _default(props) {
|
|
|
329
330
|
name: user.name,
|
|
330
331
|
id: user.userId,
|
|
331
332
|
width: 68,
|
|
332
|
-
editable: krCanEdit
|
|
333
|
+
editable: krCanEdit,
|
|
333
334
|
onEditUser: onEditUserHandler,
|
|
334
335
|
nameTips: function nameTips(name) {
|
|
335
|
-
return /*#__PURE__*/_react["default"].createElement("span", null,
|
|
336
|
+
return /*#__PURE__*/_react["default"].createElement("span", null, "\u8D1F\u8D23\u4EBA\uFF1A", name);
|
|
336
337
|
}
|
|
337
338
|
})), showKrWeight && /*#__PURE__*/_react["default"].createElement(OkrRowColumn, {
|
|
338
339
|
width: 60,
|
|
@@ -348,7 +349,7 @@ function _default(props) {
|
|
|
348
349
|
marginLeft: 16
|
|
349
350
|
}, /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
|
|
350
351
|
data: data,
|
|
351
|
-
editable: krCanEdit
|
|
352
|
+
editable: krCanEdit
|
|
352
353
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
353
354
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-actions"))
|
|
354
355
|
}, showHeart && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -377,7 +378,7 @@ function _default(props) {
|
|
|
377
378
|
evaluateValue: evaluateValue,
|
|
378
379
|
setEvaluateValue: onEvaluateChangeHanler,
|
|
379
380
|
isEvaluate: isEvaluate
|
|
380
|
-
})), krCanEdit &&
|
|
381
|
+
})), krCanEdit && /*#__PURE__*/_react["default"].createElement("div", {
|
|
381
382
|
className: (0, _classnames["default"])("".concat(_precls["default"], "__kr-node-delete")),
|
|
382
383
|
onClick: function onClick() {
|
|
383
384
|
return setDeleteModalVisible(true);
|