@titaui/pc 1.7.100 → 1.8.2

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 (123) hide show
  1. package/lib/components/dialog/index.css +4 -0
  2. package/lib/components/dialog/index.js +7 -6
  3. package/lib/components/form/form-fields/input/index.css +19 -5
  4. package/lib/components/form/form-fields/input/index.js +11 -8
  5. package/lib/components/form/form-fields/input-verification-code/index.css +117 -0
  6. package/lib/components/form/form-fields/input-verification-code/index.js +230 -0
  7. package/lib/components/form/form-fields/password/index.css +2 -2
  8. package/lib/components/form/form-fields/radios/index.js +1 -1
  9. package/lib/components/form/index.js +4 -1
  10. package/lib/components/grid-layout/near-visitors/index.js +4 -2
  11. package/lib/components/grid-layout/okr-align/index.js +4 -4
  12. package/lib/components/grid-layout/okr-progress/index.js +6 -6
  13. package/lib/components/grid-layout/okr-target/index.js +2 -2
  14. package/lib/components/grid-layout/over-view/index.js +1 -1
  15. package/lib/components/grid-layout/personal-info/index.js +5 -3
  16. package/lib/components/grid-layout/sub-employee-okr/index.js +1 -1
  17. package/lib/components/grid-layout/week-task/index.js +4 -4
  18. package/lib/components/grid-layout/words-cloud/index.js +5 -3
  19. package/lib/components/grid-page/personal-info/index.js +5 -3
  20. package/lib/components/img-viewer/index.js +1 -1
  21. package/lib/components/mblog/style.js +4 -4
  22. package/lib/components/nav-top/components/user-message/components/empty/index.js +4 -2
  23. package/lib/components/nav-top/components/user-message/msg/index.js +1 -1
  24. package/lib/components/okr-detail/base-info/base-info.js +4 -3
  25. package/lib/components/okr-detail/base-info/o-desc/index.js +2 -8
  26. package/lib/components/point-demo/constant.js +1 -3
  27. package/lib/components/point-demo/drop-down-box/index.js +1 -3
  28. package/lib/components/point-demo/index.js +8 -10
  29. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.css +1 -1
  30. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +2 -1
  31. package/lib/components/table/index.css +4 -0
  32. package/lib/components/table/index.js +3 -0
  33. package/lib/components/upload-photo-modal/constant.js +99 -0
  34. package/lib/components/upload-photo-modal/img/browser-preview-bgc.png +0 -0
  35. package/lib/components/upload-photo-modal/index.css +276 -0
  36. package/lib/components/upload-photo-modal/index.js +332 -0
  37. package/lib/components/upload-photo-modal/request-api.js +44 -0
  38. package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -0
  39. package/lib/components/user-selector/export-modules/field-tree-selector/index.css +1 -1
  40. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +2 -0
  41. package/lib/components/user-selector/request-apis.js +1 -1
  42. package/lib/components/word-cloud/index.js +1 -1
  43. package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +1 -1
  44. package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +1 -1
  45. package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +1 -1
  46. package/lib/components-v1/userSelector/components/SingleMode.js +1 -1
  47. package/lib/index.js +8 -0
  48. package/lib/pages/home/components/data-list/index.js +2 -2
  49. package/lib/pages/home/components/data-list/nav-selector/index.js +2 -2
  50. package/lib/pages/home/components/data-list/table/columns/index.js +1 -1
  51. package/lib/pages/home/components/guide/index.js +14 -12
  52. package/lib/pages/home/components/header/index.js +3 -1
  53. package/lib/pages/home-page-data-list/index.js +2 -2
  54. package/lib/pages/personal-info/components/base-info/index.css +36 -1
  55. package/lib/pages/personal-info/components/base-info/index.js +22 -90
  56. package/lib/pages/personal-info/components/edit-info/index.js +192 -0
  57. package/lib/pages/personal-info/components/edit-info/input/index.css +89 -0
  58. package/lib/pages/personal-info/components/edit-info/input/index.js +199 -0
  59. package/lib/pages/personal-info/components/person-photo/index.css +88 -0
  60. package/lib/pages/personal-info/components/person-photo/index.js +86 -0
  61. package/lib/pages/personal-info/index.js +3 -1
  62. package/package.json +3 -1
  63. package/src/components/dialog/index.js +2 -1
  64. package/src/components/dialog/index.scss +3 -0
  65. package/src/components/form/form-fields/input/index.scss +16 -5
  66. package/src/components/form/form-fields/input/index.tsx +9 -4
  67. package/src/components/form/form-fields/input-verification-code/index.scss +108 -0
  68. package/src/components/form/form-fields/input-verification-code/index.tsx +171 -0
  69. package/src/components/form/form-fields/password/index.scss +2 -2
  70. package/src/components/form/form-fields/radios/index.tsx +2 -2
  71. package/src/components/form/index.tsx +2 -0
  72. package/src/components/grid-layout/near-visitors/index.tsx +3 -2
  73. package/src/components/grid-layout/okr-align/index.tsx +4 -4
  74. package/src/components/grid-layout/okr-progress/index.tsx +6 -6
  75. package/src/components/grid-layout/okr-target/index.tsx +2 -2
  76. package/src/components/grid-layout/over-view/index.tsx +1 -1
  77. package/src/components/grid-layout/personal-info/index.tsx +4 -3
  78. package/src/components/grid-layout/sub-employee-okr/index.tsx +1 -1
  79. package/src/components/grid-layout/week-task/index.tsx +3 -3
  80. package/src/components/grid-layout/words-cloud/index.tsx +4 -3
  81. package/src/components/grid-page/personal-info/index.tsx +4 -3
  82. package/src/components/img-viewer/index.tsx +1 -1
  83. package/src/components/mblog/style.ts +5 -5
  84. package/src/components/nav-top/components/user-message/components/empty/index.tsx +3 -2
  85. package/src/components/nav-top/components/user-message/msg/index.tsx +1 -1
  86. package/src/components/okr-detail/base-info/base-info.tsx +2 -4
  87. package/src/components/okr-detail/base-info/o-desc/index.tsx +0 -7
  88. package/src/components/point-demo/constant.ts +1 -3
  89. package/src/components/point-demo/drop-down-box/index.js +1 -2
  90. package/src/components/point-demo/index.js +8 -9
  91. package/src/components/publish-dynamic-modal/publish-dynamic-modal.scss +1 -1
  92. package/src/components/publish-dynamic-modal/publish-dynamic-modal.tsx +1 -0
  93. package/src/components/table/index.js +1 -0
  94. package/src/components/table/index.scss +5 -0
  95. package/src/components/upload-photo-modal/constant.ts +71 -0
  96. package/src/components/upload-photo-modal/img/browser-preview-bgc.png +0 -0
  97. package/src/components/upload-photo-modal/index.scss +248 -0
  98. package/src/components/upload-photo-modal/index.tsx +236 -0
  99. package/src/components/upload-photo-modal/request-api.ts +23 -0
  100. package/src/components/user-selector/category-selector-panel/depart-tree.tsx +3 -2
  101. package/src/components/user-selector/export-modules/field-tree-selector/index.scss +1 -1
  102. package/src/components/user-selector/export-modules/field-tree-selector/index.tsx +3 -0
  103. package/src/components/user-selector/request-apis.js +1 -1
  104. package/src/components/word-cloud/index.js +1 -1
  105. package/src/components-v1/userSelector/components/MultiMode/CommonList.tsx +1 -1
  106. package/src/components-v1/userSelector/components/MultiMode/DepartmentList.tsx +1 -1
  107. package/src/components-v1/userSelector/components/MultiMode/SubsList.tsx +1 -1
  108. package/src/components-v1/userSelector/components/SingleMode.tsx +1 -1
  109. package/src/index.js +1 -0
  110. package/src/pages/home/components/data-list/index.tsx +2 -2
  111. package/src/pages/home/components/data-list/nav-selector/index.tsx +2 -2
  112. package/src/pages/home/components/data-list/table/columns/index.tsx +1 -1
  113. package/src/pages/home/components/guide/index.tsx +13 -12
  114. package/src/pages/home/components/header/index.tsx +2 -1
  115. package/src/pages/home-page-data-list/index.tsx +2 -2
  116. package/src/pages/personal-info/components/base-info/index.scss +30 -1
  117. package/src/pages/personal-info/components/base-info/index.tsx +26 -97
  118. package/src/pages/personal-info/components/edit-info/index.tsx +152 -0
  119. package/src/pages/personal-info/components/edit-info/input/index.scss +82 -0
  120. package/src/pages/personal-info/components/edit-info/input/index.tsx +145 -0
  121. package/src/pages/personal-info/components/person-photo/index.scss +80 -0
  122. package/src/pages/personal-info/components/person-photo/index.tsx +49 -0
  123. package/src/pages/personal-info/index.tsx +2 -0
