@titaui/pc 1.9.10 → 1.9.14

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 (33) hide show
  1. package/lib/components/dialog/index.css +1 -0
  2. package/lib/components/dynamic/constant.js +1 -1
  3. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +1 -1
  4. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +2 -2
  5. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +3 -1
  6. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +10 -7
  7. package/lib/components/form/form-fields/input/index.css +0 -1
  8. package/lib/components/form/form-fields/password/index.css +2 -2
  9. package/lib/components/grid-layout/personal-info/index.js +15 -13
  10. package/lib/components/grid-page/personal-info/index.js +16 -14
  11. package/lib/components/upload-photo-modal/constant.js +4 -4
  12. package/lib/pages/like-ranking/filter-buttons/timer.js +1 -1
  13. package/lib/pages/personal-info/components/base-info/index.css +6 -28
  14. package/lib/pages/personal-info/components/base-info/index.js +4 -3
  15. package/lib/pages/personal-info/components/edit-base-info/index.js +23 -5
  16. package/lib/utils/format-time.js +7 -7
  17. package/package.json +1 -1
  18. package/src/components/dialog/index.scss +1 -0
  19. package/src/components/dynamic/constant.ts +1 -1
  20. package/src/components/dynamic/dynamic-item/dynamic-assessment/index.tsx +1 -1
  21. package/src/components/dynamic/dynamic-item/dynamic-progress/index.tsx +2 -2
  22. package/src/components/dynamic/dynamic-item/dynamic-reward/index.scss +3 -1
  23. package/src/components/dynamic/dynamic-item/dynamic-reward/index.tsx +13 -11
  24. package/src/components/form/form-fields/input/index.scss +0 -1
  25. package/src/components/form/form-fields/password/index.scss +2 -2
  26. package/src/components/grid-layout/personal-info/index.tsx +13 -13
  27. package/src/components/grid-page/personal-info/index.tsx +14 -14
  28. package/src/components/upload-photo-modal/constant.ts +4 -4
  29. package/src/pages/like-ranking/filter-buttons/timer.tsx +1 -1
  30. package/src/pages/personal-info/components/base-info/index.scss +5 -23
  31. package/src/pages/personal-info/components/base-info/index.tsx +4 -4
  32. package/src/pages/personal-info/components/edit-base-info/index.tsx +9 -3
  33. package/src/utils/format-time.ts +7 -7
@@ -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
  }
@@ -77,7 +77,7 @@ var ObjectType = {
77
77
  4: (0, _getLocale.getLocale)('Menu_Title_Projects'),
78
78
  5: (0, _getLocale.getLocale)('Mod_sPerformanceForm'),
79
79
  6: (0, _getLocale.getLocale)('Mod_sPerformanceGoals'),
80
- 7: (0, _getLocale.getLocale)('Mod_stask'),
80
+ 7: (0, _getLocale.getLocale)('Mod_stasks'),
81
81
  8: (0, _getLocale.getLocale)('Mod_sDailySummary'),
82
82
  10: (0, _getLocale.getLocale)('Feed_sFeed'),
83
83
  11: (0, _getLocale.getLocale)('Pro_page_Plan'),
@@ -57,7 +57,7 @@ var DynamicShare = function DynamicShare(_ref) {
57
57
  var renderDesc = (0, _react.useMemo)(function () {
58
58
  return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
59
59
  className: prefix + "__operate-desc"
60
- }, (0, _getLocale.getLocale)('Mod_skeyprogress')), /*#__PURE__*/_react["default"].createElement("span", {
60
+ }, (0, _getLocale.getLocale)('Mod_sassessment')), /*#__PURE__*/_react["default"].createElement("span", {
61
61
  className: prefix + "-desc-operate-type",
62
62
  style: {
63
63
  background: feedTypeColor
@@ -152,11 +152,11 @@ var DynamicProgress = function DynamicProgress(_ref) {
152
152
  }, /*#__PURE__*/_react["default"].createElement(_searchKeyHandle["default"], {
153
153
  str: relationParentName,
154
154
  keyWord: searchKeyWord
155
- })), (0, _getLocale.getLocale)('Mod_skeyresspross'));
155
+ })), (0, _getLocale.getLocale)('Mod_skeyrprogress'));
156
156
  }
