@titaui/pc 1.9.11 → 1.9.15

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.
Files changed (25) hide show
  1. package/lib/components/dialog/index.css +1 -0
  2. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +3 -1
  3. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +10 -7
  4. package/lib/components/form/form-fields/input/index.css +0 -1
  5. package/lib/components/form/form-fields/password/index.css +2 -2
  6. package/lib/components/grid-layout/personal-info/index.js +15 -13
  7. package/lib/components/grid-page/personal-info/index.js +16 -14
  8. package/lib/components/upload-photo-modal/constant.js +4 -4
  9. package/lib/pages/new-okr-list/header/comments.js +8 -1
  10. package/lib/pages/personal-info/components/base-info/index.css +6 -28
  11. package/lib/pages/personal-info/components/base-info/index.js +4 -3
  12. package/lib/pages/personal-info/components/edit-base-info/index.js +23 -5
  13. package/package.json +1 -1
  14. package/src/components/dialog/index.scss +1 -0
  15. package/src/components/dynamic/dynamic-item/dynamic-reward/index.scss +3 -1
  16. package/src/components/dynamic/dynamic-item/dynamic-reward/index.tsx +13 -11
  17. package/src/components/form/form-fields/input/index.scss +0 -1
  18. package/src/components/form/form-fields/password/index.scss +2 -2
  19. package/src/components/grid-layout/personal-info/index.tsx +13 -13
  20. package/src/components/grid-page/personal-info/index.tsx +14 -14
  21. package/src/components/upload-photo-modal/constant.ts +4 -4
  22. package/src/pages/new-okr-list/header/comments.tsx +9 -1
  23. package/src/pages/personal-info/components/base-info/index.scss +5 -23
  24. package/src/pages/personal-info/components/base-info/index.tsx +4 -4
  25. package/src/pages/personal-info/components/edit-base-info/index.tsx +9 -3
@@ -96,6 +96,7 @@
96
96
  }
97
97
 
98
98
  .titaui-dialog__btn-ok:hover {
99
+ border: 1px solid #5c8eff;
99
100
  background: #5c8eff;
100
101
  color: #ffffff;
101
102
  }
@@ -17,7 +17,6 @@
17
17
  color: #3f4755;
18
18
  line-height: 22px;
19
19
  display: flex;
20
- margin-top: 12px;
21
20
  }
22
21
 
