@titaui/pc 1.8.7 → 1.8.8
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/change-okr-modal/Item.js +1 -5
- package/lib/components/change-okr-modal/constant.js +1 -6
- package/lib/components/dialog/index.css +1 -1
- package/lib/components/dynamic/my-team/index.js +1 -1
- package/lib/components/form/form-fields/duties/index.js +2 -1
- package/lib/components/form/form-fields/input-verification-code/index.js +18 -15
- package/lib/components/form/form-fields/password/index.css +18 -0
- package/lib/components/form/form-fields/password/index.js +33 -20
- package/lib/components/form/index.js +4 -1
- package/lib/components/menus/components/drag-resize/index.js +3 -5
- package/lib/components/menus/export-modules/appraisal-menus/index.js +1 -6
- package/lib/components/menus/export-modules/manage-menus/index.js +1 -5
- package/lib/components/menus/export-modules/okr-menus/index.js +2 -5
- package/lib/components/nav-top/components/user-message/components/remind/index.js +3 -1
- package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +2 -2
- package/lib/components/nav-top/components/user-message/msg/index.css +4 -0
- package/lib/components/nav-top/components/version/index.js +3 -3
- package/lib/components/okr-detail/okr-list/empty/index.js +1 -1
- package/lib/components/pagination/pagination.js +2 -5
- package/lib/components/period-selector/common.js +1 -6
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +1 -3
- package/lib/components/status-time/index.js +1 -1
- package/lib/components/upload-photo-modal/constant.js +2 -2
- package/lib/components/upload-photo-modal/index.css +1 -2
- package/lib/components/upload-photo-modal/index.js +54 -77
- package/lib/components/user-selector/request-apis.js +1 -1
- package/lib/pages/like-ranking/index.js +2 -2
- package/lib/pages/personal-info/components/base-info/index.css +31 -3
- package/lib/pages/personal-info/components/base-info/index.js +13 -5
- package/lib/pages/personal-info/components/{edit-info → edit-base-info}/index.css +1 -1
- package/lib/pages/personal-info/components/{edit-info → edit-base-info}/index.js +3 -4
- package/lib/pages/personal-info/components/person-photo/index.css +18 -5
- package/lib/pages/personal-info/components/person-photo/index.js +18 -3
- package/lib/utils/getLocale.js +7 -2
- package/package.json +1 -1
- package/src/components/change-okr-modal/Item.tsx +1 -4
- package/src/components/change-okr-modal/constant.ts +1 -5
- package/src/components/dialog/index.scss +1 -1
- package/src/components/dynamic/my-team/index.tsx +1 -1
- package/src/components/form/form-fields/duties/index.tsx +1 -1
- package/src/components/form/form-fields/input-verification-code/index.tsx +100 -70
- package/src/components/form/form-fields/password/index.scss +20 -4
- package/src/components/form/form-fields/password/index.tsx +73 -51
- package/src/components/form/index.tsx +3 -1
- package/src/components/menus/components/drag-resize/index.tsx +1 -3
- package/src/components/menus/export-modules/appraisal-menus/index.tsx +1 -5
- package/src/components/menus/export-modules/manage-menus/index.tsx +1 -4
- package/src/components/menus/export-modules/okr-menus/index.tsx +1 -4
- package/src/components/nav-top/components/user-message/components/remind/index.tsx +2 -1
- package/src/components/nav-top/components/user-message/components/remind/remind-item.tsx +2 -2
- package/src/components/nav-top/components/user-message/msg/index.scss +3 -0
- package/src/components/nav-top/components/version/index.tsx +1 -3
- package/src/components/okr-detail/okr-list/empty/index.js +1 -1
- package/src/components/pagination/pagination.tsx +1 -4
- package/src/components/period-selector/common.ts +1 -5
- package/src/components/publish-dynamic-modal/publish-dynamic-modal.tsx +2 -4
- package/src/components/status-time/index.tsx +2 -2
- package/src/components/upload-photo-modal/constant.ts +2 -2
- package/src/components/upload-photo-modal/index.scss +1 -2
- package/src/components/upload-photo-modal/index.tsx +42 -57
- package/src/components/user-selector/export-modules/duties-selector/index.tsx +1 -1
- package/src/components/user-selector/request-apis.js +1 -1
- package/src/pages/like-ranking/index.tsx +2 -2
- package/src/pages/personal-info/components/base-info/index.scss +26 -3
- package/src/pages/personal-info/components/base-info/index.tsx +12 -3
- package/src/pages/personal-info/components/{edit-info → edit-base-info}/index.scss +1 -1
- package/src/pages/personal-info/components/{edit-info → edit-base-info}/index.tsx +2 -4
- package/src/pages/personal-info/components/person-photo/index.scss +17 -5
- package/src/pages/personal-info/components/person-photo/index.tsx +12 -4
- package/src/utils/getLocale.ts +6 -0
- package/lib/pages/personal-info/components/edit-info/input/index.css +0 -89
- package/lib/pages/personal-info/components/edit-info/input/index.js +0 -199
- package/src/pages/personal-info/components/edit-info/input/index.scss +0 -82
- package/src/pages/personal-info/components/edit-info/input/index.tsx +0 -145
|
@@ -43,8 +43,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
43
43
|
|
|
44
44
|
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); }
|
|
45
45
|
|
|
46
|
-
var i18nInfo = (0, _bsGlobal.getBSGlobal)('I18NInfo');
|
|
47
|
-
var isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
48
46
|
var prefix = "publish-dynamic-modal";
|
|
49
47
|
|
|
50
48
|
var PublishDynamicModal = function PublishDynamicModal(_ref) {
|
|
@@ -162,7 +160,7 @@ var PublishDynamicModal = function PublishDynamicModal(_ref) {
|
|
|
162
160
|
onClose: hidePublishDynamicModal,
|
|
163
161
|
noFooter: true,
|
|
164
162
|
style: {
|
|
165
|
-
width: isEn ? '680px' : "480px"
|
|
163
|
+
width: _getLocale.isEn ? '680px' : "480px"
|
|
166
164
|
},
|
|
167
165
|
destroyOnClose: true,
|
|
168
166
|
noHeadLine: true
|
|
@@ -100,7 +100,7 @@ var StatusTime = function StatusTime(_ref) {
|
|
|
100
100
|
if (isLongTerm) return (0, _getLocale.getLocale)('Pro_newpro_LongTerm');
|
|
101
101
|
|
|
102
102
|
if (isRemainLessThan30Days && remainDays > 0 && !isComplete && !isCancel) {
|
|
103
|
-
return "".concat(
|
|
103
|
+
return _getLocale.isEn ? "".concat(remainDays, " day(s)") : "\u5269\u4F59".concat(remainDays, "\u5929");
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
return "".concat(deadDate.year !== new Date().getFullYear() ? deadDate.year + '/' : '').concat(deadDate.month, "/").concat(deadDate.day);
|
|
@@ -11,8 +11,8 @@ var List = [{
|
|
|
11
11
|
initialAspectRatio: 1,
|
|
12
12
|
tips: '仅支持 jpg、jpeg、gif、png 格式 建议图片最小尺寸 150*150px',
|
|
13
13
|
previewTitle: '预览',
|
|
14
|
-
minCropBoxHeight:
|
|
15
|
-
minCropBoxWidth:
|
|
14
|
+
minCropBoxHeight: 60,
|
|
15
|
+
minCropBoxWidth: 60
|
|
16
16
|
}, {
|
|
17
17
|
id: 'enterprise',
|
|
18
18
|
accept: '.jpg,.jpeg,.gif,.png',
|
|
@@ -13,8 +13,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _reactCropper = _interopRequireDefault(require("react-cropper"));
|
|
15
15
|
|
|
16
|
-
require("cropperjs/dist/cropper.css");
|
|
17
|
-
|
|
18
16
|
var _toast = _interopRequireDefault(require("../../components/toast"));
|
|
19
17
|
|
|
20
18
|
var _conditionRender = _interopRequireDefault(require("../condition-render"));
|
|
@@ -25,9 +23,9 @@ var _dialog = _interopRequireDefault(require("../../components/dialog"));
|
|
|
25
23
|
|
|
26
24
|
var _constant = require("./constant");
|
|
27
25
|
|
|
28
|
-
require("
|
|
26
|
+
require("cropperjs/dist/cropper.css");
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
require("./index.css");
|
|
31
29
|
|
|
32
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
31
|
|
|
@@ -49,17 +47,16 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
49
47
|
|
|
50
48
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
51
49
|
|
|
52
|
-
var apiServer = (0, _bsGlobal.getBSGlobal)("apiPath");
|
|
53
|
-
var userid = (0, _bsGlobal.getUserInfo)().Id;
|
|
54
|
-
var tenantId = (0, _bsGlobal.getTenantInfo)().Id;
|
|
55
50
|
var preCls = 'tita-ui-change-person-photo';
|
|
56
51
|
|
|
57
52
|
var ChangePhoto = function ChangePhoto(props) {
|
|
58
53
|
var visible = props.visible,
|
|
59
54
|
onCancel = props.onCancel,
|
|
60
55
|
_props$type = props.type,
|
|
61
|
-
type = _props$type === void 0 ? '
|
|
56
|
+
type = _props$type === void 0 ? 'person' : _props$type,
|
|
57
|
+
handleSuccessUploadPhoto = props.handleSuccessUploadPhoto;
|
|
62
58
|
var modalRef = (0, _react.useRef)();
|
|
59
|
+
var cropperRef = (0, _react.useRef)(null);
|
|
63
60
|
|
|
64
61
|
var _useState = (0, _react.useState)(''),
|
|
65
62
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -76,26 +73,21 @@ var ChangePhoto = function ChangePhoto(props) {
|
|
|
76
73
|
cropData = _useState6[0],
|
|
77
74
|
setCropData = _useState6[1];
|
|
78
75
|
|
|
79
|
-
var _useState7 = (0, _react.useState)(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
item = _useState8[0];
|
|
76
|
+
var _useState7 = (0, _react.useState)(false),
|
|
77
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
78
|
+
isEnter = _useState8[0],
|
|
79
|
+
setIsEnter = _useState8[1];
|
|
84
80
|
|
|
85
|
-
var _useState9 = (0, _react.useState)(
|
|
81
|
+
var _useState9 = (0, _react.useState)(''),
|
|
86
82
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
fileName = _useState10[0],
|
|
84
|
+
setFileName = _useState10[1];
|
|
89
85
|
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
setFileName = _useState12[1];
|
|
94
|
-
|
|
95
|
-
var cropperRef = (0, _react.useRef)(null);
|
|
86
|
+
var item = _constant.List.find(function (item) {
|
|
87
|
+
return item.id === type;
|
|
88
|
+
});
|
|
96
89
|
|
|
97
90
|
var onChange = function onChange(e) {
|
|
98
|
-
e.preventDefault();
|
|
99
91
|
var files;
|
|
100
92
|
|
|
101
93
|
if (e.dataTransfer) {
|
|
@@ -141,51 +133,47 @@ var ChangePhoto = function ChangePhoto(props) {
|
|
|
141
133
|
setCropper(formData);
|
|
142
134
|
};
|
|
143
135
|
|
|
136
|
+
var handleSuccessSave = function handleSuccessSave(resp) {
|
|
137
|
+
if (resp.Code === 1) {
|
|
138
|
+
_toast["default"].Success('保存成功', {
|
|
139
|
+
style: {
|
|
140
|
+
position: "fixed",
|
|
141
|
+
top: " 36px",
|
|
142
|
+
left: "50%"
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
onCancel();
|
|
147
|
+
setImage('');
|
|
148
|
+
handleSuccessUploadPhoto(cropData);
|
|
149
|
+
} else {
|
|
150
|
+
_toast["default"].Error(resp.Message, {
|
|
151
|
+
style: {
|
|
152
|
+
position: "fixed",
|
|
153
|
+
top: " 36px",
|
|
154
|
+
left: "50%"
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
setImage('');
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
144
162
|
var handleSaveInfo = function handleSaveInfo() {
|
|
145
163
|
if (!image) {
|
|
146
164
|
return;
|
|
147
165
|
} else {
|
|
148
166
|
if (type === "person") {
|
|
149
167
|
(0, _requestApi.saveUserPhoto)(cropper).then(function (resp) {
|
|
150
|
-
|
|
151
|
-
_toast["default"].Success('保存成功', {
|
|
152
|
-
canClose: false
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
onCancel();
|
|
156
|
-
} else {
|
|
157
|
-
_toast["default"].Error(resp.Message, {
|
|
158
|
-
canClose: false
|
|
159
|
-
});
|
|
160
|
-
}
|
|
168
|
+
handleSuccessSave(resp);
|
|
161
169
|
});
|
|
162
170
|
} else if (type === "enterprise") {
|
|
163
171
|
(0, _requestApi.saveTenantLogo)(cropper).then(function (resp) {
|
|
164
|
-
|
|
165
|
-
_toast["default"].Success('保存成功', {
|
|
166
|
-
canClose: false
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
onCancel();
|
|
170
|
-
} else {
|
|
171
|
-
_toast["default"].Error(resp.Message, {
|
|
172
|
-
canClose: false
|
|
173
|
-
});
|
|
174
|
-
}
|
|
172
|
+
handleSuccessSave(resp);
|
|
175
173
|
});
|
|
176
174
|
} else {
|
|
177
175
|
(0, _requestApi.saveBrowserIcon)(cropper).then(function (resp) {
|
|
178
|
-
|
|
179
|
-
_toast["default"].Success('保存成功', {
|
|
180
|
-
canClose: false
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
onCancel();
|
|
184
|
-
} else {
|
|
185
|
-
_toast["default"].Error(resp.Message, {
|
|
186
|
-
canClose: false
|
|
187
|
-
});
|
|
188
|
-
}
|
|
176
|
+
handleSuccessSave(resp);
|
|
189
177
|
});
|
|
190
178
|
}
|
|
191
179
|
}
|
|
@@ -199,6 +187,11 @@ var ChangePhoto = function ChangePhoto(props) {
|
|
|
199
187
|
setIsEnter(false);
|
|
200
188
|
};
|
|
201
189
|
|
|
190
|
+
var handleCancel = function handleCancel() {
|
|
191
|
+
onCancel();
|
|
192
|
+
setImage('');
|
|
193
|
+
};
|
|
194
|
+
|
|
202
195
|
return /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
|
|
203
196
|
visible: visible,
|
|
204
197
|
ref: modalRef,
|
|
@@ -208,8 +201,8 @@ var ChangePhoto = function ChangePhoto(props) {
|
|
|
208
201
|
title: '上传头像',
|
|
209
202
|
noHeadLine: true,
|
|
210
203
|
maskClosable: false,
|
|
211
|
-
onClose:
|
|
212
|
-
onCancel:
|
|
204
|
+
onClose: handleCancel,
|
|
205
|
+
onCancel: handleCancel,
|
|
213
206
|
okText: "\u4FDD\u5B58",
|
|
214
207
|
noFooterLine: true,
|
|
215
208
|
onOk: handleSaveInfo
|
|
@@ -230,19 +223,9 @@ var ChangePhoto = function ChangePhoto(props) {
|
|
|
230
223
|
accept: item === null || item === void 0 ? void 0 : item.accept
|
|
231
224
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
232
225
|
className: "".concat(preCls, "__upload-right-title")
|
|
233
|
-
}, "\u70B9\u51FB\u4E0A\u4F20"), /*#__PURE__*/_react["default"].createElement(
|
|
234
|
-
condition: type === 'person'
|
|
235
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
226
|
+
}, "\u70B9\u51FB\u4E0A\u4F20"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
236
227
|
className: "".concat(preCls, "__upload-right-tips")
|
|
237
|
-
}, item === null || item === void 0 ? void 0 : item.tips)), /*#__PURE__*/_react["default"].createElement(
|
|
238
|
-
condition: type === 'enterprise'
|
|
239
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
240
|
-
className: "".concat(preCls, "__upload-right-tips")
|
|
241
|
-
}, item === null || item === void 0 ? void 0 : item.tips)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
242
|
-
condition: type === 'browser'
|
|
243
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
244
|
-
className: "".concat(preCls, "__upload-right-tips")
|
|
245
|
-
}, item === null || item === void 0 ? void 0 : item.tips)))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
228
|
+
}, item === null || item === void 0 ? void 0 : item.tips))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
246
229
|
className: "".concat(preCls, "__upload-left")
|
|
247
230
|
}, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
248
231
|
condition: type === 'person'
|
|
@@ -253,13 +236,7 @@ var ChangePhoto = function ChangePhoto(props) {
|
|
|
253
236
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
254
237
|
className: "".concat(preCls, "__upload-left-box3")
|
|
255
238
|
})), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
256
|
-
condition: type === 'enterprise'
|
|
257
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
258
|
-
className: "".concat(preCls, "__upload-left-box")
|
|
259
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
260
|
-
className: "".concat(preCls, "__upload-left-preview")
|
|
261
|
-
}, item === null || item === void 0 ? void 0 : item.previewTitle)), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
262
|
-
condition: type === 'browser'
|
|
239
|
+
condition: type === 'enterprise' || type === 'browser'
|
|
263
240
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
264
241
|
className: "".concat(preCls, "__upload-left-box")
|
|
265
242
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -163,7 +163,7 @@ var searchGroups = function searchGroups(_ref4) {
|
|
|
163
163
|
exports.searchGroups = searchGroups;
|
|
164
164
|
|
|
165
165
|
var getDuties = function getDuties() {
|
|
166
|
-
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/position/get?status=1&pageNum=1&pageSize=
|
|
166
|
+
return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/position/get?status=1&pageNum=1&pageSize=1000")).then(function (res) {
|
|
167
167
|
return res.data;
|
|
168
168
|
});
|
|
169
169
|
};
|
|
@@ -161,7 +161,7 @@ var LikeRanking = function LikeRanking() {
|
|
|
161
161
|
} else if (item == (0, _getLocale.getLocale)('Feed_Tab_Title_Thisweek')) {
|
|
162
162
|
createDate = (0, _formatTime.showWeekFirstDay)();
|
|
163
163
|
endDate = (0, _formatTime.showNextWeekFirstDay)();
|
|
164
|
-
} else if (item ==
|
|
164
|
+
} else if (item == (0, _getLocale.getLocale)('Feed_Tab_Title_Thisyear')) {
|
|
165
165
|
createDate = (0, _formatTime.getFirstDayOfYear)();
|
|
166
166
|
endDate = (0, _formatTime.getNextDayOfYear)();
|
|
167
167
|
}
|
|
@@ -174,7 +174,7 @@ var LikeRanking = function LikeRanking() {
|
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
var TabBar = function TabBar() {
|
|
177
|
-
var typeData = ["".concat((0, _getLocale.getLocale)('Mod_all')), "".concat((0, _getLocale.getLocale)('Feed_Tab_Title_Thisweek')), "".concat((0, _getLocale.getLocale)('Tasks_Menu_Thismonth')),
|
|
177
|
+
var typeData = ["".concat((0, _getLocale.getLocale)('Mod_all')), "".concat((0, _getLocale.getLocale)('Feed_Tab_Title_Thisweek')), "".concat((0, _getLocale.getLocale)('Tasks_Menu_Thismonth')), (0, _getLocale.getLocale)('Feed_Tab_Title_Thisyear')];
|
|
178
178
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
179
179
|
className: "".concat(preCls, "__tab-bar")
|
|
180
180
|
}, typeData.map(function (item, key) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
background: #ffffff;
|
|
3
3
|
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
4
4
|
border-radius: 12px;
|
|
5
|
-
padding: 20px 32px;
|
|
5
|
+
padding: 20px 32px 30px 36px;
|
|
6
6
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: center;
|
|
12
12
|
justify-content: space-between;
|
|
13
|
-
margin-bottom:
|
|
13
|
+
margin-bottom: 20px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.titaui-personal-info-base-info__header-title {
|
|
@@ -31,10 +31,28 @@
|
|
|
31
31
|
border-radius: 2px;
|
|
32
32
|
display: inline-block;
|
|
33
33
|
position: absolute;
|
|
34
|
-
left: -
|
|
34
|
+
left: -12px;
|
|
35
35
|
top: 3px;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
.titaui-personal-info-base-info__header .titaui-rect-btn--primary {
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
font-weight: normal;
|
|
41
|
+
color: #2879FF;
|
|
42
|
+
line-height: 26px;
|
|
43
|
+
background: rgba(40, 121, 255, 0.2);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.titaui-personal-info-base-info__header .titaui-rect-btn--primary:hover {
|
|
47
|
+
color: #fff;
|
|
48
|
+
background-color: #2879ff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.titaui-personal-info-base-info__header .titaui-rect-btn--normal {
|
|
52
|
+
height: 28px;
|
|
53
|
+
min-width: 64px;
|
|
54
|
+
}
|
|
55
|
+
|
|
38
56
|
.titaui-personal-info-base-info__header-btn {
|
|
39
57
|
width: 64px;
|
|
40
58
|
height: 28px;
|
|
@@ -57,6 +75,14 @@
|
|
|
57
75
|
width: 342px;
|
|
58
76
|
}
|
|
59
77
|
|
|
78
|
+
.titaui-personal-info-base-info__form .form-field-input__border--disabled input:disabled {
|
|
79
|
+
color: #6F7886;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.titaui-personal-info-base-info .form-field-input__label {
|
|
83
|
+
margin-bottom: 4px;
|
|
84
|
+
}
|
|
85
|
+
|
|
60
86
|
.titaui-personal-info-base-info .form-field-input__border {
|
|
61
87
|
padding: 0;
|
|
62
88
|
border: none;
|
|
@@ -68,6 +94,8 @@
|
|
|
68
94
|
}
|
|
69
95
|
|
|
70
96
|
.titaui-personal-info-base-info .form-field-input__input {
|
|
97
|
+
font-size: 12px;
|
|
98
|
+
line-height: 18px;
|
|
71
99
|
background-color: #fff;
|
|
72
100
|
}
|
|
73
101
|
|
|
@@ -15,7 +15,9 @@ var _requestApi = require("../../request-api");
|
|
|
15
15
|
|
|
16
16
|
var _getLocale = require("../../../../utils/getLocale");
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _editBaseInfo = _interopRequireDefault(require("../edit-base-info"));
|
|
19
|
+
|
|
20
|
+
var _button = require("../../../../components/button");
|
|
19
21
|
|
|
20
22
|
require("./index.css");
|
|
21
23
|
|
|
@@ -71,6 +73,10 @@ var BaseInfo = function BaseInfo() {
|
|
|
71
73
|
setVisible(false);
|
|
72
74
|
};
|
|
73
75
|
|
|
76
|
+
var handleSuccessEditBaseInfo = function handleSuccessEditBaseInfo(userInfo) {
|
|
77
|
+
setUserInfo(_objectSpread({}, userInfo));
|
|
78
|
+
};
|
|
79
|
+
|
|
74
80
|
(0, _react.useEffect)(function () {
|
|
75
81
|
(0, _requestApi.getUserInfoFun)().then(function (resp) {
|
|
76
82
|
if (resp.Code === 1 && resp.Data) {
|
|
@@ -86,12 +92,14 @@ var BaseInfo = function BaseInfo() {
|
|
|
86
92
|
className: "".concat(prefix, "__header")
|
|
87
93
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
88
94
|
className: "".concat(prefix, "__header-title")
|
|
89
|
-
}, (0, _getLocale.getLocale)('Per_Ass_New_title_text_BasicIn')), /*#__PURE__*/_react["default"].createElement(
|
|
90
|
-
|
|
95
|
+
}, (0, _getLocale.getLocale)('Per_Ass_New_title_text_BasicIn')), /*#__PURE__*/_react["default"].createElement(_button.RectBtn, {
|
|
96
|
+
type: "primary",
|
|
97
|
+
text: (0, _getLocale.getLocale)('Mod_Editor'),
|
|
91
98
|
onClick: handleClickEdit
|
|
92
|
-
}
|
|
99
|
+
}), /*#__PURE__*/_react["default"].createElement(_editBaseInfo["default"], {
|
|
93
100
|
visible: visible,
|
|
94
|
-
onCancel: handleCancelEdit
|
|
101
|
+
onCancel: handleCancelEdit,
|
|
102
|
+
handleSuccessEditBaseInfo: handleSuccessEditBaseInfo
|
|
95
103
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
104
|
className: "".concat(prefix, "__form")
|
|
97
105
|
}, /*#__PURE__*/_react["default"].createElement(_form["default"], {
|
|
@@ -48,7 +48,8 @@ var prefix = "titaui-edit-personal-info";
|
|
|
48
48
|
|
|
49
49
|
var EditBaseInfo = function EditBaseInfo(props) {
|
|
50
50
|
var visible = props.visible,
|
|
51
|
-
onCancel = props.onCancel
|
|
51
|
+
onCancel = props.onCancel,
|
|
52
|
+
handleSuccessEditBaseInfo = props.handleSuccessEditBaseInfo;
|
|
52
53
|
var modalRef = (0, _react.useRef)();
|
|
53
54
|
var formContainerRef = (0, _react.useRef)();
|
|
54
55
|
var formRef = (0, _react.useRef)();
|
|
@@ -106,10 +107,8 @@ var EditBaseInfo = function EditBaseInfo(props) {
|
|
|
106
107
|
canClose: false
|
|
107
108
|
});
|
|
108
109
|
|
|
110
|
+
handleSuccessEditBaseInfo(userInfo);
|
|
109
111
|
onCancel();
|
|
110
|
-
setTimeout(function () {
|
|
111
|
-
window.location.reload();
|
|
112
|
-
}, 2000);
|
|
113
112
|
} else {
|
|
114
113
|
_toast["default"].Error(resp.Message, {
|
|
115
114
|
canClose: false
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
background: #ffffff;
|
|
5
5
|
box-shadow: 0px 0px 8px 0px rgba(127, 145, 180, 0.1);
|
|
6
6
|
border-radius: 12px;
|
|
7
|
-
padding: 20px 32px;
|
|
7
|
+
padding: 20px 32px 30px 36px;
|
|
8
8
|
margin-top: 10px;
|
|
9
9
|
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
10
10
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: center;
|
|
15
15
|
justify-content: space-between;
|
|
16
|
-
margin-bottom:
|
|
16
|
+
margin-bottom: 20px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.titaui-personal-info-person-photo__header-title {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
border-radius: 2px;
|
|
35
35
|
display: inline-block;
|
|
36
36
|
position: absolute;
|
|
37
|
-
left: -
|
|
37
|
+
left: -12px;
|
|
38
38
|
top: 3px;
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -55,11 +55,24 @@
|
|
|
55
55
|
line-height: 18px;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.titaui-personal-info-person-photo__main
|
|
59
|
-
margin-left:
|
|
58
|
+
.titaui-personal-info-person-photo__main-tip {
|
|
59
|
+
margin-left: 32px;
|
|
60
60
|
font-size: 12px;
|
|
61
61
|
color: #A4ACB9;
|
|
62
62
|
line-height: 20px;
|
|
63
|
+
position: relative;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.titaui-personal-info-person-photo__main-tip::before {
|
|
67
|
+
display: block;
|
|
68
|
+
content: '';
|
|
69
|
+
width: 4px;
|
|
70
|
+
height: 4px;
|
|
71
|
+
background: #A4ACB9;
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 7px;
|
|
74
|
+
left: -12px;
|
|
75
|
+
border-radius: 50%;
|
|
63
76
|
}
|
|
64
77
|
|
|
65
78
|
.titaui-personal-info-person-photo .titaui-pc-avator-container {
|
|
@@ -48,6 +48,11 @@ var PersonPhoto = function PersonPhoto() {
|
|
|
48
48
|
visible = _useState2[0],
|
|
49
49
|
setVisible = _useState2[1];
|
|
50
50
|
|
|
51
|
+
var _useState3 = (0, _react.useState)(''),
|
|
52
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
53
|
+
avatar = _useState4[0],
|
|
54
|
+
setAvatar = _useState4[1];
|
|
55
|
+
|
|
51
56
|
var handleChangePhoto = function handleChangePhoto() {
|
|
52
57
|
setVisible(true);
|
|
53
58
|
};
|
|
@@ -56,6 +61,13 @@ var PersonPhoto = function PersonPhoto() {
|
|
|
56
61
|
setVisible(false);
|
|
57
62
|
};
|
|
58
63
|
|
|
64
|
+
var handleSuccessUploadPhoto = function handleSuccessUploadPhoto(image) {
|
|
65
|
+
setAvatar(image);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
(0, _react.useEffect)(function () {
|
|
69
|
+
setAvatar(UserAvatar.Large);
|
|
70
|
+
}, []);
|
|
59
71
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
60
72
|
className: prefix
|
|
61
73
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -68,17 +80,20 @@ var PersonPhoto = function PersonPhoto() {
|
|
|
68
80
|
userId: Id,
|
|
69
81
|
name: Name,
|
|
70
82
|
color: UserAvatar.Color,
|
|
71
|
-
src:
|
|
83
|
+
src: avatar,
|
|
72
84
|
size: {
|
|
73
85
|
width: 160,
|
|
74
86
|
textNum: 1,
|
|
75
87
|
fontSize: 24
|
|
76
88
|
},
|
|
77
89
|
onClick: handleChangePhoto
|
|
78
|
-
}), /*#__PURE__*/_react["default"].createElement("span",
|
|
90
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
91
|
+
className: "".concat(prefix, "__main-tip")
|
|
92
|
+
}, "\u5EFA\u8BAE\u56FE\u7247\u6700\u5C0F\u5C3A\u5BF8 150*150px")), /*#__PURE__*/_react["default"].createElement(_uploadPhotoModal["default"], {
|
|
79
93
|
visible: visible,
|
|
80
94
|
onCancel: handleCancel,
|
|
81
|
-
type: "person"
|
|
95
|
+
type: "person",
|
|
96
|
+
handleSuccessUploadPhoto: handleSuccessUploadPhoto
|
|
82
97
|
}));
|
|
83
98
|
};
|
|
84
99
|
|
package/lib/utils/getLocale.js
CHANGED
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getLocale = void 0;
|
|
6
|
+
exports.isEn = exports.getLocale = void 0;
|
|
7
|
+
|
|
8
|
+
var _bsGlobal = require("./bs-global");
|
|
7
9
|
|
|
8
10
|
var getLocale = function getLocale(key) {
|
|
9
11
|
return window.getLocale(key);
|
|
10
12
|
};
|
|
11
13
|
|
|
12
|
-
exports.getLocale = getLocale;
|
|
14
|
+
exports.getLocale = getLocale;
|
|
15
|
+
var i18nInfo = (0, _bsGlobal.getBSGlobal)("I18NInfo");
|
|
16
|
+
var isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
17
|
+
exports.isEn = isEn;
|
package/package.json
CHANGED
|
@@ -5,10 +5,7 @@ import { OpenUserName } from '../../utils/open-data';
|
|
|
5
5
|
import drawerManager from '../../components/drawer-manager'
|
|
6
6
|
import { getMonth, getTypeMap } from './constant';
|
|
7
7
|
import { getLocale } from '../../utils/getLocale';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const i18nInfo = getBSGlobal("I18NInfo");
|
|
11
|
-
const isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
8
|
+
import { isEn } from '../../utils/getLocale';
|
|
12
9
|
|
|
13
10
|
interface Props {
|
|
14
11
|
data: OkrData,
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getLocale } from "../../utils/getLocale";
|
|
3
|
-
|
|
4
|
-
const i18nInfo = getBSGlobal("I18NInfo");
|
|
5
|
-
const isEn = i18nInfo && i18nInfo.I18NOpen && i18nInfo.I18NUserLang === "en_US";
|
|
1
|
+
import { getLocale, isEn } from "../../utils/getLocale";
|
|
6
2
|
|
|
7
3
|
export const getYear = () => {
|
|
8
4
|
const years: any = [
|
|
@@ -10,7 +10,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
|
|
|
10
10
|
}
|
|
11
11
|
.rc-dialog-mask {
|
|
12
12
|
z-index: 1299 !important;
|
|
13
|
-
background: rgba(20, 28, 40, 0.
|
|
13
|
+
background: rgba(20, 28, 40, 0.7) !important;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.titaui-dialog {
|
|
@@ -191,7 +191,7 @@ const DynamicMyTeam: FC = () => {
|
|
|
191
191
|
</ConditionRender>
|
|
192
192
|
<ConditionRender condition={subordinate.length === 0}>
|
|
193
193
|
<div className={`${prefix}__content-subordinate--empty`}>
|
|
194
|
-
|
|
194
|
+
{getLocale('Feed_Tab_HaveSubordinates')}
|
|
195
195
|
</div>
|
|
196
196
|
</ConditionRender>
|
|
197
197
|
</div>
|
|
@@ -115,9 +115,9 @@ export default forwardRef((props: Props, ref) => {
|
|
|
115
115
|
overlay={<OverlayInner hasActive={hasActive} hasError={hasError} tip={tip} />}
|
|
116
116
|
getTooltipContainer={getContainer}
|
|
117
117
|
>
|
|
118
|
-
{/* @ts-ignore */}
|
|
119
118
|
<DutiesSelector
|
|
120
119
|
ref={dutiedPopRef}
|
|
120
|
+
// @ts-ignore
|
|
121
121
|
multiple={false}
|
|
122
122
|
// position="bottomLeft"
|
|
123
123
|
position='centerRight'
|