157
157
 
158
158
  if (obj && obj.objType === _constant.EObjType.O) {
159
- dom = "".concat((0, _getLocale.getLocale)('Mod_Updated')).concat((0, _getLocale.getLocale)('Mod_skeyprogress'));
159
+ dom = "".concat((0, _getLocale.getLocale)('Mod_Updated')).concat((0, _getLocale.getLocale)('Mod_objectiveprog'));
160
160
  }
161
161
 
162
162
  if (obj && obj.objType === _constant.EObjType.Task) {
@@ -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
@@ -43,7 +43,7 @@ var Timer = function Timer(_ref) {
43
43
  };
44
44
 
45
45
  return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement(_rangePickerPop["default"], {
46
- format: "YYYY-MM-DD",
46
+ format: "YYYY/MM/DD",
47
47
  controlled: true,
48
48
  onConfirm: onStartDateConfirmHandler,
49
49
  defaultRange: {
@@ -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,
@@ -66,7 +66,7 @@ var timeFormat = function timeFormat(NowDate) {
66
66
 
67
67
  var d = date.getDate(); //日
68
68
 
69
- return y + "-" + m + "-" + d + " 0:0:0";
69
+ return y + "/" + m + "/" + d + " 0:0:0";
70
70
  }; // 获取当年第一天
71
71
 
72
72
 
@@ -97,7 +97,7 @@ var showWeekFirstDay = function showWeekFirstDay() {
97
97
 
98
98
  var WeekFirstDay = new Date(Nowdate - (weekDay - 1) * 86400000);
99
99
  var M = Number(WeekFirstDay.getMonth()) + 1;
100
- return WeekFirstDay.getFullYear() + "-" + M + "-" + WeekFirstDay.getDate() + " 0:0:0";
100
+ return WeekFirstDay.getFullYear() + "/" + M + "/" + WeekFirstDay.getDate() + " 0:0:0";
101
101
  }; // 本周最后一天
102
102
 
103
103
 
@@ -111,7 +111,7 @@ var showWeekLastDay = function showWeekLastDay() {
111
111
 
112
112
  var WeekLastDay = new Date((WeekFirstDay / 1000 + 6 * 86400) * 1000);
113
113
  var M = Number(WeekLastDay.getMonth()) + 1;
114
- return WeekLastDay.getFullYear() + "-" + M + "-" + WeekLastDay.getDate();
114
+ return WeekLastDay.getFullYear() + "/" + M + "/" + WeekLastDay.getDate();
115
115
  }; // 下周第一天
116
116
 
117
117
 
@@ -125,7 +125,7 @@ var showNextWeekFirstDay = function showNextWeekFirstDay() {
125
125
 
126
126
  var WeekLastDay = new Date((WeekFirstDay / 1000 + 7 * 86400) * 1000);
127
127
  var M = Number(WeekLastDay.getMonth()) + 1;
128
- return WeekLastDay.getFullYear() + "-" + M + "-" + WeekLastDay.getDate() + " 0:0:0";
128
+ return WeekLastDay.getFullYear() + "/" + M + "/" + WeekLastDay.getDate() + " 0:0:0";
129
129
  }; // 本月第一天
130
130
 
131
131
 
@@ -135,7 +135,7 @@ var showMonthFirstDay = function showMonthFirstDay() {
135
135
  var Nowdate = new Date();
136
136
  var MonthFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth(), 1);
137
137
  var M = Number(MonthFirstDay.getMonth()) + 1;
138
- return MonthFirstDay.getFullYear() + "-" + M + "-" + MonthFirstDay.getDate() + " 0:0:0";
138
+ return MonthFirstDay.getFullYear() + "/" + M + "/" + MonthFirstDay.getDate() + " 0:0:0";
139
139
  }; // 本月最后一天
140
140
 
141
141
 
@@ -147,7 +147,7 @@ var showMonthLastDay = function showMonthLastDay() {
147
147
 
148
148
  var MonthLastDay = new Date(MonthNextFirstDay - 86400000);
149
149
  var M = Number(MonthLastDay.getMonth()) + 1;
150
- return MonthLastDay.getFullYear() + "-" + M + "-" + MonthLastDay.getDate();
150
+ return MonthLastDay.getFullYear() + "/" + M + "/" + MonthLastDay.getDate();
151
151
  }; // 下个月第一天
152
152
 
153
153
 
@@ -157,7 +157,7 @@ var showNextMonthFirstDay = function showNextMonthFirstDay() {
157
157
  var Nowdate = new Date();
158
158
  var MonthFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth() + 1, 1);
159
159
  var M = Number(MonthFirstDay.getMonth()) + 1;
160
- return MonthFirstDay.getFullYear() + "-" + M + "-" + MonthFirstDay.getDate() + " 0:0:0";
160
+ return MonthFirstDay.getFullYear() + "/" + M + "/" + MonthFirstDay.getDate() + " 0:0:0";
161
161
  };
162
162
 
163
163
  exports.showNextMonthFirstDay = showNextMonthFirstDay;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.9.10",
3
+ "version": "1.9.14",
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
  }
@@ -60,7 +60,7 @@ export const ObjectType = {
60
60
  4: getLocale('Menu_Title_Projects'),
61
61
  5: getLocale('Mod_sPerformanceForm'),
62
62
  6: getLocale('Mod_sPerformanceGoals'),
63
- 7: getLocale('Mod_stask'),
63
+ 7: getLocale('Mod_stasks'),
64
64
  8: getLocale('Mod_sDailySummary'),
65
65
  10: getLocale('Feed_sFeed'),
66
66
  11: getLocale('Pro_page_Plan'),
@@ -28,7 +28,7 @@ const DynamicShare: FC<IDynamicItemContentProps> = ({ data, ...restProps }) => {
28
28
  const renderDesc = useMemo(() => {
29
29
  return (
30
30
  <Fragment>
31
- <span className={prefix + "__operate-desc"}>{getLocale('Mod_skeyprogress')}</span>
31
+ <span className={prefix + "__operate-desc"}>{getLocale('Mod_sassessment')}</span>
32
32
  <span
33
33
  className={prefix + "-desc-operate-type"}
34
34
  style={{ background: feedTypeColor }}
@@ -108,12 +108,12 @@ const DynamicProgress: FC<IDynamicItemContentProps> = ({
108
108
  >
109
109
  <SearchKeyHandle str={relationParentName} keyWord={searchKeyWord} />
110
110
  </span>
111
- {getLocale('Mod_skeyresspross')}
111
+ {getLocale('Mod_skeyrprogress')}
112
112
  </span>
113
113
  );
114
114
  }
115
115
  if (obj && obj.objType === EObjType.O) {
116
- dom = `${getLocale('Mod_Updated')}${getLocale('Mod_skeyprogress')}`;
116
+ dom = `${getLocale('Mod_Updated')}${getLocale('Mod_objectiveprog')}`;
117
117
  }
118
118
  if (obj && obj.objType === EObjType.Task) {
119
119
  dom = `${getLocale('Mod_Updated')}${getLocale('Data_Taskprogress')}`;
@@ -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,
@@ -20,7 +20,7 @@ const Timer: FC<any> = ({ setParma, parmas,setType }) => {
20
20
  return (
21
21
  <Fragment>
22
22
  <RangePickerPop
23
- format="YYYY-MM-DD"
23
+ format="YYYY/MM/DD"
24
24
  controlled
25
25
  onConfirm={onStartDateConfirmHandler}
26
26
  defaultRange={{
@@ -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}
@@ -51,7 +51,7 @@ export const timeFormat = (NowDate) => {
51
51
  var y = date.getFullYear(); //年
52
52
  var m = date.getMonth() + 1; //月
53
53
  var d = date.getDate(); //日
54
- return y + "-" + m + "-" + d+" 0:0:0";
54
+ return y + "/" + m + "/" + d+" 0:0:0";
55
55
  };
56
56
 
57
57
  // 获取当年第一天
@@ -74,7 +74,7 @@ export const showWeekFirstDay = () => {
74
74
  // @ts-ignore
75
75
  let WeekFirstDay = new Date(Nowdate - (weekDay - 1) * 86400000);
76
76
  let M = Number(WeekFirstDay.getMonth()) + 1;
77
- return WeekFirstDay.getFullYear() + "-" + M + "-" + WeekFirstDay.getDate()+" 0:0:0";
77
+ return WeekFirstDay.getFullYear() + "/" + M + "/" + WeekFirstDay.getDate()+" 0:0:0";
78
78
  };
79
79
 
80
80
  // 本周最后一天
@@ -86,7 +86,7 @@ export const showWeekLastDay = () => {
86
86
  // @ts-ignore
87
87
  let WeekLastDay = new Date((WeekFirstDay / 1000 + 6 * 86400) * 1000);
88
88
  let M = Number(WeekLastDay.getMonth()) + 1;
89
- return WeekLastDay.getFullYear() + "-" + M + "-" + WeekLastDay.getDate();
89
+ return WeekLastDay.getFullYear() + "/" + M + "/" + WeekLastDay.getDate();
90
90
  };
91
91
 
92
92
  // 下周第一天
@@ -98,7 +98,7 @@ export const showNextWeekFirstDay = () => {
98
98
  // @ts-ignore
99
99
  let WeekLastDay = new Date((WeekFirstDay / 1000 + 7 * 86400) * 1000);
100
100
  let M = Number(WeekLastDay.getMonth()) + 1;
101
- return WeekLastDay.getFullYear() + "-" + M + "-" + WeekLastDay.getDate()+" 0:0:0";
101
+ return WeekLastDay.getFullYear() + "/" + M + "/" + WeekLastDay.getDate()+" 0:0:0";
102
102
  };
103
103
 
104
104
  // 本月第一天
@@ -106,7 +106,7 @@ export const showMonthFirstDay = () => {
106
106
  var Nowdate = new Date();
107
107
  var MonthFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth(), 1);
108
108
  var M = Number(MonthFirstDay.getMonth()) + 1;
109
- return MonthFirstDay.getFullYear() + "-" + M + "-" + MonthFirstDay.getDate()+" 0:0:0";
109
+ return MonthFirstDay.getFullYear() + "/" + M + "/" + MonthFirstDay.getDate()+" 0:0:0";
110
110
  };
111
111
 
112
112
  // 本月最后一天
@@ -120,7 +120,7 @@ export const showMonthLastDay = () => {
120
120
  // @ts-ignore
121
121
  var MonthLastDay = new Date(MonthNextFirstDay - 86400000);
122
122
  var M = Number(MonthLastDay.getMonth()) + 1;
123
- return MonthLastDay.getFullYear() + "-" + M + "-" + MonthLastDay.getDate();
123
+ return MonthLastDay.getFullYear() + "/" + M + "/" + MonthLastDay.getDate();
124
124
  };
125
125
  // 下个月第一天
126
126
  export const showNextMonthFirstDay = () => {
@@ -131,5 +131,5 @@ export const showNextMonthFirstDay = () => {
131
131
  1
132
132
  );
133
133
  var M = Number(MonthFirstDay.getMonth()) + 1;
134
- return MonthFirstDay.getFullYear() + "-" + M + "-" + MonthFirstDay.getDate()+" 0:0:0";
134
+ return MonthFirstDay.getFullYear() + "/" + M + "/" + MonthFirstDay.getDate()+" 0:0:0";
135
135
  };