@@ -0,0 +1,236 @@
1
+ import React, { useState, useRef } from 'react';
2
+ import classNames from 'classnames';
3
+ import Cropper from 'react-cropper';
4
+ import 'cropperjs/dist/cropper.css';
5
+ import Toast from '../../components/toast';
6
+ import ConditionRender from '../condition-render';
7
+ import { saveUserInfo, saveTenantLogo, saveBrowserIcon } from './request-api';
8
+ import Dialog from '../../components/dialog';
9
+ import { List } from './constant'
10
+ import './index.scss';
11
+
12
+ const preCls = 'tita-ui-change-person-photo';
13
+
14
+ interface Props {
15
+ visible: boolean;
16
+ type: string; // person enterprise browser
17
+ onCancel: Function;
18
+ }
19
+
20
+ const ChangePhoto = (props: Props) => {
21
+ const { visible, onCancel, type = 'browser' } = props;
22
+
23
+ const modalRef = useRef<any>();
24
+
25
+ const [ image, setImage ] = useState();
26
+ const [ cropper, setCropper ] = useState<any>();
27
+ const [ cropData, setCropData ] = useState('#');
28
+ const [ userInfo, setUserInfo ] = useState({ Avatar: '' });
29
+ const [item] = useState(List.find(item => item.id === type));
30
+
31
+ const cropperRef = useRef<HTMLImageElement>(null);
32
+
33
+ const onChange = (e: any) => {
34
+ e.preventDefault();
35
+ let files;
36
+ if (e.dataTransfer) {
37
+ files = e.dataTransfer.files;
38
+ } else if (e.target) {
39
+ files = e.target.files;
40
+ }
41
+ const reader = new FileReader();
42
+ reader.onload = () => {
43
+ setImage(reader.result as any);
44
+ };
45
+ reader.readAsDataURL(files[0]);
46
+ };
47
+
48
+ const onCrop = () => {
49
+ const imageElement: any = cropperRef.current;
50
+ const cropper: any = imageElement.cropper;
51
+ setCropData(cropper.getCroppedCanvas().toDataURL());
52
+ setUserInfo(cropper.getCroppedCanvas().toDataURL());
53
+
54
+ let base64Url = cropper.getCroppedCanvas().toDataURL();
55
+ //将base64转换成blob
56
+ let FileOrBlob = dataURLtoBlob(base64Url);
57
+ //添加到formdata
58
+ let formData = new FormData();
59
+ formData.append('file', FileOrBlob, "file_" + Date.parse(new Date()) + ".png");
60
+ setCropper(formData)
61
+ };
62
+
63
+ const dataURLtoBlob = (urlData) => {
64
+ var bytes = window.atob(urlData.split(',')[1]);
65
+ var ab = new ArrayBuffer(bytes.length);
66
+ var ia = new Uint8Array(ab);
67
+ for (var i = 0; i < bytes.length; i++) {
68
+ ia[i] = bytes.charCodeAt(i);
69
+ }
70
+ return new Blob([ab], { type: 'image/png' });
71
+ }
72
+
73
+ const handleSaveUserInfo = () => {
74
+ if (!image) {
75
+ return;
76
+ } else {
77
+ saveUserInfo({ data: userInfo }).then((resp) => {
78
+ if (resp.Code === 1) {
79
+ Toast.Success('保存成功', { canClose: false });
80
+ onCancel();
81
+ } else {
82
+ Toast.Error(resp.Message, { canClose: false });
83
+ }
84
+ });
85
+ }
86
+ };
87
+ const handleSaveInfo = () => {
88
+ if (!image) {
89
+ return;
90
+ } else {
91
+ saveTenantLogo( cropData ).then((resp) => {
92
+ if (resp.Code === 1) {
93
+ Toast.Success('保存成功', { canClose: false });
94
+ onCancel();
95
+ } else {
96
+ Toast.Error(resp.Message, { canClose: false });
97
+ }
98
+ });
99
+ }
100
+ };
101
+
102
+ const handleBrowserIconSaveInfo = () => {
103
+ if (!image) {
104
+ return;
105
+ } else {
106
+ console.log(cropper);
107
+
108
+ saveBrowserIcon( cropper ).then((resp) => {
109
+ if (resp.Code === 1) {
110
+ Toast.Success('保存成功', { canClose: false });
111
+ onCancel();
112
+ } else {
113
+ Toast.Error(resp.Message, { canClose: false });
114
+ }
115
+ });
116
+ }
117
+ };
118
+
119
+ return (
120
+ <Dialog
121
+ visible={visible}
122
+ ref={modalRef}
123
+ width={480}
124
+ mask
125
+ centered
126
+ title={'上传头像'}
127
+ noHeadLine
128
+ maskClosable={false}
129
+ onClose={onCancel}
130
+ onCancel={onCancel}
131
+ okText="保存"
132
+ noFooterLine
133
+ onOk={handleBrowserIconSaveInfo}
134
+ >
135
+ <div className={preCls}>
136
+ {!image ?
137
+ <div className={`${preCls}__upload`}>
138
+ <div className={`${preCls}__upload-preview`}>
139
+ <div className={`${preCls}__upload-right`}>
140
+ <i className={classNames(`${preCls}__upload-right-icon`, 'tu-icon-upload')} />
141
+ <input
142
+ type="file"
143
+ onChange={onChange}
144
+ className={`${preCls}__upload-right-input`}
145
+ accept={item?.accept}
146
+ />
147
+ <span className={`${preCls}__upload-right-title`}>点击上传</span>
148
+ <ConditionRender condition={type === 'person'}>
149
+ <span className={`${preCls}__upload-right-tips`}>
150
+ {item?.tips}
151
+ </span>
152
+ </ConditionRender>
153
+ <ConditionRender condition={type === 'enterprise'}>
154
+ <span className={`${preCls}__upload-right-tips`}>
155
+ {item?.tips}
156
+ </span>
157
+ </ConditionRender>
158
+ <ConditionRender condition={type === 'browser'}>
159
+ <span className={`${preCls}__upload-right-tips`}>{item?.tips}</span>
160
+ </ConditionRender>
161
+ </div>
162
+ </div>
163
+ <div className={`${preCls}__upload-left`}>
164
+ <ConditionRender condition={type === 'person'}>
165
+ <div className={`${preCls}__upload-left-box1`} />
166
+ <div className={`${preCls}__upload-left-box2`} />
167
+ <div className={`${preCls}__upload-left-box3`} />
168
+ </ConditionRender>
169
+ <ConditionRender condition={type === 'enterprise'}>
170
+ <div className={`${preCls}__upload-left-box`} />
171
+ <span className={`${preCls}__upload-left-preview`}>{item?.previewTitle}</span>
172
+ </ConditionRender>
173
+ <ConditionRender condition={type === 'browser'}>
174
+ <div className={`${preCls}__upload-left-box`} />
175
+ <span className={`${preCls}__upload-left-preview`}>{item?.previewTitle}</span>
176
+ </ConditionRender>
177
+ </div>
178
+ </div>
179
+ :
180
+ <div className={`${preCls}__img`}>
181
+ <Cropper
182
+ src={image}
183
+ style={{ height: 240, width: 240 }}
184
+ background={false}
185
+ responsive={true}
186
+ autoCropArea={item?.autoCropArea}
187
+ checkOrientation={true}
188
+ minCropBoxHeight={10}
189
+ minCropBoxWidth={10}
190
+ initialAspectRatio={item?.initialAspectRatio}
191
+ guides={true}
192
+ preview=".img-preview"
193
+ ref={cropperRef}
194
+ // onInitialized={(instance) => {
195
+ // setCropper(instance);
196
+ // }}
197
+ crop={onCrop}
198
+ />
199
+ <div className={classNames(`${preCls}__preview-box`, {[`${preCls}__preview-box-bgc`]:type === "enterprise"}, {[`${preCls}__preview-box-browser`]:type === "browser"})}>
200
+ <ConditionRender condition={type === "person"}>
201
+ <img src={cropData} className={`${preCls}__preview-box1`} />
202
+ <img src={cropData} className={`${preCls}__preview-box2`} />
203
+ <img src={cropData} className={`${preCls}__preview-box3`} />
204
+ </ConditionRender>
205
+ <ConditionRender condition={type === "enterprise"}>
206
+ <img src={cropData} className={`${preCls}__preview-enterprise-img`}/>
207
+ <span className={`${preCls}__preview-enterprise-title`}>{item?.previewTitle}</span>
208
+ </ConditionRender>
209
+ <ConditionRender condition={type === "browser"}>
210
+ <img src={cropData} className={`${preCls}__preview-browser-img`}/>
211
+ <span className={`${preCls}__preview-browser-name`}>一体化人才管理云平台</span>
212
+ <span className={`${preCls}__preview-browser-title`}>{item?.previewTitle}</span>
213
+ </ConditionRender>
214
+ </div>
215
+ </div>
216
+ }
217
+ <div className={`${preCls}__title`}>
218
+ <input
219
+ accept={item?.accept}
220
+ type="file"
221
+ onChange={onChange}
222
+ className={classNames(`${preCls}__title-input`, { [`${preCls}__title-input--show`]: image })}
223
+ />
224
+ <span className={classNames(`${preCls}__title-again`, { [`${preCls}__title-again--show`]: image })}>
225
+ 重新上传
226
+ </span>
227
+ <ConditionRender condition={type === 'person'}>
228
+ <span className={`${preCls}__title-preview`}>{item?.previewTitle}</span>
229
+ </ConditionRender>
230
+ </div>
231
+ </div>
232
+ </Dialog>
233
+ );
234
+ };
235
+
236
+ export default ChangePhoto;
@@ -0,0 +1,23 @@
1
+ import qs from "qs";
2
+ import { rput, rpost } from "../../utils/request";
3
+ import { getUserInfo } from "../../utils/bs-global";
4
+
5
+ export const getUserInfoFun = () => {
6
+ return rpost("v1")(`manage/user/profile?toUserId=${getUserInfo().Id}`);
7
+ };
8
+
9
+ export const saveUserInfo = ({ data }) => {
10
+ return rput("v1")("manage/user/update", data, {
11
+ "headers": { "Content-Type": "application/x-www-form-urlencoded" },
12
+ "transformRequest": qs.stringify,
13
+ });
14
+ };
15
+
16
+ export const saveTenantLogo = (params) => {
17
+ return rpost("v1")("tenant/update/logo", params);
18
+ }
19
+
20
+ export const saveBrowserIcon = (params) => {
21
+ return rpost("v1")("tenant/update/browerIcon", params);
22
+ }
23
+
@@ -26,19 +26,20 @@ export default (props: Props) => {
26
26
  departOnly,
27
27
  sourceFrom,
28
28
  auth,
29
+ authType,
29
30
  isGetRoot,
30
31
  disabledDepartSelect,
31
32
  } = useContext(CommonContext);
