@titaui/pc 1.11.18 → 1.11.21-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 +25 -11
- package/lib/components/button/rect-btn/index.js +8 -4
- package/lib/components/communication/index.js +30 -29
- 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/dynamic/dynamic-item/components/feed-operate/index.css +0 -2
- package/lib/components/mblog/index.js +31 -30
- 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 +12 -1
- 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-flow/child-node/index.css +2 -1
- package/lib/components/okr-flow/export-modal/index.js +2 -2
- package/lib/components/okr-flow/okr-map/index.js +2 -2
- package/lib/components/okr-flow/utils/index.js +5 -6
- package/lib/components/okr-period-selector/select-cycle.js +23 -19
- package/lib/components/period-selector/index.css +6 -0
- package/lib/components/period-selector/index.js +1 -1
- package/lib/components/scroll-container/index.js +423 -0
- package/lib/components/scroll-container/style.css +35 -0
- package/lib/components/superset-charts/components/chart/index.js +1 -1
- package/lib/components/textarea/index.css +120 -0
- package/lib/components/textarea/index.js +257 -0
- package/lib/index.js +48 -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/pages/okr-map/export-modules/okr-map/header/index.css +1 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +24 -12
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +51 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +20 -12
- package/lib/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- package/package.json +2 -1
|
@@ -58,7 +58,10 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
58
58
|
onDelUser = props.onDelUser,
|
|
59
59
|
_props$textWidth = props.textWidth,
|
|
60
60
|
textWidth = _props$textWidth === void 0 ? 42 : _props$textWidth,
|
|
61
|
-
textClass = props.textClass
|
|
61
|
+
textClass = props.textClass,
|
|
62
|
+
renderRightTopCmp = props.renderRightTopCmp,
|
|
63
|
+
_props$avatarTips = props.avatarTips,
|
|
64
|
+
avatarTips = _props$avatarTips === void 0 ? '' : _props$avatarTips;
|
|
62
65
|
var hasAvatar = src && !src.match(/default\w*.jpg$/);
|
|
63
66
|
|
|
64
67
|
var _useState = (0, _react.useState)(false),
|
|
@@ -103,7 +106,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
103
106
|
style: {
|
|
104
107
|
width: size.width,
|
|
105
108
|
height: size.width,
|
|
106
|
-
verticalAlign:
|
|
109
|
+
verticalAlign: 'top'
|
|
107
110
|
},
|
|
108
111
|
src: src
|
|
109
112
|
});
|
|
@@ -120,11 +123,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
120
123
|
}
|
|
121
124
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
125
|
style: {
|
|
123
|
-
display:
|
|
126
|
+
display: 'inline-block',
|
|
124
127
|
width: "".concat(size.fontSize, "px"),
|
|
125
|
-
margin:
|
|
126
|
-
overflow:
|
|
127
|
-
whiteSpace:
|
|
128
|
+
margin: '0 auto',
|
|
129
|
+
overflow: 'hidden',
|
|
130
|
+
whiteSpace: 'nowrap',
|
|
128
131
|
fontSize: "".concat(size.fontSize, "px"),
|
|
129
132
|
lineHeight: "".concat(size.width, "px")
|
|
130
133
|
}
|
|
@@ -134,7 +137,7 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
134
137
|
})));
|
|
135
138
|
}
|
|
136
139
|
|
|
137
|
-
var cuttedName =
|
|
140
|
+
var cuttedName = '';
|
|
138
141
|
var cuttedNameLen = 0;
|
|
139
142
|
|
|
140
143
|
for (var i = 0, lent = name.length; i < lent; i++) {
|
|
@@ -167,11 +170,11 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
167
170
|
className: "titaui-pc-avator__name-avatar-container",
|
|
168
171
|
onMouseEnter: handleMouseEnter,
|
|
169
172
|
onMouseLeave: handleMouseLeave
|
|
170
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
|
+
}, renderRightTopCmp, /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
174
|
onClick: handleDelUser,
|
|
172
175
|
onMouseLeave: handleCloseIconMouseLeave,
|
|
173
176
|
onMouseEnter: handleCloseIconMouseEnter,
|
|
174
|
-
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ?
|
|
177
|
+
className: "titaui-pc-avator__delete-wrapper ".concat(canDelUser && mouseIsEnterUser ? 'titaui-pc-avator--enter' : ''),
|
|
175
178
|
style: {
|
|
176
179
|
left: "".concat(size.width - 14, "px")
|
|
177
180
|
}
|
|
@@ -185,7 +188,10 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
185
188
|
onClick: onClick,
|
|
186
189
|
onMouseEnter: onMouseEnter,
|
|
187
190
|
onMouseLeave: onMouseLeave
|
|
188
|
-
},
|
|
191
|
+
}, avatarTips && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
192
|
+
overlay: avatarTips,
|
|
193
|
+
placement: "top"
|
|
194
|
+
}, hasAvatar ? renderImgAvatar() : renderTextAvatar()), !avatarTips && (hasAvatar ? renderImgAvatar() : renderTextAvatar())), showNameTips && isNameOverflow ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
189
195
|
overlay: /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
190
196
|
name: name,
|
|
191
197
|
id: userId
|
|
@@ -194,14 +200,17 @@ var NameAvatar = function NameAvatar(props) {
|
|
|
194
200
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
195
201
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
196
202
|
style: {
|
|
197
|
-
|
|
203
|
+
maxWidth: textWidth
|
|
198
204
|
}
|
|
199
205
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
200
206
|
ref: textRef
|
|
201
|
-
},
|
|
207
|
+
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
208
|
+
name: name,
|
|
209
|
+
id: userId
|
|
210
|
+
})))) : /*#__PURE__*/_react["default"].createElement("span", {
|
|
202
211
|
className: "titaui-pc-avator__name ".concat(textClass),
|
|
203
212
|
style: {
|
|
204
|
-
|
|
213
|
+
maxWidth: textWidth
|
|
205
214
|
}
|
|
206
215
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
207
216
|
ref: textRef
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
align-items: center;
|
|
14
14
|
justify-content: center;
|
|
15
15
|
min-width: 64px;
|
|
16
|
-
font-size:
|
|
16
|
+
font-size: 14px;
|
|
17
17
|
padding: 0 12px;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -60,21 +60,35 @@
|
|
|
60
60
|
background: #5c8eff;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
.titaui-rect-btn--secondary {
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
font-weight: normal;
|
|
66
|
+
color: #2879ff;
|
|
67
|
+
line-height: 28px;
|
|
68
|
+
background: rgba(40, 121, 255, 0.2);
|
|
69
|
+
margin-right: 16px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.titaui-rect-btn--secondary:hover {
|
|
73
|
+
color: #fff;
|
|
74
|
+
background-color: #2879ff;
|
|
75
|
+
}
|
|
76
|
+
|
|
63
77
|
.titaui-rect-btn--cancel {
|
|
64
|
-
color: #
|
|
65
|
-
border: 1px solid #
|
|
66
|
-
background: #
|
|
78
|
+
color: #6f7886;
|
|
79
|
+
border: 1px solid #dfe3ea;
|
|
80
|
+
background: #ffffff;
|
|
67
81
|
}
|
|
68
82
|
|
|
69
83
|
.titaui-rect-btn--cancel:hover {
|
|
70
|
-
color: #
|
|
71
|
-
border: 1px solid #
|
|
84
|
+
color: #2879ff;
|
|
85
|
+
border: 1px solid #2879ff;
|
|
72
86
|
}
|
|
73
87
|
|
|
74
88
|
.titaui-rect-btn--delete {
|
|
75
|
-
background: #
|
|
76
|
-
color: #
|
|
77
|
-
border: 1px solid #
|
|
89
|
+
background: #ffffff;
|
|
90
|
+
color: #f05e5e;
|
|
91
|
+
border: 1px solid #f05e5e;
|
|
78
92
|
}
|
|
79
93
|
|
|
80
94
|
.titaui-rect-btn--delete:hover {
|
|
@@ -93,10 +107,10 @@
|
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled {
|
|
96
|
-
background: #
|
|
110
|
+
background: #93bcff;
|
|
97
111
|
opacity: 1;
|
|
98
112
|
}
|
|
99
113
|
|
|
100
114
|
.titaui-rect-btn--primary.titaui-rect-btn--disabled:hover {
|
|
101
|
-
background: #
|
|
115
|
+
background: #93bcff;
|
|
102
116
|
}
|
|
@@ -34,7 +34,8 @@ function RectBtn(props) {
|
|
|
34
34
|
className = _props$className === void 0 ? "" : _props$className,
|
|
35
35
|
_props$disabled = props.disabled,
|
|
36
36
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
37
|
-
style = props.style
|
|
37
|
+
style = props.style,
|
|
38
|
+
children = props.children;
|
|
38
39
|
|
|
39
40
|
var renderIcon = function renderIcon() {
|
|
40
41
|
if (typeof icon === "string") {
|
|
@@ -50,16 +51,19 @@ function RectBtn(props) {
|
|
|
50
51
|
}, icon);
|
|
51
52
|
};
|
|
52
53
|
|
|
53
|
-
var onClickHandler = function onClickHandler() {
|
|
54
|
+
var onClickHandler = function onClickHandler(e) {
|
|
54
55
|
if (disabled) return;
|
|
55
|
-
|
|
56
|
+
|
|
57
|
+
if (onClick) {
|
|
58
|
+
onClick(e);
|
|
59
|
+
}
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
59
63
|
className: (0, _classnames["default"])(precls, "".concat(precls, "--").concat(type), "".concat(precls, "--").concat(size), _defineProperty({}, "".concat(precls, "--disabled"), disabled), className),
|
|
60
64
|
style: style,
|
|
61
65
|
onClick: onClickHandler
|
|
62
|
-
}, icon && renderIcon(),
|
|
66
|
+
}, icon && renderIcon(), children || text);
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
var _default = RectBtn;
|
|
@@ -71,7 +71,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
71
71
|
|
|
72
72
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
73
73
|
|
|
74
|
-
var prefix =
|
|
74
|
+
var prefix = 'titaui-communication';
|
|
75
75
|
|
|
76
76
|
var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
77
77
|
_inherits(Communication, _PureComponent);
|
|
@@ -90,14 +90,14 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
90
90
|
commentType = _this$props.commentType,
|
|
91
91
|
okrFeedParams = _this$props.okrFeedParams;
|
|
92
92
|
var url = commentType == 1 ? (0, _requestV.getApiUrl2)("comment/Get?feed_id=".concat(feedId, "&comment_type=0")) : (0, _requestV.getApiUrl)("okr/cycle/getFeed?objId=".concat(okrFeedParams && okrFeedParams.objId, "&objType=").concat(okrFeedParams && okrFeedParams.objType, "&cycleType=").concat(okrFeedParams && okrFeedParams.cycleType, "&yqmNum=").concat(okrFeedParams && okrFeedParams.yqmNum, "&annualNum=").concat(okrFeedParams && okrFeedParams.annualNum, "&commentCount=").concat(commentCount));
|
|
93
|
-
(0, _requestV.taker)(url,
|
|
93
|
+
(0, _requestV.taker)(url, 'GET').then(function (res) {
|
|
94
94
|
if (res.Code === 1) {
|
|
95
95
|
var data = res.Data && (res.Data.feedComments || res.Data);
|
|
96
96
|
|
|
97
97
|
_this.setState({
|
|
98
98
|
communicationTrackList: data.comments ? data.comments : [],
|
|
99
99
|
communicationTrackTotal: data.total,
|
|
100
|
-
okrCommentFeedId: commentType === 2 ? res.Data.feedId :
|
|
100
|
+
okrCommentFeedId: commentType === 2 ? res.Data.feedId : ''
|
|
101
101
|
});
|
|
102
102
|
} else {
|
|
103
103
|
_this.setState({
|
|
@@ -137,10 +137,10 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
137
137
|
|
|
138
138
|
var communicationTrackList = _toConsumableArray(_this.state.communicationTrackList);
|
|
139
139
|
|
|
140
|
-
if (actionType ===
|
|
140
|
+
if (actionType === 'delete') {
|
|
141
141
|
// 删除
|
|
142
142
|
var url = (0, _requestV.getApiUrl2)("comment/Delete?comment_id=".concat(communicationTrackList[index].commentId, "&feed_id=").concat(feedId || _this.state.okrCommentFeedId));
|
|
143
|
-
(0, _requestV.taker)(url,
|
|
143
|
+
(0, _requestV.taker)(url, 'DELETE').then(function (res) {
|
|
144
144
|
if (res.Code === 1) {
|
|
145
145
|
isShowAllCommunicationRecord ? _this.getFeedInfo(feedId, communicationTrackTotal - 1) : _this.getFeedInfo(feedId, commentCount);
|
|
146
146
|
|
|
@@ -151,7 +151,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
-
} else if (actionType ===
|
|
154
|
+
} else if (actionType === 'reply') {
|
|
155
155
|
// 沟通里的回复
|
|
156
156
|
if (_this.props.useCustomMblog && _this.props.onComment) {
|
|
157
157
|
_this.props.onComment({
|
|
@@ -178,7 +178,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
178
178
|
isShowDefaultInput: false,
|
|
179
179
|
needAutoFocus: true
|
|
180
180
|
});
|
|
181
|
-
} else if (actionType ===
|
|
181
|
+
} else if (actionType === 'praise') {
|
|
182
182
|
// 沟通里的点赞
|
|
183
183
|
var isPraise = communicationTrackList[index].isPraise;
|
|
184
184
|
isPraise = !isPraise;
|
|
@@ -189,7 +189,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
189
189
|
|
|
190
190
|
var _url = isPraise ? (0, _requestV.getApiUrl)("praise/add?objId=".concat(communicationTrackList[index].commentId, "&objType=19&praiseType=1")) : (0, _requestV.getApiUrl)("praise/cancel?objId=".concat(communicationTrackList[index].commentId, "&objType=19"));
|
|
191
191
|
|
|
192
|
-
(0, _requestV.taker)(_url,
|
|
192
|
+
(0, _requestV.taker)(_url, 'POST').then(function (res) {
|
|
193
193
|
if (res.Code === 1) {
|
|
194
194
|
var praiseTotal = communicationTrackList[index].praiseTotal;
|
|
195
195
|
communicationTrackList[index].isPraise = isPraise;
|
|
@@ -205,7 +205,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
|
-
} else if (actionType ===
|
|
208
|
+
} else if (actionType === 'showPraiseRecord') {
|
|
209
209
|
// 显示点赞记录
|
|
210
210
|
_this.setState({
|
|
211
211
|
isShowPraiseRecordPop: true,
|
|
@@ -241,13 +241,13 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
241
241
|
communicationTrackTotal = _this$state3.communicationTrackTotal,
|
|
242
242
|
isShowAllCommunicationRecord = _this$state3.isShowAllCommunicationRecord;
|
|
243
243
|
|
|
244
|
-
if (submitType ===
|
|
244
|
+
if (submitType === 'submit') {
|
|
245
245
|
// 发送
|
|
246
246
|
sentData.FeedId = feedId;
|
|
247
247
|
sentData.CommentId = 0;
|
|
248
248
|
sentData.ObjId = 0;
|
|
249
249
|
sentData.ObjType = 0;
|
|
250
|
-
sentData.Content = sentData.Content ||
|
|
250
|
+
sentData.Content = sentData.Content || ' ';
|
|
251
251
|
|
|
252
252
|
if (isShowReplyToUser) {
|
|
253
253
|
sentData.CommentId = replyUserCommentId;
|
|
@@ -257,8 +257,8 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
257
257
|
submitStatus: 2
|
|
258
258
|
});
|
|
259
259
|
|
|
260
|
-
var url = commentType === 1 ? (0, _requestV.getApiUrl2)(
|
|
261
|
-
(0, _requestV.taker)(url,
|
|
260
|
+
var url = commentType === 1 ? (0, _requestV.getApiUrl2)('comment/Add') : (0, _requestV.getApiUrl)("okr/cycle/addComment?objId=".concat(okrFeedParams && okrFeedParams.objId, "&objType=").concat(okrFeedParams && okrFeedParams.objType, "&cycleType=").concat(okrFeedParams && okrFeedParams.cycleType, "&yqmNum=").concat(okrFeedParams && okrFeedParams.yqmNum, "&annualNum=").concat(okrFeedParams && okrFeedParams.annualNum));
|
|
261
|
+
(0, _requestV.taker)(url, 'POST', sentData).then(function (res) {
|
|
262
262
|
if (res.Code === 1) {
|
|
263
263
|
isShowAllCommunicationRecord ? _this.getFeedInfo(feedId, communicationTrackTotal + 1) : _this.getFeedInfo(feedId, commentCount);
|
|
264
264
|
|
|
@@ -313,17 +313,17 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
313
313
|
isShowAllCommunicationRecord: false,
|
|
314
314
|
// 是否显示所有记录
|
|
315
315
|
// 回复
|
|
316
|
-
replyUser:
|
|
317
|
-
replyUserId:
|
|
318
|
-
replyUserCommentId:
|
|
316
|
+
replyUser: '',
|
|
317
|
+
replyUserId: '',
|
|
318
|
+
replyUserCommentId: '0',
|
|
319
319
|
isShowReplyToUser: false,
|
|
320
320
|
// 是否显示回复谁
|
|
321
321
|
submitStatus: 0,
|
|
322
322
|
praiseStatus: 0,
|
|
323
323
|
// 点赞记录
|
|
324
|
-
praiseObjId:
|
|
324
|
+
praiseObjId: '',
|
|
325
325
|
isShowPraiseRecordPop: false,
|
|
326
|
-
okrCommentFeedId:
|
|
326
|
+
okrCommentFeedId: '',
|
|
327
327
|
isShowDefaultInput: showDefaultInput && communicationLength !== 0 ? true : false,
|
|
328
328
|
needAutoFocus: false
|
|
329
329
|
};
|
|
@@ -389,9 +389,9 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
389
389
|
commentCount = _this$props7.commentCount,
|
|
390
390
|
useCustomMblog = _this$props7.useCustomMblog,
|
|
391
391
|
_this$props7$submitTe = _this$props7.submitText,
|
|
392
|
-
submitText = _this$props7$submitTe === void 0 ? (0, _getLocale.getLocale)(
|
|
392
|
+
submitText = _this$props7$submitTe === void 0 ? (0, _getLocale.getLocale)('Mod_Reply') : _this$props7$submitTe,
|
|
393
393
|
_this$props7$highLigh = _this$props7.highLightKeyWord,
|
|
394
|
-
highLightKeyWord = _this$props7$highLigh === void 0 ?
|
|
394
|
+
highLightKeyWord = _this$props7$highLigh === void 0 ? '' : _this$props7$highLigh,
|
|
395
395
|
_this$props7$autoFocu = _this$props7.autoFocus,
|
|
396
396
|
autoFocus = _this$props7$autoFocu === void 0 ? false : _this$props7$autoFocu,
|
|
397
397
|
_this$props7$showUser = _this$props7.showUser,
|
|
@@ -404,10 +404,10 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
404
404
|
onMouseDown: function onMouseDown() {
|
|
405
405
|
return _this2.handlerSwitchShowRecord();
|
|
406
406
|
}
|
|
407
|
-
}, (0, _getLocale.getLocale)(
|
|
407
|
+
}, (0, _getLocale.getLocale)('Mod_Allcommu'), "\xA0", /*#__PURE__*/_react["default"].createElement("span", null, communicationTrackTotal), communicationTrackTotal > commentCount && /*#__PURE__*/_react["default"].createElement("i", {
|
|
408
408
|
className: (0, _classnames["default"])("".concat(prefix, "__communication-total-icon"), {
|
|
409
|
-
|
|
410
|
-
|
|
409
|
+
'tu-icon-APP-xi': !isShowAllCommunicationRecord,
|
|
410
|
+
'tu-icon-arrow-down1': isShowAllCommunicationRecord
|
|
411
411
|
})
|
|
412
412
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
413
413
|
className: (0, _classnames["default"])(_defineProperty({}, "".concat(prefix, "__communication-list"), communicationTrackList.length > 0))
|
|
@@ -432,12 +432,12 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
432
432
|
}))), !useCustomMblog && /*#__PURE__*/_react["default"].createElement("div", {
|
|
433
433
|
className: "".concat(prefix, "__reply-container")
|
|
434
434
|
}, isShowReplyToUser && /*#__PURE__*/_react["default"].createElement(_style.ReplyToUser, {
|
|
435
|
-
height: isShowReplyToUser ?
|
|
436
|
-
padding: isShowReplyToUser ?
|
|
435
|
+
height: isShowReplyToUser ? 'auto' : '0',
|
|
436
|
+
padding: isShowReplyToUser ? '4px 0' : '0',
|
|
437
437
|
className: (0, _classnames["default"])(_defineProperty({}, "".concat(prefix, "__reply-container--show-user"), showUser))
|
|
438
438
|
}, /*#__PURE__*/_react["default"].createElement(_style.ReplyUser, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
439
439
|
className: "".concat(prefix, "__reply-container-text")
|
|
440
|
-
}, (0, _getLocale.getLocale)(
|
|
440
|
+
}, (0, _getLocale.getLocale)('Mod_Reply')), /*#__PURE__*/_react["default"].createElement("span", {
|
|
441
441
|
className: "name"
|
|
442
442
|
}, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
|
|
443
443
|
name: replyUser,
|
|
@@ -457,14 +457,15 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
457
457
|
},
|
|
458
458
|
name: user.Name,
|
|
459
459
|
color: user.UserAvatar.Color,
|
|
460
|
-
src: user.UserAvatar.Medium
|
|
460
|
+
src: user.UserAvatar.Medium,
|
|
461
|
+
userId: user.Id
|
|
461
462
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
462
463
|
onClick: this.handleShowMblog,
|
|
463
464
|
className: "".concat(prefix, "__reply-default-input-text")
|
|
464
465
|
}, "\u8F93\u5165\u6C9F\u901A\u5185\u5BB9")), !isShowDefaultInput && /*#__PURE__*/_react["default"].createElement(_mblog["default"], {
|
|
465
466
|
setTextareaRef: setTextareaRef || function () {},
|
|
466
467
|
isHasPlaceholder: true,
|
|
467
|
-
placeholderText: (0, _getLocale.getLocale)(
|
|
468
|
+
placeholderText: (0, _getLocale.getLocale)('Mod_contentofyour'),
|
|
468
469
|
isShowRange: false,
|
|
469
470
|
isShowBtnCancel: false,
|
|
470
471
|
isShowSendSms: isShowSendSms,
|
|
@@ -486,7 +487,7 @@ var Communication = /*#__PURE__*/function (_PureComponent) {
|
|
|
486
487
|
onSubmit: function onSubmit() {
|
|
487
488
|
return _this2.setState({
|
|
488
489
|
isShowPraiseRecordPop: false,
|
|
489
|
-
praiseObjId:
|
|
490
|
+
praiseObjId: ''
|
|
490
491
|
});
|
|
491
492
|
}
|
|
492
493
|
}));
|
|
@@ -46,7 +46,7 @@ var createWidthKr = /*#__PURE__*/function () {
|
|
|
46
46
|
while (1) {
|
|
47
47
|
switch (_context.prev = _context.next) {
|
|
48
48
|
case 0:
|
|
49
|
-
url = "".concat(requestDomain(), "/api/
|
|
49
|
+
url = "".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/okr/createWithKr");
|
|
50
50
|
_context.next = 3;
|
|
51
51
|
return _axios["default"].post(url, _objectSpread({
|
|
52
52
|
workType: 6
|
|
@@ -49,7 +49,9 @@ function HeaderAction(_ref) {
|
|
|
49
49
|
_onClick = _ref.onClick,
|
|
50
50
|
className = _ref.className,
|
|
51
51
|
title = _ref.title,
|
|
52
|
-
children = _ref.children
|
|
52
|
+
children = _ref.children,
|
|
53
|
+
approvalSetting = _ref.approvalSetting,
|
|
54
|
+
detailInfo = _ref.detailInfo;
|
|
53
55
|
|
|
54
56
|
var _useState = (0, _react.useState)(false),
|
|
55
57
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -99,6 +101,8 @@ function HeaderAction(_ref) {
|
|
|
99
101
|
if (children && children.length > 0) {
|
|
100
102
|
content = /*#__PURE__*/_react["default"].createElement(_headerDrop["default"], {
|
|
101
103
|
visible: dropVisible,
|
|
104
|
+
detailInfo: detailInfo,
|
|
105
|
+
approvalSetting: approvalSetting,
|
|
102
106
|
onVisibleChange: function onVisibleChange(visible) {
|
|
103
107
|
active.current = visible;
|
|
104
108
|
!visible && setDropVisible(false);
|
|
@@ -9,6 +9,8 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _helper = require("../okr-detail/helper");
|
|
13
|
+
|
|
12
14
|
var _popup = _interopRequireDefault(require("../popup"));
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -44,7 +46,9 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
44
46
|
colorInDrop = _ref.colorInDrop,
|
|
45
47
|
hoverColorInDrop = _ref.hoverColorInDrop,
|
|
46
48
|
_onClick = _ref.onClick,
|
|
47
|
-
onClose = _ref.onClose
|
|
49
|
+
onClose = _ref.onClose,
|
|
50
|
+
approvalSetting = _ref.approvalSetting,
|
|
51
|
+
detailInfo = _ref.detailInfo;
|
|
48
52
|
|
|
49
53
|
var _useState = (0, _react.useState)(false),
|
|
50
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -52,7 +56,36 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
52
56
|
setHover = _useState2[1];
|
|
53
57
|
|
|
54
58
|
var hasIcon = !!icon && typeof icon === "string";
|
|
55
|
-
|
|
59
|
+
var applyState = detailInfo.applyState;
|
|
60
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, icon === 'tu-icon-del' ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (0, _helper.getApprovalIsShow)(approvalSetting, 'deleteOkr', applyState) ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
61
|
+
className: "header-drop-item",
|
|
62
|
+
style: {
|
|
63
|
+
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
64
|
+
},
|
|
65
|
+
onClick: function onClick(e) {
|
|
66
|
+
_onClick && _onClick(e);
|
|
67
|
+
onClose(false);
|
|
68
|
+
},
|
|
69
|
+
onMouseOver: function onMouseOver() {
|
|
70
|
+
return setHover(true);
|
|
71
|
+
},
|
|
72
|
+
onMouseOut: function onMouseOut() {
|
|
73
|
+
return setHover(false);
|
|
74
|
+
}
|
|
75
|
+
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
|
+
className: "header-drop-item-icon",
|
|
77
|
+
style: {
|
|
78
|
+
color: hover ? hoverIconColorInDrop || hoverColorInDrop || hoverColor : iconColorInDrop || colorInDrop || color
|
|
79
|
+
}
|
|
80
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
|
+
className: icon
|
|
82
|
+
}) : icon), title) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
|
+
className: "header-drop-item-approval"
|
|
84
|
+
}, hasIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
|
+
className: "header-drop-item-icon"
|
|
86
|
+
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
87
|
+
className: icon
|
|
88
|
+
}) : icon), title)) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
56
89
|
className: "header-drop-item",
|
|
57
90
|
style: {
|
|
58
91
|
color: hover ? hoverColorInDrop || hoverColor : colorInDrop || color
|
|
@@ -74,19 +107,23 @@ var HeaderDropItem = function HeaderDropItem(_ref) {
|
|
|
74
107
|
}
|
|
75
108
|
}, typeof icon === "string" ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
76
109
|
className: icon
|
|
77
|
-
}) : icon), title);
|
|
110
|
+
}) : icon), title));
|
|
78
111
|
};
|
|
79
112
|
|
|
80
113
|
var HeaderDrop = function HeaderDrop(_ref2) {
|
|
81
114
|
var visible = _ref2.visible,
|
|
82
115
|
onVisibleChange = _ref2.onVisibleChange,
|
|
83
116
|
items = _ref2.items,
|
|
84
|
-
children = _ref2.children
|
|
117
|
+
children = _ref2.children,
|
|
118
|
+
approvalSetting = _ref2.approvalSetting,
|
|
119
|
+
detailInfo = _ref2.detailInfo;
|
|
85
120
|
var renderDrop = (0, _react.useMemo)(function () {
|
|
86
121
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
87
122
|
className: "titaui-drawer-header-action-drop-wrapper"
|
|
88
123
|
}, items.map(function (item) {
|
|
89
124
|
return /*#__PURE__*/_react["default"].createElement(HeaderDropItem, _extends({}, item, {
|
|
125
|
+
detailInfo: detailInfo,
|
|
126
|
+
approvalSetting: approvalSetting,
|
|
90
127
|
onClose: function onClose() {
|
|
91
128
|
return onVisibleChange(false);
|
|
92
129
|
}
|
|
@@ -48,6 +48,17 @@
|
|
|
48
48
|
background: linear-gradient(180deg, rgba(191, 199, 213, 0) 0%, #BFC7D5 50%, rgba(240, 242, 245, 0) 100%);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
.titaui-drawer-header-status {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
border-radius: 16px;
|
|
56
|
+
width: 68px;
|
|
57
|
+
height: 28px;
|
|
58
|
+
margin-right: 18px;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
}
|
|
61
|
+
|
|
51
62
|
.titaui-drawer-header-action {
|
|
52
63
|
font-size: 18px;
|
|
53
64
|
color: #a4acb9;
|
|
@@ -164,6 +175,39 @@
|
|
|
164
175
|
background-repeat: no-repeat;
|
|
165
176
|
}
|
|
166
177
|
|
|
178
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval {
|
|
179
|
+
height: 32px;
|
|
180
|
+
display: flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
padding: 0 23px;
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
color: #BFC7D5;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon {
|
|
188
|
+
font-size: 18px;
|
|
189
|
+
color: inherit;
|
|
190
|
+
width: 18px;
|
|
191
|
+
height: 18px;
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
margin-right: 10px;
|
|
194
|
+
background-size: contain;
|
|
195
|
+
background-position: center center;
|
|
196
|
+
background-repeat: no-repeat;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon > span {
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
color: inherit;
|
|
204
|
+
width: 18px;
|
|
205
|
+
height: 18px;
|
|
206
|
+
background-size: contain;
|
|
207
|
+
background-position: center center;
|
|
208
|
+
background-repeat: no-repeat;
|
|
209
|
+
}
|
|
210
|
+
|
|
167
211
|
.drawer-left .drawer-content-wrapper,
|
|
168
212
|
.drawer-right .drawer-content-wrapper,
|
|
169
213
|
.drawer-left .drawer-content,
|
|
@@ -25,7 +25,9 @@ require("./index.css");
|
|
|
25
25
|
|
|
26
26
|
var _context = _interopRequireDefault(require("../drawer-manager/context"));
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _dom = require("./utils/dom");
|
|
29
|
+
|
|
30
|
+
var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex", "autoClosable"];
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
33
|
|
|
@@ -54,7 +56,7 @@ var Drawer = function Drawer(props) {
|
|
|
54
56
|
|
|
55
57
|
var visible = props.visible,
|
|
56
58
|
_props$placement = props.placement,
|
|
57
|
-
placement = _props$placement === void 0 ?
|
|
59
|
+
placement = _props$placement === void 0 ? 'right' : _props$placement,
|
|
58
60
|
children = props.children,
|
|
59
61
|
_props$mask = props.mask,
|
|
60
62
|
mask = _props$mask === void 0 ? false : _props$mask,
|
|
@@ -70,6 +72,8 @@ var Drawer = function Drawer(props) {
|
|
|
70
72
|
bodyStyle = props.bodyStyle,
|
|
71
73
|
_props$zIndex = props.zIndex,
|
|
72
74
|
zIndex = _props$zIndex === void 0 ? 1200 : _props$zIndex,
|
|
75
|
+
_props$autoClosable = props.autoClosable,
|
|
76
|
+
autoClosable = _props$autoClosable === void 0 ? false : _props$autoClosable,
|
|
73
77
|
rest = _objectWithoutProperties(props, _excluded);
|
|
74
78
|
|
|
75
79
|
var handleAfterVisibleChange = (0, _react.useCallback)(function (opened) {
|
|
@@ -89,6 +93,20 @@ var Drawer = function Drawer(props) {
|
|
|
89
93
|
return children;
|
|
90
94
|
}
|
|
91
95
|
|
|
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
|
+
}, []);
|
|
92
110
|
return /*#__PURE__*/_react["default"].createElement(DrawerContext.Provider, {
|
|
93
111
|
value: {
|
|
94
112
|
close: function close() {
|
|
@@ -96,7 +114,7 @@ var Drawer = function Drawer(props) {
|
|
|
96
114
|
}
|
|
97
115
|
}
|
|
98
116
|
}, /*#__PURE__*/_react["default"].createElement(_rcDrawer["default"], _extends({
|
|
99
|
-
className: (0, _classnames["default"])(
|
|
117
|
+
className: (0, _classnames["default"])('titaui-drawer', 'document-mouse-event-ignore', className),
|
|
100
118
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
101
119
|
zIndex: zIndex
|
|
102
120
|
})
|
|
@@ -123,7 +141,10 @@ function DrawerHeader(_ref) {
|
|
|
123
141
|
content = _ref.content,
|
|
124
142
|
style = _ref.style,
|
|
125
143
|
onClose = _ref.onClose,
|
|
126
|
-
|
|
144
|
+
status = _ref.status,
|
|
145
|
+
actionComponent = _ref.actionComponent,
|
|
146
|
+
approvalSetting = _ref.approvalSetting,
|
|
147
|
+
detailInfo = _ref.detailInfo;
|
|
127
148
|
var drawer = (0, _react.useContext)(DrawerContext);
|
|
128
149
|
var manager = (0, _react.useContext)(_context["default"]);
|
|
129
150
|
var showClose = closable && (!!onClose || !!drawer);
|
|
@@ -146,16 +167,24 @@ function DrawerHeader(_ref) {
|
|
|
146
167
|
onClick: manager && manager.goBack
|
|
147
168
|
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
148
169
|
className: "tu-icon-fanhui"
|
|
149
|
-
}), (0, _getLocale.getLocale)(
|
|
170
|
+
}), (0, _getLocale.getLocale)('Mod_Back')), showBackBtn && hasContent && /*#__PURE__*/_react["default"].createElement("div", {
|
|
150
171
|
className: "titaui-drawer-header-divider"
|
|
151
172
|
}), hasContent && content, /*#__PURE__*/_react["default"].createElement("div", {
|
|
152
173
|
style: {
|
|
153
174
|
flex: 1
|
|
154
175
|
}
|
|
155
|
-
}), /*#__PURE__*/_react["default"].createElement("div",
|
|
176
|
+
}), status && status.color && /*#__PURE__*/_react["default"].createElement("div", {
|
|
177
|
+
className: "titaui-drawer-header-status",
|
|
178
|
+
style: {
|
|
179
|
+
color: status.color.color,
|
|
180
|
+
backgroundColor: status.color.bgColor
|
|
181
|
+
}
|
|
182
|
+
}, status.title), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
|
|
156
183
|
return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
|
|
157
184
|
}), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
|
|
158
|
-
|
|
185
|
+
approvalSetting: approvalSetting,
|
|
186
|
+
detailInfo: detailInfo,
|
|
187
|
+
title: (0, _getLocale.getLocale)('Mod_MoreOperate'),
|
|
159
188
|
icon: "tu-icon-10",
|
|
160
189
|
children: collapsedActions
|
|
161
190
|
}), showClose && /*#__PURE__*/_react["default"].createElement("div", {
|