23
22
  .titaui-dynamic-reward-item__description-quoto {
@@ -33,6 +32,7 @@
33
32
  .titaui-dynamic-reward-item__description-quoto--right {
34
33
  margin-left: 8px;
35
34
  margin-top: 4px;
35
+ margin-right: 12px;
36
36
  }
37
37
 
38
38
  .titaui-dynamic-reward-item__status-left {
@@ -48,6 +48,8 @@
48
48
  padding: 1px 12px;
49
49
  font-size: 12px;
50
50
  line-height: 18px;
51
+ border-radius: 12px;
52
+ margin-right: 8px;
51
53
  }
52
54
 
53
55
  .titaui-dynamic-reward-item__operate-desc {
@@ -102,7 +102,7 @@ var DynamicReward = function DynamicReward(_ref) {
102
102
 
103
103
  var renderTitle = (0, _react.useMemo)(function () {
104
104
  if (!obj) {
105
- return;
105
+ return "";
106
106
  }
107
107
 
108
108
  var objType = obj.objType,
@@ -117,15 +117,15 @@ var DynamicReward = function DynamicReward(_ref) {
117
117
  }
118
118
 
119
119
  if (objType === _constant.EObjType.Task) {
120
- return "".concat((0, _getLocale.getLocale)('Mod_Tasks'), "\uFF1A") + objName;
120
+ return "".concat((0, _getLocale.getLocale)("Mod_Tasks"), "\uFF1A") + objName;
121
121
  }
122
122
 
123
123
  if (objType === _constant.EObjType.Project) {
124
- return "".concat((0, _getLocale.getLocale)('Mod_Project'), "\uFF1A") + objName;
124
+ return "".concat((0, _getLocale.getLocale)("Mod_Project"), "\uFF1A") + objName;
125
125
  }
126
126
 
127
127
  if (objType === _constant.EObjType.Assess) {
128
- return "".concat((0, _getLocale.getLocale)('Mod_Performance'), "\uFF1A") + objName;
128
+ return "".concat((0, _getLocale.getLocale)("Mod_Performance"), "\uFF1A") + objName;
129
129
  }
130
130
 
131
131
  return "";
@@ -162,7 +162,7 @@ var DynamicReward = function DynamicReward(_ref) {
162
162
  }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
163
163
  name: rewardUser.name,
164
164
  id: rewardUser.userId
165
- })), (0, _getLocale.getLocale)('OKR_MyO_E_Reward'))), /*#__PURE__*/_react["default"].createElement("span", {
165
+ })), (0, _getLocale.getLocale)("OKR_MyO_E_Reward"))), /*#__PURE__*/_react["default"].createElement("span", {
166
166
  className: prefix + "-desc-operate-type",
167
167
  style: {
168
168
  background: feedTypeColor
@@ -179,12 +179,15 @@ var DynamicReward = function DynamicReward(_ref) {
179
179
  className: prefix + "__content"
180
180
  }, /*#__PURE__*/_react["default"].createElement("div", {
181
181
  className: prefix + "__title"
182
- }, /*#__PURE__*/_react["default"].createElement(_title["default"], {
182
+ }, renderTitle && /*#__PURE__*/_react["default"].createElement(_title["default"], {
183
183
  content: renderTitle,
184
184
  onClickTitle: handleClickTitle,
185
185
  suffixContent: Classify
186
186
  })), rewardContent && /*#__PURE__*/_react["default"].createElement("div", {
187
- className: prefix + "__description"
187
+ className: prefix + "__description",
188
+ style: {
189
+ marginTop: renderTitle ? '12px' : '0'
190
+ }
188
191
  }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("img", {
189
192
  className: (0, _classnames["default"])(prefix + "__description-quoto", prefix + "__description-quoto--left"),
190
193
  src: _dynamicLeftQuoto["default"]
@@ -9,7 +9,6 @@
9
9
 
10
10
  .form-field-input-row .form-field-input__border {
11
11
  margin-left: 16px;
12
- border: 1px solid #DFE3EA;
13
12
  flex: 1;
14
13
  }
15
14
 
@@ -55,7 +55,7 @@
55
55
  .form-field-input__input {
56
56
  display: inline-block;
57
57
  padding: 0;
58
- width: calc(100% - 12px);
58
+ width: calc(100% - 20px);
59
59
  font-size: 14px;
60
60
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
61
61
  font-weight: 400;
@@ -87,7 +87,7 @@
87
87
 
88
88
  .form-field-input__hide-icon {
89
89
  position: absolute;
90
- right: 3px;
90
+ right: 12px;
91
91
  top: 10px;
92
92
  width: 16px;
93
93
  height: 16px;
@@ -125,6 +125,8 @@ function PersonalInfoComponent() {
125
125
  setUserRoles(userRoleList.slice(0, 2)); //请求获取信息
126
126
 
127
127
  (0, _network["default"])(ComponentId).then(function (res) {
128
+ var _item$componentData$, _item$componentData$$, _item$componentData$2, _item$componentData$3, _item$componentData$4, _item$componentData$5, _item$componentData$6, _item$componentData$7, _item$componentData$8, _item$componentData$9, _item$componentData$10, _item$componentData$11, _item$componentData$12, _item$componentData$13, _item$componentData$14, _item$componentData$15, _item$componentData$16, _item$componentData$17, _item$componentData$18, _item$componentData$19, _item$componentData$20, _item$componentData$21, _item$componentData$22;
129
+
128
130
  var _iterator = _createForOfIteratorHelper(res),
129
131
  _step;
130
132
 
@@ -134,33 +136,33 @@ function PersonalInfoComponent() {
134
136
 
135
137
  switch (_item.componentDataProp) {
136
138
  case 'myInfo':
137
- setAvatarUrl(_item.componentData[0].simpleUserModelV2.avatar.large);
139
+ setAvatarUrl(_item === null || _item === void 0 ? void 0 : _item.componentData[0].simpleUserModelV2.avatar.large);
138
140
  setUserName({
139
- name: _item.componentData[0].simpleUserModelV2.name,
140
- userId: _item.componentData[0].simpleUserModelV2.userId
141
+ name: _item === null || _item === void 0 ? void 0 : (_item$componentData$ = _item.componentData[0]) === null || _item$componentData$ === void 0 ? void 0 : (_item$componentData$$ = _item$componentData$.simpleUserModelV2) === null || _item$componentData$$ === void 0 ? void 0 : _item$componentData$$.name,
142
+ userId: _item === null || _item === void 0 ? void 0 : (_item$componentData$2 = _item.componentData[0]) === null || _item$componentData$2 === void 0 ? void 0 : (_item$componentData$3 = _item$componentData$2.simpleUserModelV2) === null || _item$componentData$3 === void 0 ? void 0 : _item$componentData$3.userId
141
143
  });
142
144
  setDepartment({
143
- name: _item.componentData[0].simpleUserModelV2.departmentName,
144
- departmentId: _item.componentData[0].simpleUserModelV2.departmentId
145
+ name: _item === null || _item === void 0 ? void 0 : (_item$componentData$4 = _item.componentData[0]) === null || _item$componentData$4 === void 0 ? void 0 : (_item$componentData$5 = _item$componentData$4.simpleUserModelV2) === null || _item$componentData$5 === void 0 ? void 0 : _item$componentData$5.departmentName,
146
+ departmentId: _item === null || _item === void 0 ? void 0 : (_item$componentData$6 = _item.componentData[0]) === null || _item$componentData$6 === void 0 ? void 0 : (_item$componentData$7 = _item$componentData$6.simpleUserModelV2) === null || _item$componentData$7 === void 0 ? void 0 : _item$componentData$7.departmentId
145
147
  });
146
- setAvatarColor(_item.componentData[0].simpleUserModelV2.avatar.color);
148
+ setAvatarColor(_item === null || _item === void 0 ? void 0 : (_item$componentData$8 = _item.componentData[0]) === null || _item$componentData$8 === void 0 ? void 0 : (_item$componentData$9 = _item$componentData$8.simpleUserModelV2) === null || _item$componentData$9 === void 0 ? void 0 : (_item$componentData$10 = _item$componentData$9.avatar) === null || _item$componentData$10 === void 0 ? void 0 : _item$componentData$10.color);
147
149
  break;
148
150
 
149
151
  case 'myFollowInfo':
150
- setFansNum(_item.componentData[0].total);
152
+ setFansNum(_item === null || _item === void 0 ? void 0 : (_item$componentData$11 = _item.componentData[0]) === null || _item$componentData$11 === void 0 ? void 0 : _item$componentData$11.total);
151
153
  break;
152
154
 
153
155
  case 'myPraiseInfo':
154
- setLikeNum(_item.componentDataCount);
156
+ setLikeNum(_item === null || _item === void 0 ? void 0 : _item.componentDataCount);
155
157
  break;
156
158
 
157
159
  case 'latelyFPInfo':
158
160
  _item.componentData[0] && setScrollMessage({
159
- name: _item.componentData[0].simpleUserModelV2.name,
160
- date: _item.componentData[0].folowPariseDate,
161
- userId: _item.componentData[0].simpleUserModelV2.userId,
162
- avatarSrc: _item.componentData[0].simpleUserModelV2.avatar.large,
163
- avatarColor: _item.componentData[0].simpleUserModelV2.avatar.color
161
+ name: _item === null || _item === void 0 ? void 0 : (_item$componentData$12 = _item.componentData[0]) === null || _item$componentData$12 === void 0 ? void 0 : (_item$componentData$13 = _item$componentData$12.simpleUserModelV2) === null || _item$componentData$13 === void 0 ? void 0 : _item$componentData$13.name,
162
+ date: _item === null || _item === void 0 ? void 0 : (_item$componentData$14 = _item.componentData[0]) === null || _item$componentData$14 === void 0 ? void 0 : _item$componentData$14.folowPariseDate,
163
+ userId: _item === null || _item === void 0 ? void 0 : (_item$componentData$15 = _item.componentData[0]) === null || _item$componentData$15 === void 0 ? void 0 : (_item$componentData$16 = _item$componentData$15.simpleUserModelV2) === null || _item$componentData$16 === void 0 ? void 0 : _item$componentData$16.userId,
164
+ avatarSrc: _item === null || _item === void 0 ? void 0 : (_item$componentData$17 = _item.componentData[0]) === null || _item$componentData$17 === void 0 ? void 0 : (_item$componentData$18 = _item$componentData$17.simpleUserModelV2) === null || _item$componentData$18 === void 0 ? void 0 : (_item$componentData$19 = _item$componentData$18.avatar) === null || _item$componentData$19 === void 0 ? void 0 : _item$componentData$19.large,
165
+ avatarColor: _item === null || _item === void 0 ? void 0 : (_item$componentData$20 = _item.componentData[0]) === null || _item$componentData$20 === void 0 ? void 0 : (_item$componentData$21 = _item$componentData$20.simpleUserModelV2) === null || _item$componentData$21 === void 0 ? void 0 : (_item$componentData$22 = _item$componentData$21.avatar) === null || _item$componentData$22 === void 0 ? void 0 : _item$componentData$22.color
164
166
  });
165
167
  break;
166
168
  }
@@ -125,6 +125,8 @@ function PersonalInfoComponent() {
125
125
  setUserRoles(userRoleList.slice(0, 2)); //请求获取信息
126
126
 
127
127
  (0, _network["default"])(ComponentId).then(function (res) {
128
+ var _item$componentData$, _item$componentData$$, _item$componentData$2, _item$componentData$3, _item$componentData$4, _item$componentData$5, _item$componentData$6, _item$componentData$7, _item$componentData$8, _item$componentData$9, _item$componentData$10, _item$componentData$11, _item$componentData$12, _item$componentData$13, _item$componentData$14, _item$componentData$15, _item$componentData$16, _item$componentData$17, _item$componentData$18, _item$componentData$19, _item$componentData$20, _item$componentData$21, _item$componentData$22;
129
+
128
130
  var _iterator = _createForOfIteratorHelper(res),
129
131
  _step;
130
132
 
@@ -134,33 +136,33 @@ function PersonalInfoComponent() {
134
136
 
135
137
  switch (_item.componentDataProp) {
136
138
  case 'myInfo':
137
- setAvatarUrl(_item.componentData[0].simpleUserModelV2.avatar.large);
139
+ setAvatarUrl(_item === null || _item === void 0 ? void 0 : _item.componentData[0].simpleUserModelV2.avatar.large);
138
140
  setUserName({
139
- name: _item.componentData[0].simpleUserModelV2.name,
140
- userId: _item.componentData[0].simpleUserModelV2.userId
141
+ name: _item === null || _item === void 0 ? void 0 : (_item$componentData$ = _item.componentData[0]) === null || _item$componentData$ === void 0 ? void 0 : (_item$componentData$$ = _item$componentData$.simpleUserModelV2) === null || _item$componentData$$ === void 0 ? void 0 : _item$componentData$$.name,
142
+ userId: _item === null || _item === void 0 ? void 0 : (_item$componentData$2 = _item.componentData[0]) === null || _item$componentData$2 === void 0 ? void 0 : (_item$componentData$3 = _item$componentData$2.simpleUserModelV2) === null || _item$componentData$3 === void 0 ? void 0 : _item$componentData$3.userId
141
143
  });
142
144
  setDepartment({
143
- name: _item.componentData[0].simpleUserModelV2.departmentName,
144
- departmentId: _item.componentData[0].simpleUserModelV2.departmentId
145
+ name: _item === null || _item === void 0 ? void 0 : (_item$componentData$4 = _item.componentData[0]) === null || _item$componentData$4 === void 0 ? void 0 : (_item$componentData$5 = _item$componentData$4.simpleUserModelV2) === null || _item$componentData$5 === void 0 ? void 0 : _item$componentData$5.departmentName,
146
+ departmentId: _item === null || _item === void 0 ? void 0 : (_item$componentData$6 = _item.componentData[0]) === null || _item$componentData$6 === void 0 ? void 0 : (_item$componentData$7 = _item$componentData$6.simpleUserModelV2) === null || _item$componentData$7 === void 0 ? void 0 : _item$componentData$7.departmentId
145
147
  });
146
- setAvatarColor(_item.componentData[0].simpleUserModelV2.avatar.color);
148
+ setAvatarColor(_item === null || _item === void 0 ? void 0 : (_item$componentData$8 = _item.componentData[0]) === null || _item$componentData$8 === void 0 ? void 0 : (_item$componentData$9 = _item$componentData$8.simpleUserModelV2) === null || _item$componentData$9 === void 0 ? void 0 : (_item$componentData$10 = _item$componentData$9.avatar) === null || _item$componentData$10 === void 0 ? void 0 : _item$componentData$10.color);
147
149
  break;
148
150
 
149
151
  case 'myFollowInfo':
150
- setFansNum(_item.componentData[0].total);
152
+ setFansNum(_item === null || _item === void 0 ? void 0 : (_item$componentData$11 = _item.componentData[0]) === null || _item$componentData$11 === void 0 ? void 0 : _item$componentData$11.total);
151
153
  break;
152
154
 
153
155
  case 'myPraiseInfo':
154
- setLikeNum(_item.componentDataCount);
156
+ setLikeNum(_item === null || _item === void 0 ? void 0 : _item.componentDataCount);
155
157
  break;
156
158
 
157
159
  case 'latelyFPInfo':
158
- _item.componentData[0] && setScrollMessage({
159
- name: _item.componentData[0].simpleUserModelV2.name,
160
- date: _item.componentData[0].folowPariseDate,
161
- userId: _item.componentData[0].simpleUserModelV2.userId,
162
- avatarSrc: _item.componentData[0].simpleUserModelV2.avatar.large,
163
- avatarColor: _item.componentData[0].simpleUserModelV2.avatar.color
160
+ (_item === null || _item === void 0 ? void 0 : _item.componentData[0]) && setScrollMessage({
161
+ name: _item === null || _item === void 0 ? void 0 : (_item$componentData$12 = _item.componentData[0]) === null || _item$componentData$12 === void 0 ? void 0 : (_item$componentData$13 = _item$componentData$12.simpleUserModelV2) === null || _item$componentData$13 === void 0 ? void 0 : _item$componentData$13.name,
162
+ date: _item === null || _item === void 0 ? void 0 : (_item$componentData$14 = _item.componentData[0]) === null || _item$componentData$14 === void 0 ? void 0 : _item$componentData$14.folowPariseDate,
163
+ userId: _item === null || _item === void 0 ? void 0 : (_item$componentData$15 = _item.componentData[0]) === null || _item$componentData$15 === void 0 ? void 0 : (_item$componentData$16 = _item$componentData$15.simpleUserModelV2) === null || _item$componentData$16 === void 0 ? void 0 : _item$componentData$16.userId,
164
+ avatarSrc: _item === null || _item === void 0 ? void 0 : (_item$componentData$17 = _item.componentData[0]) === null || _item$componentData$17 === void 0 ? void 0 : (_item$componentData$18 = _item$componentData$17.simpleUserModelV2) === null || _item$componentData$18 === void 0 ? void 0 : (_item$componentData$19 = _item$componentData$18.avatar) === null || _item$componentData$19 === void 0 ? void 0 : _item$componentData$19.large,
165
+ avatarColor: _item === null || _item === void 0 ? void 0 : (_item$componentData$20 = _item.componentData[0]) === null || _item$componentData$20 === void 0 ? void 0 : (_item$componentData$21 = _item$componentData$20.simpleUserModelV2) === null || _item$componentData$21 === void 0 ? void 0 : (_item$componentData$22 = _item$componentData$21.avatar) === null || _item$componentData$22 === void 0 ? void 0 : _item$componentData$22.color
164
166
  });
165
167
  break;
166
168
  }
@@ -6,19 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.List = void 0;
7
7
  var List = [{
8
8
  id: 'person',
9
- accept: '.jpg,.jpeg,.gif,.png',
9
+ accept: '.jpg,.jpeg,.png',
10
10
  autoCropArea: 1,
11
11
  initialAspectRatio: 1,
12
- tips: '仅支持 jpg、jpeg、gif、png 格式 建议图片最小尺寸 150*150px',
12
+ tips: '仅支持 jpg、jpeg、png 格式 建议图片最小尺寸 150*150px',
13
13
  previewTitle: '预览',
14
14
  minCropBoxHeight: 60,
15
15
  minCropBoxWidth: 60
16
16
  }, {
17
17
  id: 'enterprise',
18
- accept: '.jpg,.jpeg,.gif,.png',
18
+ accept: '.jpg,.jpeg,.png',
19
19
  autoCropArea: 1,
20
20
  initialAspectRatio: 5,
21
- tips: '建议 logo 尺寸 400*80 logo 最佳适配颜色为白色 仅支持 jpg、jpeg、gif、png 格式',
21
+ tips: '建议 logo 尺寸 400*80 logo 最佳适配颜色为白色 仅支持 jpg、jpeg、png 格式',
22
22
  previewTitle: 'logo 预览',
23
23
  minCropBoxHeight: 20,
24
24
  minCropBoxWidth: 20
@@ -40,7 +40,14 @@ var Comments = function Comments(props) {
40
40
  yqmNum = _useContext.yqmNum;
41
41
 
42
42
  var openComments = function openComments() {
43
- pushRef.current && pushRef.current.show();
43
+ pushRef.current && pushRef.current.show(); // @ts-ignore
44
+
45
+ window.titaTracker && // @ts-ignore
46
+ window.titaTracker('action').record({
47
+ actionName: 'OKR__点击图标【沟通】',
48
+ actionGroup: 'OKR-沟通',
49
+ productName: 'OKR'
50
+ });
44
51
  };
45
52
 
46
53
  if (!toUserId && relation != 1) return null;
@@ -70,42 +70,20 @@
70
70
  background-color: #2879ff;
71
71
  }
72
72
 
73
- .titaui-personal-info-base-info .form-field-input__label {
74
- margin-bottom: 4px;
75
- }
76
-
77
- .titaui-personal-info-base-info .form-field-input__border {
78
- padding: 0;
79
- border: none;
80
- background-color: #fff;
81
- }
82
-
83
- .titaui-personal-info-base-info .form-field-input__label-text {
84
- font-weight: 600;
85
- }
86
-
87
- .titaui-personal-info-base-info .form-field-input__input {
88
- font-size: 12px;
89
- line-height: 18px;
90
- background-color: #fff;
91
- }
92
-
93
- .titaui-personal-info-base-info .form-field-input__border--disabled input:disabled {
94
- background-color: #fff;
95
- }
96
-
97
73
  .titaui-personal-info-base-info__form {
98
- height: 66px;
99
74
  box-sizing: border-box;
100
- padding: 10px 0;
75
+ margin-bottom: 16px;
76
+ }
77
+
78
+ .titaui-personal-info-base-info__form:last-of-type {
79
+ margin-bottom: 0;
101
80
  }
102
81
 
103
82
  .titaui-personal-info-base-info__form-title {
104
83
  font-size: 14px;
105
- font-weight: normal;
84
+ font-weight: 600;
106
85
  color: #141C28;
107
86
  line-height: 22px;
108
- margin-bottom: 6px;
109
87
  }
110
88
 
111
89
  .titaui-personal-info-base-info__form-value {
@@ -50,7 +50,7 @@ var BaseInfo = function BaseInfo() {
50
50
  name: "",
51
51
  email: "",
52
52
  mobile: "",
53
- id: ''
53
+ userId: ''
54
54
  }),
55
55
  _useState2 = _slicedToArray(_useState, 2),
56
56
  userInfo = _useState2[0],
@@ -95,7 +95,8 @@ var BaseInfo = function BaseInfo() {
95
95
  }), /*#__PURE__*/_react["default"].createElement(_editBaseInfo["default"], {
96
96
  visible: visible,
97
97
  onCancel: handleCancelEdit,
98
- handleSuccessEditBaseInfo: handleSuccessEditBaseInfo
98
+ handleSuccessEditBaseInfo: handleSuccessEditBaseInfo,
99
+ info: userInfo
99
100
  })), /*#__PURE__*/_react["default"].createElement("div", {
100
101
  className: "".concat(prefix, "__form")
101
102
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -103,7 +104,7 @@ var BaseInfo = function BaseInfo() {
103
104
  }, "\u59D3\u540D"), /*#__PURE__*/_react["default"].createElement("span", {
104
105
  className: "".concat(prefix, "__form-value")
105
106
  }, /*#__PURE__*/_react["default"].createElement(_openData.OpenUserName, {
106
- id: userInfo.id,
107
+ id: userInfo.userId,
107
108
  name: userInfo.name
108
109
  }))), /*#__PURE__*/_react["default"].createElement("div", {
109
110
  className: "".concat(prefix, "__form")
@@ -48,8 +48,9 @@ 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,
52
- handleSuccessEditBaseInfo = props.handleSuccessEditBaseInfo;
51
+ _onCancel = props.onCancel,
52
+ handleSuccessEditBaseInfo = props.handleSuccessEditBaseInfo,
53
+ info = props.info;
53
54
  var modalRef = (0, _react.useRef)();
54
55
  var formContainerRef = (0, _react.useRef)();
55
56
  var formRef = (0, _react.useRef)();
@@ -122,7 +123,8 @@ var EditBaseInfo = function EditBaseInfo(props) {
122
123
  });
123
124
 
124
125
  handleSuccessEditBaseInfo(userInfo);
125
- onCancel();
126
+
127
+ _onCancel();
126
128
  } else {
127
129
  _toast["default"].Error(resp.Message, {
128
130
  canClose: false
@@ -150,8 +152,24 @@ var EditBaseInfo = function EditBaseInfo(props) {
150
152
  title: '基本信息设置',
151
153
  noHeadLine: true,
152
154
  maskClosable: false,
153
- onClose: onCancel,
154
- onCancel: onCancel,
155
+ onClose: function onClose() {
156
+ _onCancel();
157
+
158
+ setUserInfo({
159
+ name: info.name,
160
+ mobile: info.mobile,
161
+ email: info.email
162
+ });
163
+ },
164
+ onCancel: function onCancel() {
165
+ _onCancel();
166
+
167
+ setUserInfo({
168
+ name: info.name,
169
+ mobile: info.mobile,
170
+ email: info.email
171
+ });
172
+ },
155
173
  okText: "\u786E\u5B9A",
156
174
  noFooterLine: true,
157
175
  onOk: handleSaveUserInfo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.11",
3
+ "version": "1.9.15",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "src/index.js",
@@ -89,6 +89,7 @@ $font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-ser
89
89
  color: #ffffff;
90
90
  transition: 0.2s all;
91
91
  &:hover {
92
+ border: 1px solid #5c8eff;
92
93
  background: #5c8eff;
93
94
  color: #ffffff;
94
95
  }
@@ -14,7 +14,6 @@
14
14
  color: #3f4755;
15
15
  line-height: 22px;
16
16
  display: flex;
17
- margin-top: 12px;
18
17
  &-quoto {
19
18
  width: 12px;
20
19
  height: 12px;
@@ -26,6 +25,7 @@
26
25
  &-quoto--right {
27
26
  margin-left: 8px;
28
27
  margin-top: 4px;
28
+ margin-right: 12px;
29
29
  }
30
30
  }
31
31
  &__status-left {
@@ -39,6 +39,8 @@
39
39
  padding: 1px 12px;
40
40
  font-size: 12px;
41
41
  line-height: 18px;
42
+ border-radius: 12px;
43
+ margin-right: 8px;
42
44
  }
43
45
  &__operate-desc {
44
46
  font-size: 14px;
@@ -64,7 +64,7 @@ const DynamicReward: FC<IDynamicItemContentProps> = ({
64
64
 
65
65
  const renderTitle = useMemo(() => {
66
66
  if (!obj) {
67
- return;
67
+ return "";
68
68
  }
69
69
  const { objType, objName } = obj;
70
70
  if (objType === EObjType.Kr) {
@@ -74,13 +74,13 @@ const DynamicReward: FC<IDynamicItemContentProps> = ({
74
74
  return "O:" + objName;
75
75
  }
76
76
  if (objType === EObjType.Task) {
77
- return `${getLocale('Mod_Tasks')}:` + objName;
77
+ return `${getLocale("Mod_Tasks")}:` + objName;
78
78
  }
79
79
  if (objType === EObjType.Project) {
80
- return `${getLocale('Mod_Project')}:` + objName;
80
+ return `${getLocale("Mod_Project")}:` + objName;
81
81
  }
82
82
  if (objType === EObjType.Assess) {
83
- return `${getLocale('Mod_Performance')}:` + objName;
83
+ return `${getLocale("Mod_Performance")}:` + objName;
84
84
  }
85
85
  return "";
86
86
  }, []);
@@ -122,7 +122,7 @@ const DynamicReward: FC<IDynamicItemContentProps> = ({
122
122
  >
123
123
  <OpenUserName name={rewardUser.name} id={rewardUser.userId} />
124
124
  </span>
125
- {getLocale('OKR_MyO_E_Reward')}
125
+ {getLocale("OKR_MyO_E_Reward")}
126
126
  </span>
127
127
  </span>
128
128
  <span
@@ -145,14 +145,16 @@ const DynamicReward: FC<IDynamicItemContentProps> = ({
145
145
  />
146
146
  <div className={prefix + "__content"}>
147
147
  <div className={prefix + "__title"}>
148
- <DynamicTitle
149
- content={renderTitle}
150
- onClickTitle={handleClickTitle}
151
- suffixContent={Classify}
152
- />
148
+ {renderTitle && (
149
+ <DynamicTitle
150
+ content={renderTitle}
151
+ onClickTitle={handleClickTitle}
152
+ suffixContent={Classify}
153
+ />
154
+ )}
153
155
  </div>
154
156
  {rewardContent && (
155
- <div className={prefix + "__description"}>
157
+ <div className={prefix + "__description"} style={{marginTop: renderTitle ? '12px' : '0'}}>
156
158
  <div>
157
159
  <img
158
160
  className={classNames(
@@ -7,7 +7,6 @@
7
7
  }
8
8
  .form-field-input__border{
9
9
  margin-left: 16px;
10
- border: 1px solid #DFE3EA;
11
10
  flex: 1;
12
11
  }
13
12
  }
@@ -51,7 +51,7 @@
51
51
  &__input {
52
52
  display: inline-block;
53
53
  padding: 0;
54
- width: calc(100% - 12px);
54
+ width: calc(100% - 20px);
55
55
  font-size: 14px;
56
56
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
57
57
  sans-serif, PingFang SC, Microsoft YaHei;
@@ -80,7 +80,7 @@
80
80
  }
81
81
  &__hide-icon {
82
82
  position: absolute;
83
- right: 3px;
83
+ right: 12px;
84
84
  top: 10px;
85
85
  width: 16px;
86
86
  height: 16px;
@@ -57,35 +57,35 @@ export default function PersonalInfoComponent() {
57
57
  for (let item of res) {
58
58
  switch (item.componentDataProp) {
59
59
  case 'myInfo':
60
- setAvatarUrl(item.componentData[0].simpleUserModelV2.avatar.large);
60
+ setAvatarUrl(item?.componentData[0].simpleUserModelV2.avatar.large);
61
61
  setUserName({
62
- name: item.componentData[0].simpleUserModelV2.name,
63
- userId: item.componentData[0].simpleUserModelV2.userId,
62
+ name: item?.componentData[0]?.simpleUserModelV2?.name,
63
+ userId: item?.componentData[0]?.simpleUserModelV2?.userId,
64
64
  });
65
65
  setDepartment({
66
- name: item.componentData[0].simpleUserModelV2.departmentName,
66
+ name: item?.componentData[0]?.simpleUserModelV2?.departmentName,
67
67
  departmentId:
68
- item.componentData[0].simpleUserModelV2.departmentId,
68
+ item?.componentData[0]?.simpleUserModelV2?.departmentId,
69
69
  });
70
70
  setAvatarColor(
71
- item.componentData[0].simpleUserModelV2.avatar.color
71
+ item?.componentData[0]?.simpleUserModelV2?.avatar?.color
72
72
  );
73
73
  break;
74
74
  case 'myFollowInfo':
75
- setFansNum(item.componentData[0].total);
75
+ setFansNum(item?.componentData[0]?.total);
76
76
  break;
77
77
  case 'myPraiseInfo':
78
- setLikeNum(item.componentDataCount);
78
+ setLikeNum(item?.componentDataCount);
79
79
  break;
80
80
  case 'latelyFPInfo':
81
81
  item.componentData[0] &&
82
82
  setScrollMessage({
83
- name: item.componentData[0].simpleUserModelV2.name,
84
- date: item.componentData[0].folowPariseDate,
85
- userId: item.componentData[0].simpleUserModelV2.userId,
86
- avatarSrc: item.componentData[0].simpleUserModelV2.avatar.large,
83
+ name: item?.componentData[0]?.simpleUserModelV2?.name,
84
+ date: item?.componentData[0]?.folowPariseDate,
85
+ userId: item?.componentData[0]?.simpleUserModelV2?.userId,
86
+ avatarSrc: item?.componentData[0]?.simpleUserModelV2?.avatar?.large,
87
87
  avatarColor:
88
- item.componentData[0].simpleUserModelV2.avatar.color,
88
+ item?.componentData[0]?.simpleUserModelV2?.avatar?.color,
89
89
  });
90
90
  break;
91
91
  }
@@ -57,35 +57,35 @@ export default function PersonalInfoComponent() {
57
57
  for (let item of res) {
58
58
  switch (item.componentDataProp) {
59
59
  case 'myInfo':
60
- setAvatarUrl(item.componentData[0].simpleUserModelV2.avatar.large);
60
+ setAvatarUrl(item?.componentData[0].simpleUserModelV2.avatar.large);
61
61
  setUserName({
62
- name: item.componentData[0].simpleUserModelV2.name,
63
- userId: item.componentData[0].simpleUserModelV2.userId,
62
+ name: item?.componentData[0]?.simpleUserModelV2?.name,
63
+ userId: item?.componentData[0]?.simpleUserModelV2?.userId,
64
64
  });
65
65
  setDepartment({
66
- name: item.componentData[0].simpleUserModelV2.departmentName,
66
+ name: item?.componentData[0]?.simpleUserModelV2?.departmentName,
67
67
  departmentId:
68
- item.componentData[0].simpleUserModelV2.departmentId,
68
+ item?.componentData[0]?.simpleUserModelV2?.departmentId,
69
69
  });
70
70
  setAvatarColor(
71
- item.componentData[0].simpleUserModelV2.avatar.color
71
+ item?.componentData[0]?.simpleUserModelV2?.avatar?.color
72
72
  );
73
73
  break;
74
74
  case 'myFollowInfo':
75
- setFansNum(item.componentData[0].total);
75
+ setFansNum(item?.componentData[0]?.total);
76
76
  break;
77
77
  case 'myPraiseInfo':
78
- setLikeNum(item.componentDataCount);
78
+ setLikeNum(item?.componentDataCount);
79
79
  break;
80
80
  case 'latelyFPInfo':
81
- item.componentData[0] &&
81
+ item?.componentData[0] &&
82
82
  setScrollMessage({
83
- name: item.componentData[0].simpleUserModelV2.name,
84
- date: item.componentData[0].folowPariseDate,
85
- userId: item.componentData[0].simpleUserModelV2.userId,
86
- avatarSrc: item.componentData[0].simpleUserModelV2.avatar.large,
83
+ name: item?.componentData[0]?.simpleUserModelV2?.name,
84
+ date: item?.componentData[0]?.folowPariseDate,
85
+ userId: item?.componentData[0]?.simpleUserModelV2?.userId,
86
+ avatarSrc: item?.componentData[0]?.simpleUserModelV2?.avatar?.large,
87
87
  avatarColor:
88
- item.componentData[0].simpleUserModelV2.avatar.color,
88
+ item?.componentData[0]?.simpleUserModelV2?.avatar?.color,
89
89
  });
90
90
  break;
91
91
  }
@@ -2,20 +2,20 @@
2
2
  export const List = [
3
3
  {
4
4
  id: 'person',
5
- accept: '.jpg,.jpeg,.gif,.png',
5
+ accept: '.jpg,.jpeg,.png',
6
6
  autoCropArea: 1,
7
7
  initialAspectRatio: 1,
8
- tips: '仅支持 jpg、jpeg、gif、png 格式 建议图片最小尺寸 150*150px',
8
+ tips: '仅支持 jpg、jpeg、png 格式 建议图片最小尺寸 150*150px',
9
9
  previewTitle: '预览',
10
10
  minCropBoxHeight: 60,
11
11
  minCropBoxWidth: 60,
12
12
  },
13
13
  {
14
14
  id: 'enterprise',
15
- accept: '.jpg,.jpeg,.gif,.png',
15
+ accept: '.jpg,.jpeg,.png',
16
16
  autoCropArea: 1,
17
17
  initialAspectRatio: 5,
18
- tips: '建议 logo 尺寸 400*80 logo 最佳适配颜色为白色 仅支持 jpg、jpeg、gif、png 格式',
18
+ tips: '建议 logo 尺寸 400*80 logo 最佳适配颜色为白色 仅支持 jpg、jpeg、png 格式',
19
19
  previewTitle: 'logo 预览',
20
20
  minCropBoxHeight: 20,
21
21
  minCropBoxWidth: 20,
@@ -13,7 +13,15 @@ const Comments = (props) => {
13
13
  Context
14
14
  );
15
15
  const openComments = () => {
16
- pushRef.current && pushRef.current.show();
16
+ pushRef.current && pushRef.current.show();
17
+ // @ts-ignore
18
+ window.titaTracker &&
19
+ // @ts-ignore
20
+ window.titaTracker('action').record({
21
+ actionName: 'OKR__点击图标【沟通】',
22
+ actionGroup: 'OKR-沟通',
23
+ productName: 'OKR',
24
+ });
17
25
  };
18
26
 
19
27
  if (!toUserId && relation != 1) return null;
@@ -61,35 +61,17 @@
61
61
  }
62
62
  }
63
63
  }
64
- .form-field-input__label {
65
- margin-bottom: 4px;
66
- }
67
- .form-field-input__border {
68
- padding: 0;
69
- border: none;
70
- background-color: #fff;
71
- }
72
- .form-field-input__label-text {
73
- font-weight: 600;
74
- }
75
- .form-field-input__input {
76
- font-size: 12px;
77
- line-height: 18px;
78
- background-color: #fff;
79
- }
80
- .form-field-input__border--disabled input:disabled {
81
- background-color: #fff;
82
- }
83
64
  &__form {
84
- height: 66px;
85
65
  box-sizing: border-box;
86
- padding: 10px 0;
66
+ margin-bottom: 16px;
67
+ &:last-of-type {
68
+ margin-bottom: 0;
69
+ }
87
70
  &-title {
88
71
  font-size: 14px;
89
- font-weight: normal;
72
+ font-weight: 600;
90
73
  color: #141C28;
91
74
  line-height: 22px;
92
- margin-bottom: 6px;
93
75
  }
94
76
  &-value {
95
77
  font-size: 12px;
@@ -8,7 +8,7 @@ import "./index.scss";
8
8
  const prefix = "titaui-personal-info-base-info";
9
9
 
10
10
  const BaseInfo: FC = () => {
11
- const [userInfo, setUserInfo] = useState({ name: "", email: "", mobile: "", id: '' });
11
+ const [userInfo, setUserInfo] = useState({ name: "", email: "", mobile: "", userId: '' });
12
12
  const [visible, setVisible] = useState(false);
13
13
 
14
14
  const handleClickEdit = () => {
@@ -25,7 +25,7 @@ const BaseInfo: FC = () => {
25
25
 
26
26
  useEffect(() => {
27
27
  getUserInfoFun().then((resp) => {
28
- if (resp.Code === 1 && resp.Data) {
28
+ if (resp.Code === 1 && resp.Data) {
29
29
  setUserInfo({ ...resp.Data, position: resp.Data.positionCode });
30
30
  }
31
31
  });
@@ -40,11 +40,11 @@ const BaseInfo: FC = () => {
40
40
  text={getLocale('Mod_Editor')}
41
41
  onClick={handleClickEdit}
42
42
  />
43
- <EditModle visible={visible} onCancel={handleCancelEdit} handleSuccessEditBaseInfo={handleSuccessEditBaseInfo}/>
43
+ <EditModle visible={visible} onCancel={handleCancelEdit} handleSuccessEditBaseInfo={handleSuccessEditBaseInfo} info={userInfo}/>
44
44
  </div>
45
45
  <div className={`${prefix}__form`}>
46
46
  <div className={`${prefix}__form-title`}>姓名</div>
47
- <span className={`${prefix}__form-value`}><OpenUserName id={userInfo.id} name={userInfo.name} /></span>
47
+ <span className={`${prefix}__form-value`}><OpenUserName id={userInfo.userId} name={userInfo.name} /></span>
48
48
  </div>
49
49
  <div className={`${prefix}__form`}>
50
50
  <div className={`${prefix}__form-title`}>手机号码</div>
@@ -10,7 +10,7 @@ const { Fields } = Form;
10
10
  const prefix = "titaui-edit-personal-info"
11
11
 
12
12
  const EditBaseInfo = (props) => {
13
- const { visible, onCancel, handleSuccessEditBaseInfo } = props;
13
+ const { visible, onCancel, handleSuccessEditBaseInfo, info } = props;
14
14
 
15
15
  const modalRef = useRef<any>();
16
16
  const formContainerRef = useRef<any>();
@@ -89,8 +89,14 @@ const EditBaseInfo = (props) => {
89
89
  title={'基本信息设置'}
90
90
  noHeadLine
91
91
  maskClosable={false}
92
- onClose={onCancel}
93
- onCancel={onCancel}
92
+ onClose={() => {
93
+ onCancel();
94
+ setUserInfo({name: info.name, mobile: info.mobile, email:info.email})
95
+ }}
96
+ onCancel={() => {
97
+ onCancel();
98
+ setUserInfo({name: info.name, mobile: info.mobile, email:info.email})
99
+ }}
94
100
  okText="确定"
95
101
  noFooterLine
96
102
  onOk={handleSaveUserInfo}