32
33
 
33
34
  const onGetDepartTreeData = () => {
34
35
  return getTreeData('-1', {
35
- departOnly, auth, isGetRoot, sourceFrom,
36
+ departOnly, auth, authType, isGetRoot, sourceFrom,
36
37
  });
37
38
  }
38
39
 
39
40
  const onLoadDepartNodes = nodeId => {
40
41
  return getTreeData(nodeId, {
41
- departOnly, auth, isGetRoot, sourceFrom,
42
+ departOnly, auth, authType, isGetRoot, sourceFrom,
42
43
  'isLoadNodes': true
43
44
  });
44
45
  }
@@ -65,6 +65,6 @@
65
65
  background: #ffffff;
66
66
  box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
67
67
  border: 1px solid #f0f2f5;
68
- border-radius: 4px;
68
+ border-radius: 12px;
69
69
  }
70
70
  }
@@ -47,6 +47,7 @@ export interface PropsInterface {
47
47
  sourceFrom?: string;
48
48
  departOnly?: boolean;
49
49
  auth?: boolean;
50
+ authType?: string;
50
51
  placeholder?: string;
51
52
  getDepartRoot?: Function;
52
53
  destroyPopupOnHide?: boolean;
@@ -92,6 +93,7 @@ export default forwardRef((props: PropsInterface, ref) => {
92
93
  departOnly,
93
94
  auth = false, // 数据权限
94
95
  placeholder = getLocale('Mod_Pleaseselect'),
96
+ authType,
95
97
  getDepartRoot,
96
98
  destroyPopupOnHide = true,
97
99
  forceRender = false,
@@ -259,6 +261,7 @@ export default forwardRef((props: PropsInterface, ref) => {
259
261
  sourceFrom,
260
262
  departOnly,
261
263
  auth,
264
+ authType,
262
265
  isGetRoot,
263
266
  disabledDepartSelect,
264
267
  panes,
@@ -120,7 +120,7 @@ export const searchGroups = ({ searchKey }) => {
120
120
  }
121
121
 
122
122
  export const getDuties = () => {
123
- return axios.get(`${requestDomain()}/api/v1/${tenantId}/${userId}/position/getAll`)
123
+ return axios.get(`${requestDomain()}/api/v1/${tenantId}/${userId}/position/get?status=1&pageNum=1&pageSize=100`)
124
124
  .then(res => {
125
125
  return res.data;
126
126
  })
@@ -49,7 +49,7 @@ export default props => {
49
49
  style={{ 'display': isShow ? 'unset' : 'none' }}
50
50
  className={classNames('titaui-wordcloud')}
51
51
  >
52
- <div className={classNames('titaui-wordcloud__title')}>企业关注热点</div>
52
+ <div className={classNames('titaui-wordcloud__title')}>{getLocale('HP_Hotcompanies')}</div>
53
53
  <canvas ref={canvas} id="worldcloud-titaui-home-canvas" width="235" height="223"></canvas>
54
54
  </div>
55
55
  </React.Fragment>
@@ -111,7 +111,7 @@ export default class CommonList extends PureComponent<Props,State> {
111
111
  !hasUser && !pending &&
112
112
  <EmptyWrapper>
113
113
  <img src={require('../../assets/emptyImg.png')} width="100px"/>
114
- <ListEmptyText>这里什么都没有...</ListEmptyText>
114
+ <ListEmptyText>{getLocale('Mod_ThereNothing')}...</ListEmptyText>
115
115
  </EmptyWrapper>
116
116
  }
117
117
  </ListWrapper>
@@ -70,7 +70,7 @@ export default class DepartmentList extends PureComponent<Props, State> {
70
70
  {!trees.length && (
71
71
  <EmptyWrapper>
72
72
  <img src={require('../../assets/emptyImg.png')} width='100px' />
73
- <ListEmptyText>这里什么都没有...</ListEmptyText>
73
+ <ListEmptyText>{getLocale('Mod_ThereNothing')}...</ListEmptyText>
74
74
  </EmptyWrapper>
75
75
  )}
76
76
  </PerfectScrollbar>
@@ -54,7 +54,7 @@ export default class CommonList extends PureComponent<Props,State> {
54
54
  !hasUser &&
55
55
  <EmptyWrapper>
56
56
  <img src={require('../../assets/emptyImg.png')} width="100px"/>
57
- <ListEmptyText>这里什么都没有...</ListEmptyText>
57
+ <ListEmptyText>{getLocale('Mod_ThereNothing')}...</ListEmptyText>
58
58
  </EmptyWrapper>
59
59
  }
60
60
  </ListWrapper>
@@ -121,7 +121,7 @@ export default class SingleMode extends PureComponent<Props,State> {
121
121
  !users.length && !pending ?
122
122
  <EmptyWrapper>
123
123
  <img src={require('../assets/emptyImg.png')} width="100px"/>
124
- <ListEmptyText>这里什么都没有...</ListEmptyText>
124
+ <ListEmptyText>{getLocale('Mod_ThereNothing')}...</ListEmptyText>
125
125
  </EmptyWrapper>:
126
126
  <SingleList>
127
127
  {
package/src/index.js CHANGED
@@ -85,3 +85,4 @@ export { default as requestApi } from "./utils/request";
85
85
  export { default as PointDemo} from './components/point-demo';
86
86
  export { default as Scrollbar } from './components/scrollbar';
87
87
  export { default as WeeklyReport} from './components/weekly-report';
88
+ export { default as UploadPhotoModal } from './components/upload-photo-modal';
@@ -25,8 +25,8 @@ const HomePageDataList = () => {
25
25
  typeMap.set('all', getLocale('Mod_all'))
26
26
  typeMap.set('hadNotAlign', getLocale('OKR_Db_Unaligned'))
27
27
  typeMap.set('hadAlign', getLocale('OKR_Db_Aligned'))
28
- typeMap.set('hadNotUpdate', '未更新')
29
- typeMap.set('hadUpdate', '已更新')
28
+ typeMap.set('hadNotUpdate', getLocale('HP_Notupdated'))
29
+ typeMap.set('hadUpdate', getLocale('HP_Updated'))
30
30
  typeMap.set('normalOkr', getLocale('OKR_MyO_Pop_Upd_Notrack'))
31
31
  typeMap.set('riskOkr', getLocale('OKR_MyO_Pop_Upd_Atrisk'))
32
32
  typeMap.set('dalyOkr', getLocale('OKR_MyO_Pop_Upd_Postoned'))
@@ -102,8 +102,8 @@ const HomeNavSelector = (props: Props) => {
102
102
  source === 'update' &&
103
103
  <SearchDropdown value={type} onChange={setType} >
104
104
  <SearchDropdown.Option value="all">{getLocale('Mod_all')}</SearchDropdown.Option>
105
- <SearchDropdown.Option value='hadNotUpdate'>未更新</SearchDropdown.Option>
106
- <SearchDropdown.Option value='hadUpdate'>已更新</SearchDropdown.Option>
105
+ <SearchDropdown.Option value='hadNotUpdate'>{getLocale('HP_Notupdated')}</SearchDropdown.Option>
106
+ <SearchDropdown.Option value='hadUpdate'>{getLocale('HP_Updated')}</SearchDropdown.Option>
107
107
  </SearchDropdown>
108
108
  }
109
109
  {
@@ -64,7 +64,7 @@ export const okrUpdateColumns = [{
64
64
  width: '7%',
65
65
  render: (data) =>
66
66
  <LinkColumn onClick={data.behave}>
67
- {data.typeName === '已更新' ? getLocale('Mod_Checkdetails') : getLocale('OKR_OKRW_Gotoupdate')}
67
+ {data.typeName === getLocale('HP_Updated') ? getLocale('Mod_Checkdetails') : getLocale('OKR_OKRW_Gotoupdate')}
68
68
  </LinkColumn >
69
69
  }]
70
70
 
@@ -1,8 +1,9 @@
1
1
  import { getUserInfo } from "../../../../utils/bs-global";
2
2
  import React, { ReactElement, useState, useEffect } from "react";
3
3
  import Queue from "rc-queue-anim";
4
- import "./index.scss";
4
+ import { getLocale } from "../../../../utils/getLocale";
5
5
  import HomeGuideStepItem from "./stepItem";
6
+ import "./index.scss";
6
7
 
7
8
  interface Props {}
8
9
 
@@ -28,7 +29,7 @@ function HomePageGuide({}: Props): ReactElement {
28
29
  onClick={() => setVisible(true)}
29
30
  >
30
31
  <i className="tu-icon-T-zhinan" />
31
- 如何使用 Tita
32
+ {getLocale('HP_HowTita')}
32
33
  </div>
33
34
  )}
34
35
  {visible && (
@@ -40,30 +41,30 @@ function HomePageGuide({}: Props): ReactElement {
40
41
  />
41
42
  <div className={prefixCls + "__guide-steps"}>
42
43
  <div className={prefixCls + "__guide-title"}>
43
- 四步上手 Tita OKR
44
+ {getLocale('HP_FourstepsTita')}
44
45
  </div>
45
46
  <HomeGuideStepItem
46
- title="设定 OKR"
47
+ title={getLocale('HP_DevelopOKR')}
47
48
  step={1}
48
- linkName="教程: 如何在 Tita 上设定 OKR"
49
+ linkName={getLocale('HP_Tut_developOKRs')}
49
50
  href="https://club.tita.com/18150.html"
50
51
  />
51
52
  <HomeGuideStepItem
52
- title="对齐 OKR"
53
+ title={getLocale('HP_AlignmentOKR')}
53
54
  step={2}
54
- linkName="教程: 如何在 Tita 上对齐 OKR"
55
+ linkName={getLocale('HP_TutalignmentOKR')}
55
56
  href="https://club.tita.com/18150.html"
56
57
  />
57
58
  <HomeGuideStepItem
58
- title="任务执行支撑目标达成"
59
+ title={getLocale('HP_Taskachievement')}
59
60
  step={3}
60
- linkName="教程: 如何在 Tita 上分解任务"
61
+ linkName={getLocale('HP_TuttasksonTita')}
61
62
  href="https://club.tita.com/18165.html"
62
63
  />
63
64
  <HomeGuideStepItem
64
- title="更新进度"
65
+ title={getLocale('HP_UpdateProgress')}
65
66
  step={4}
66
- linkName="教程: 如何在 Tita 上更新 OKR"
67
+ linkName={getLocale('HP_TutOKRonTita')}
67
68
  href="https://club.tita.com/18179.html"
68
69
  isFinalStep
69
70
  />
@@ -74,7 +75,7 @@ function HomePageGuide({}: Props): ReactElement {
74
75
  target="_blank"
75
76
  >
76
77
  <i className="tu-icon-shoushi" />
77
- 更多产品培训课程
78
+ {getLocale('HP_Morecourses')}
78
79
  </a>
79
80
  </div>
80
81
  </div>
@@ -1,5 +1,6 @@
1
1
  import React, { ReactElement } from 'react'
2
2
  import Tabs,{ TabPane } from '../../../../components/tabs'
3
+ import { getLocale } from '../../../../utils/getLocale'
3
4
  import "./index.scss"
4
5
 
5
6
  interface Props {
@@ -10,7 +11,7 @@ function Header({}: Props): ReactElement {
10
11
  return (
11
12
  <div className="tita-tab-header">
12
13
  <Tabs size={"big"}>
13
- <TabPane tab="我的" tabKey="my"></TabPane>
14
+ <TabPane tab={getLocale('HP_My')} tabKey="my"></TabPane>
14
15
  </Tabs>
15
16
  </div>
16
17
  )
@@ -28,8 +28,8 @@ const HomePageDataList = () => {
28
28
  typeMap.set('all', getLocale('Mod_all'));
29
29
  typeMap.set('hadNotAlign', getLocale('OKR_Db_Unaligned'));
30
30
  typeMap.set('hadAlign', getLocale('OKR_Db_Aligned'));
31
- typeMap.set('hadNotUpdate', '未更新');
32
- typeMap.set('hadUpdate', '已更新');
31
+ typeMap.set('hadNotUpdate', getLocale('HP_Notupdated'));
32
+ typeMap.set('hadUpdate', getLocale('HP_Updated'));
33
33
  typeMap.set('normalOkr', getLocale('OKR_MyO_Pop_Upd_Notrack'));
34
34
  typeMap.set('riskOkr', getLocale('OKR_MyO_Pop_Upd_Atrisk'));
35
35
  typeMap.set('dalyOkr', getLocale('OKR_MyO_Pop_Upd_Postoned'));
@@ -5,7 +5,6 @@
5
5
  padding: 20px 32px;
6
6
  font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica,
7
7
  sans-serif, PingFang SC, Microsoft YaHei;
8
- height: 100%;
9
8
  &__header {
10
9
  display: flex;
11
10
  align-items: center;
@@ -31,8 +30,38 @@
31
30
  top: 3px;
32
31
  }
33
32
  }
33
+ &-btn {
34
+ width: 64px;
35
+ height: 28px;
36
+ box-sizing: border-box;
37
+ padding: 3px 18px;
38
+ background: rgba(40, 121, 255, 0.2);
39
+ border-radius: 14px;
40
+ font-size: 14px;
41
+ color: #2879FF;
42
+ line-height: 22px;
43
+ cursor: pointer;
44
+ &:hover {
45
+ color: #fff;
46
+ background-color: #2879ff;
47
+ }
48
+ }
34
49
  }
35
50
  &__form {
36
51
  width: 342px;
37
52
  }
53
+ .form-field-input__border {
54
+ padding: 0;
55
+ border: none;
56
+ background-color: #fff;
57
+ }
58
+ .form-field-input__label-text {
59
+ font-weight: 600;
60
+ }
61
+ .form-field-input__input {
62
+ background-color: #fff;
63
+ }
64
+ .form-field-input__border--disabled input:disabled {
65
+ background-color: #fff;
66
+ }
38
67
  }