@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.
- package/lib/components/dialog/index.css +4 -0
- package/lib/components/dialog/index.js +7 -6
- package/lib/components/form/form-fields/input/index.css +19 -5
- package/lib/components/form/form-fields/input/index.js +11 -8
- package/lib/components/form/form-fields/input-verification-code/index.css +117 -0
- package/lib/components/form/form-fields/input-verification-code/index.js +230 -0
- package/lib/components/form/form-fields/password/index.css +2 -2
- package/lib/components/form/form-fields/radios/index.js +1 -1
- package/lib/components/form/index.js +4 -1
- package/lib/components/grid-layout/near-visitors/index.js +4 -2
- package/lib/components/grid-layout/okr-align/index.js +4 -4
- package/lib/components/grid-layout/okr-progress/index.js +6 -6
- package/lib/components/grid-layout/okr-target/index.js +2 -2
- package/lib/components/grid-layout/over-view/index.js +1 -1
- package/lib/components/grid-layout/personal-info/index.js +5 -3
- package/lib/components/grid-layout/sub-employee-okr/index.js +1 -1
- package/lib/components/grid-layout/week-task/index.js +4 -4
- package/lib/components/grid-layout/words-cloud/index.js +5 -3
- package/lib/components/grid-page/personal-info/index.js +5 -3
- package/lib/components/img-viewer/index.js +1 -1
- package/lib/components/mblog/style.js +4 -4
- package/lib/components/nav-top/components/user-message/components/empty/index.js +4 -2
- package/lib/components/nav-top/components/user-message/msg/index.js +1 -1
- package/lib/components/okr-detail/base-info/base-info.js +4 -3
- package/lib/components/okr-detail/base-info/o-desc/index.js +2 -8
- package/lib/components/point-demo/constant.js +1 -3
- package/lib/components/point-demo/drop-down-box/index.js +1 -3
- package/lib/components/point-demo/index.js +8 -10
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.css +1 -1
- package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +2 -1
- package/lib/components/table/index.css +4 -0
- package/lib/components/table/index.js +3 -0
- package/lib/components/upload-photo-modal/constant.js +99 -0
- package/lib/components/upload-photo-modal/img/browser-preview-bgc.png +0 -0
- package/lib/components/upload-photo-modal/index.css +276 -0
- package/lib/components/upload-photo-modal/index.js +332 -0
- package/lib/components/upload-photo-modal/request-api.js +44 -0
- package/lib/components/user-selector/category-selector-panel/depart-tree.js +3 -0
- package/lib/components/user-selector/export-modules/field-tree-selector/index.css +1 -1
- package/lib/components/user-selector/export-modules/field-tree-selector/index.js +2 -0
- package/lib/components/user-selector/request-apis.js +1 -1
- package/lib/components/word-cloud/index.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/CommonList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/DepartmentList.js +1 -1
- package/lib/components-v1/userSelector/components/MultiMode/SubsList.js +1 -1
- package/lib/components-v1/userSelector/components/SingleMode.js +1 -1
- package/lib/index.js +8 -0
- package/lib/pages/home/components/data-list/index.js +2 -2
- package/lib/pages/home/components/data-list/nav-selector/index.js +2 -2
- package/lib/pages/home/components/data-list/table/columns/index.js +1 -1
- package/lib/pages/home/components/guide/index.js +14 -12
- package/lib/pages/home/components/header/index.js +3 -1
- package/lib/pages/home-page-data-list/index.js +2 -2
- package/lib/pages/personal-info/components/base-info/index.css +36 -1
- package/lib/pages/personal-info/components/base-info/index.js +22 -90
- package/lib/pages/personal-info/components/edit-info/index.js +192 -0
- package/lib/pages/personal-info/components/edit-info/input/index.css +89 -0
- package/lib/pages/personal-info/components/edit-info/input/index.js +199 -0
- package/lib/pages/personal-info/components/person-photo/index.css +88 -0
- package/lib/pages/personal-info/components/person-photo/index.js +86 -0
- package/lib/pages/personal-info/index.js +3 -1
- package/package.json +3 -1
- package/src/components/dialog/index.js +2 -1
- package/src/components/dialog/index.scss +3 -0
- package/src/components/form/form-fields/input/index.scss +16 -5
- package/src/components/form/form-fields/input/index.tsx +9 -4
- package/src/components/form/form-fields/input-verification-code/index.scss +108 -0
- package/src/components/form/form-fields/input-verification-code/index.tsx +171 -0
- package/src/components/form/form-fields/password/index.scss +2 -2
- package/src/components/form/form-fields/radios/index.tsx +2 -2
- package/src/components/form/index.tsx +2 -0
- package/src/components/grid-layout/near-visitors/index.tsx +3 -2
- package/src/components/grid-layout/okr-align/index.tsx +4 -4
- package/src/components/grid-layout/okr-progress/index.tsx +6 -6
- package/src/components/grid-layout/okr-target/index.tsx +2 -2
- package/src/components/grid-layout/over-view/index.tsx +1 -1
- package/src/components/grid-layout/personal-info/index.tsx +4 -3
- package/src/components/grid-layout/sub-employee-okr/index.tsx +1 -1
- package/src/components/grid-layout/week-task/index.tsx +3 -3
- package/src/components/grid-layout/words-cloud/index.tsx +4 -3
- package/src/components/grid-page/personal-info/index.tsx +4 -3
- package/src/components/img-viewer/index.tsx +1 -1
- package/src/components/mblog/style.ts +5 -5
- package/src/components/nav-top/components/user-message/components/empty/index.tsx +3 -2
- package/src/components/nav-top/components/user-message/msg/index.tsx +1 -1
- package/src/components/okr-detail/base-info/base-info.tsx +2 -4
- package/src/components/okr-detail/base-info/o-desc/index.tsx +0 -7
- package/src/components/point-demo/constant.ts +1 -3
- package/src/components/point-demo/drop-down-box/index.js +1 -2
- package/src/components/point-demo/index.js +8 -9
- package/src/components/publish-dynamic-modal/publish-dynamic-modal.scss +1 -1
- package/src/components/publish-dynamic-modal/publish-dynamic-modal.tsx +1 -0
- package/src/components/table/index.js +1 -0
- package/src/components/table/index.scss +5 -0
- package/src/components/upload-photo-modal/constant.ts +71 -0
- package/src/components/upload-photo-modal/img/browser-preview-bgc.png +0 -0
- package/src/components/upload-photo-modal/index.scss +248 -0
- package/src/components/upload-photo-modal/index.tsx +236 -0
- package/src/components/upload-photo-modal/request-api.ts +23 -0
- package/src/components/user-selector/category-selector-panel/depart-tree.tsx +3 -2
- package/src/components/user-selector/export-modules/field-tree-selector/index.scss +1 -1
- package/src/components/user-selector/export-modules/field-tree-selector/index.tsx +3 -0
- package/src/components/user-selector/request-apis.js +1 -1
- package/src/components/word-cloud/index.js +1 -1
- package/src/components-v1/userSelector/components/MultiMode/CommonList.tsx +1 -1
- package/src/components-v1/userSelector/components/MultiMode/DepartmentList.tsx +1 -1
- package/src/components-v1/userSelector/components/MultiMode/SubsList.tsx +1 -1
- package/src/components-v1/userSelector/components/SingleMode.tsx +1 -1
- package/src/index.js +1 -0
- package/src/pages/home/components/data-list/index.tsx +2 -2
- package/src/pages/home/components/data-list/nav-selector/index.tsx +2 -2
- package/src/pages/home/components/data-list/table/columns/index.tsx +1 -1
- package/src/pages/home/components/guide/index.tsx +13 -12
- package/src/pages/home/components/header/index.tsx +2 -1
- package/src/pages/home-page-data-list/index.tsx +2 -2
- package/src/pages/personal-info/components/base-info/index.scss +30 -1
- package/src/pages/personal-info/components/base-info/index.tsx +26 -97
- package/src/pages/personal-info/components/edit-info/index.tsx +152 -0
- package/src/pages/personal-info/components/edit-info/input/index.scss +82 -0
- package/src/pages/personal-info/components/edit-info/input/index.tsx +145 -0
- package/src/pages/personal-info/components/person-photo/index.scss +80 -0
- package/src/pages/personal-info/components/person-photo/index.tsx +49 -0
- package/src/pages/personal-info/index.tsx +2 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
.verification-code-input {
|
|
2
|
+
&-row{
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
.verification-code-input__label{
|
|
6
|
+
margin-bottom: unset;
|
|
7
|
+
}
|
|
8
|
+
.verification-code-input__border{
|
|
9
|
+
margin-left: 16px;
|
|
10
|
+
flex: 1;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
&__label {
|
|
14
|
+
height: 22px;
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
margin-bottom: 5px;
|
|
17
|
+
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
18
|
+
font-weight: 400;
|
|
19
|
+
line-height: 22px;
|
|
20
|
+
|
|
21
|
+
&-text {
|
|
22
|
+
color: #3f4755;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-require {
|
|
26
|
+
color: red;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__border {
|
|
31
|
+
padding: 6px 12px;
|
|
32
|
+
border-radius: 8px;
|
|
33
|
+
transition: all 0.2s;
|
|
34
|
+
border: 1px solid #e9ecf0;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
position: relative;
|
|
37
|
+
|
|
38
|
+
&--disabled {
|
|
39
|
+
background-color: #fafafa;
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
input:disabled {
|
|
42
|
+
background-color: #fafafa;
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
color: #3f475594;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
&__border--error {
|
|
49
|
+
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3) ;
|
|
50
|
+
border: 1px solid #f05e5e ;
|
|
51
|
+
}
|
|
52
|
+
&__border--active {
|
|
53
|
+
box-shadow: inset 0px 0px 4px 0px rgba(40, 121, 255, 0.3) !important;
|
|
54
|
+
border: 1px solid #2879ff !important;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__input {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
padding: 0;
|
|
60
|
+
width: calc(100% - 102px);
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
font-family: -apple-system, Arial, Verdana, Helvetica Neue, Helvetica, sans-serif, PingFang SC, Microsoft YaHei;
|
|
63
|
+
font-weight: 400;
|
|
64
|
+
color: #3f4755;
|
|
65
|
+
height: 22px;
|
|
66
|
+
line-height: inherit;
|
|
67
|
+
border: none;
|
|
68
|
+
flex: 1;
|
|
69
|
+
|
|
70
|
+
&::-webkit-input-placeholder {
|
|
71
|
+
color: #bfc7d5;
|
|
72
|
+
font-weight: unset;
|
|
73
|
+
}
|
|
74
|
+
&::-moz-placeholder {
|
|
75
|
+
color: #bfc7d5;
|
|
76
|
+
font-weight: unset;
|
|
77
|
+
}
|
|
78
|
+
&:-moz-placeholder {
|
|
79
|
+
color: #bfc7d5;
|
|
80
|
+
font-weight: unset;
|
|
81
|
+
}
|
|
82
|
+
&:-ms-input-placeholder {
|
|
83
|
+
color: #bfc7d5;
|
|
84
|
+
font-weight: unset;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
&__btn{
|
|
88
|
+
width: 100px;
|
|
89
|
+
height: 34px;
|
|
90
|
+
background: #D4E4FF;
|
|
91
|
+
border-radius: 0px 8px 8px 0px;
|
|
92
|
+
border-left: 1px solid #DFE3EA;
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
font-weight: 400;
|
|
95
|
+
color: #2879FF;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
line-height: 34px;
|
|
98
|
+
text-align: center;
|
|
99
|
+
position: absolute;
|
|
100
|
+
top: 0px;
|
|
101
|
+
right: 0;
|
|
102
|
+
&--not{
|
|
103
|
+
font-weight: 400;
|
|
104
|
+
color: #A4ACB9;
|
|
105
|
+
background: #F7F8FA;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import React, { useState, useRef, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import ToolTip from '../../../tooltip/error-tip';
|
|
4
|
+
import './index.scss';
|
|
5
|
+
|
|
6
|
+
const preCls = 'verification-code-input';
|
|
7
|
+
|
|
8
|
+
interface verify {
|
|
9
|
+
tip: string;
|
|
10
|
+
test: RegExp;
|
|
11
|
+
}
|
|
12
|
+
interface Props {
|
|
13
|
+
label: string;
|
|
14
|
+
verifies?: verify[];
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
onChange?: Function;
|
|
17
|
+
value?: any;
|
|
18
|
+
require?: boolean;
|
|
19
|
+
type?: string;
|
|
20
|
+
name: string;
|
|
21
|
+
getContainer?: Function;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
layout?: 'clomn'|'row';
|
|
24
|
+
btnClick?: Function;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
interface Error {
|
|
28
|
+
name: string;
|
|
29
|
+
tip: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const OverlayInner = ({ hasError, hasActive, tip }) => {
|
|
33
|
+
if (hasActive) return <span style={{ 'color': '#3F4755' }}>{tip}</span>;
|
|
34
|
+
if (hasError) return <span style={{ 'color': '#F05E5E' }}>{tip}</span>;
|
|
35
|
+
|
|
36
|
+
return <span />;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default forwardRef((props: Props, ref) => {
|
|
40
|
+
const {
|
|
41
|
+
label,
|
|
42
|
+
verifies,
|
|
43
|
+
placeholder,
|
|
44
|
+
onChange,
|
|
45
|
+
require,
|
|
46
|
+
type,
|
|
47
|
+
name,
|
|
48
|
+
disabled,
|
|
49
|
+
getContainer,
|
|
50
|
+
layout,
|
|
51
|
+
className="",
|
|
52
|
+
btnClick=()=>{},
|
|
53
|
+
} = props;
|
|
54
|
+
|
|
55
|
+
const inputRef = useRef<any>();
|
|
56
|
+
const [hasError, setHasError] = useState<boolean>(false);
|
|
57
|
+
const [hasActive, setHasActive] = useState<boolean>(false);
|
|
58
|
+
const [btn_info, setBtn_info] = useState<any>('获取验证码')
|
|
59
|
+
const [btnCanClick, setBtnCanClick] = useState<any>(true)
|
|
60
|
+
const [tip, setTip] = useState<string>('');
|
|
61
|
+
const [value, setValue] = useState<string>(props.value || '');
|
|
62
|
+
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
setValue(props.value);
|
|
65
|
+
}, [props.value])
|
|
66
|
+
|
|
67
|
+
const verifing = (): Error[] => {
|
|
68
|
+
const value = inputRef.current && inputRef.current.value;
|
|
69
|
+
if (!verifies || !verifies.length) return [];
|
|
70
|
+
if (!require && !value) return [];
|
|
71
|
+
const errors: Error[] = [];
|
|
72
|
+
for (let i = 0; i < verifies.length; i++) {
|
|
73
|
+
let { test, tip } = verifies[i];
|
|
74
|
+
if (!value.match(test)) {
|
|
75
|
+
errors.push({ name, tip });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return errors;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const onInputFocusHandler = () => {
|
|
82
|
+
setHasActive(true);
|
|
83
|
+
inputRef.current.setSelectionRange(9999999, 9999999);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const onBlurHandler = () => {
|
|
87
|
+
setHasActive(false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const onChangeHandler = () => {
|
|
91
|
+
const value = inputRef.current && inputRef.current.value;
|
|
92
|
+
onChange && onChange(value);
|
|
93
|
+
setValue(value);
|
|
94
|
+
const errors = verifing();
|
|
95
|
+
if (errors.length) {
|
|
96
|
+
setHasError(true);
|
|
97
|
+
setTip(errors[0].tip);
|
|
98
|
+
} else {
|
|
99
|
+
setHasError(false);
|
|
100
|
+
setTip('');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const HandlerCode = () =>{
|
|
105
|
+
const errors = verifing();
|
|
106
|
+
if (errors.length) return
|
|
107
|
+
if(!btnCanClick || hasError) return
|
|
108
|
+
btnClick&&btnClick()
|
|
109
|
+
let time = 60
|
|
110
|
+
setBtn_info(`${time}s重新发送`)
|
|
111
|
+
setBtnCanClick(false)
|
|
112
|
+
let timer = setInterval(() => {
|
|
113
|
+
if (time === 0) {
|
|
114
|
+
clearInterval(timer)
|
|
115
|
+
setBtn_info('获取验证码')
|
|
116
|
+
setBtnCanClick(true)
|
|
117
|
+
} else {
|
|
118
|
+
setBtn_info(`${time}s重新发送`)
|
|
119
|
+
time--;
|
|
120
|
+
}
|
|
121
|
+
}, 1000);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
useImperativeHandle(ref, () => ({
|
|
125
|
+
'verifing': (): Error[] => {
|
|
126
|
+
const errors = verifing();
|
|
127
|
+
if (errors.length) {
|
|
128
|
+
setHasError(true);
|
|
129
|
+
setTip(errors[0].tip);
|
|
130
|
+
inputRef.current.focus();
|
|
131
|
+
}
|
|
132
|
+
return errors;
|
|
133
|
+
}
|
|
134
|
+
}))
|
|
135
|
+
|
|
136
|
+
return <div className={classNames(preCls,{[`${preCls}-row`]:layout==='row'},className)}>
|
|
137
|
+
<div className={classNames(`${preCls}__label`)}>
|
|
138
|
+
<span className={classNames(`${preCls}__label-text`)}>{label}</span>
|
|
139
|
+
{require && <span className={classNames(`${preCls}__label-require`)}>*</span>}
|
|
140
|
+
</div>
|
|
141
|
+
<div className={classNames(`${preCls}__border`, {
|
|
142
|
+
[`${preCls}__border--error`]: hasError,
|
|
143
|
+
[`${preCls}__border--active`]: hasActive,
|
|
144
|
+
[`${preCls}__border--disabled`]: disabled
|
|
145
|
+
})}>
|
|
146
|
+
<ToolTip
|
|
147
|
+
placement={'topLeft'}
|
|
148
|
+
destroyTooltipOnHide={true}
|
|
149
|
+
visible={(hasActive || hasError) && tip}
|
|
150
|
+
overlay={<OverlayInner hasActive={hasActive} hasError={hasError} tip={tip} />}
|
|
151
|
+
getTooltipContainer={getContainer}
|
|
152
|
+
>
|
|
153
|
+
<input
|
|
154
|
+
ref={inputRef}
|
|
155
|
+
type={type}
|
|
156
|
+
disabled={disabled}
|
|
157
|
+
className={classNames(`${preCls}__input`)}
|
|
158
|
+
value={value}
|
|
159
|
+
placeholder={placeholder}
|
|
160
|
+
onFocus={onInputFocusHandler}
|
|
161
|
+
onBlur={onBlurHandler}
|
|
162
|
+
onChange={onChangeHandler}
|
|
163
|
+
autoComplete='off'
|
|
164
|
+
/>
|
|
165
|
+
</ToolTip>
|
|
166
|
+
<div className={classNames(`${preCls}__btn`,{[`${preCls}__btn--not`]:!btnCanClick})} onClick={HandlerCode}>
|
|
167
|
+
{btn_info}
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
})
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
box-sizing: border-box;
|
|
25
25
|
}
|
|
26
26
|
&__border--error {
|
|
27
|
-
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3)
|
|
28
|
-
border: 1px solid #f05e5e
|
|
27
|
+
box-shadow: inset 0px 0px 4px 0px rgba(240, 94, 94, 0.3) ;
|
|
28
|
+
border: 1px solid #f05e5e ;
|
|
29
29
|
}
|
|
30
30
|
&__border--active {
|
|
31
31
|
box-shadow: inset 0px 0px 4px 0px rgba(40, 121, 255, 0.3);
|
|
@@ -50,10 +50,10 @@ export default forwardRef((props: Props, ref) => {
|
|
|
50
50
|
|
|
51
51
|
return (
|
|
52
52
|
<div className={`${prefixCls} ${className}`}>
|
|
53
|
-
|
|
53
|
+
{!!label&&<div className={`${prefixCls}__label`}>
|
|
54
54
|
<span className={`${prefixCls}__label-text`}>{label}</span>
|
|
55
55
|
{require && <span className={`${prefixCls}__label-symbol`}>*</span>}
|
|
56
|
-
</div>
|
|
56
|
+
</div>}
|
|
57
57
|
<div className={`${prefixCls}__radios`}>
|
|
58
58
|
{radios.map((radio) => (
|
|
59
59
|
<div className={`${prefixCls}__radios-item ${radioClass}`}>
|
|
@@ -8,6 +8,7 @@ import _FormFieldTextarea from "./form-fields/textarea";
|
|
|
8
8
|
import _FormFieldRadios from "./form-fields/radios";
|
|
9
9
|
import _FormFieldDropDown from "./form-fields/dropdown";
|
|
10
10
|
import _FormFieldGroup from "./form-fields/group";
|
|
11
|
+
import _FormFieldVerificationCode from "./form-fields/input-verification-code"
|
|
11
12
|
import { SingleLayout } from "./layout";
|
|
12
13
|
import "./index.scss";
|
|
13
14
|
|
|
@@ -100,6 +101,7 @@ const FormFields = {
|
|
|
100
101
|
Radios: _FormFieldRadios,
|
|
101
102
|
DropDown:_FormFieldDropDown,
|
|
102
103
|
GroupFields:_FormFieldGroup,
|
|
104
|
+
VerificationInput:_FormFieldVerificationCode,
|
|
103
105
|
};
|
|
104
106
|
//@ts-ignore
|
|
105
107
|
Form.Fields = FormFields
|
|
@@ -2,6 +2,7 @@ import React, { useState, useEffect } from "react";
|
|
|
2
2
|
import { CardTitle, Gap, CardContainer } from "../commen-components";
|
|
3
3
|
import Visitor from "./visitor";
|
|
4
4
|
import postComponentForData from "../util/network"
|
|
5
|
+
import { getLocale } from "../../../utils/getLocale";
|
|
5
6
|
|
|
6
7
|
import "./index.scss";
|
|
7
8
|
|
|
@@ -27,13 +28,13 @@ export default function VisitorsComponents() {
|
|
|
27
28
|
return (
|
|
28
29
|
<CardContainer styles={{ padding: '12px 16px' }}>
|
|
29
30
|
<CardTitle
|
|
30
|
-
content='
|
|
31
|
+
content={getLocale('HP_RecentVisitors')}
|
|
31
32
|
iconUrl={require('../image/Recent-visitors.png')}
|
|
32
33
|
/>
|
|
33
34
|
<Gap />
|
|
34
35
|
{
|
|
35
36
|
visitorList.length === 0
|
|
36
|
-
? <div className="nearVisitors-Component-noOneText"
|
|
37
|
+
? <div className="nearVisitors-Component-noOneText" >{getLocale('HP_Peoplevisited')}</div>
|
|
37
38
|
: <div className="nearVisitors-Component-visitor">
|
|
38
39
|
{
|
|
39
40
|
// 固定为最近访问的8个用户
|
|
@@ -52,18 +52,18 @@ export default function OKRAlignComponent() {
|
|
|
52
52
|
return (
|
|
53
53
|
<CardContainer styles={{ padding: '20px 22px 0' }}>
|
|
54
54
|
<CardTitle
|
|
55
|
-
content='
|
|
55
|
+
content={getLocale('HP_OKRAlignment')}
|
|
56
56
|
iconUrl={require('../image/align.png')}
|
|
57
|
-
tips='
|
|
57
|
+
tips={getLocale('HP_SetOKR')}
|
|
58
58
|
/>
|
|
59
59
|
{
|
|
60
60
|
isMyOKREmpty
|
|
61
61
|
? <EmptyBackGround
|
|
62
62
|
imgSrc={require('../image/OKRalign-empty.png')}
|
|
63
|
-
content='
|
|
63
|
+
content={getLocale('HP_AligningOKR')}
|
|
64
64
|
behave={{
|
|
65
65
|
type: 'moreinfo',
|
|
66
|
-
text: '
|
|
66
|
+
text: getLocale('HP_Howaligninggoals'),
|
|
67
67
|
link: 'https://club.tita.com/18179.html'
|
|
68
68
|
}} />
|
|
69
69
|
: <CardFlexContent>
|
|
@@ -57,9 +57,9 @@ export default function OKRProgressComponent() {
|
|
|
57
57
|
return (
|
|
58
58
|
<CardContainer styles={{ padding: '20px 22px 0' }}>
|
|
59
59
|
<CardTitle
|
|
60
|
-
content=
|
|
60
|
+
content={getLocale('HP_Executiotasks')}
|
|
61
61
|
iconUrl={require('../image/Progress.png')}
|
|
62
|
-
tips=
|
|
62
|
+
tips={getLocale('HP_ProgressKROKR')}
|
|
63
63
|
>
|
|
64
64
|
{!isMyOKREmpty && (
|
|
65
65
|
<a
|
|
@@ -73,10 +73,10 @@ export default function OKRProgressComponent() {
|
|
|
73
73
|
{isMyOKREmpty ? (
|
|
74
74
|
<EmptyBackGround
|
|
75
75
|
imgSrc={require('../image/OKRprogress-empty.png')}
|
|
76
|
-
content=
|
|
76
|
+
content={getLocale('HP_Regulgoodwork')}
|
|
77
77
|
behave={{
|
|
78
78
|
type: 'moreinfo',
|
|
79
|
-
text: '
|
|
79
|
+
text: getLocale('HP_Learnupdate'),
|
|
80
80
|
link: 'https://club.tita.com/18179.html',
|
|
81
81
|
}}
|
|
82
82
|
/>
|
|
@@ -91,13 +91,13 @@ export default function OKRProgressComponent() {
|
|
|
91
91
|
num={hadUpdateOkrNum}
|
|
92
92
|
updataNum={weekLatelyUpdatekrProgress}
|
|
93
93
|
numColor="#3F4755"
|
|
94
|
-
label=
|
|
94
|
+
label={getLocale('HP_Updated')}
|
|
95
95
|
handleDataClick={() => handleDataClick('hadUpdate')}
|
|
96
96
|
/>
|
|
97
97
|
<DataItem
|
|
98
98
|
num={hadNotUpdateOkrNum}
|
|
99
99
|
numColor="#3F4755"
|
|
100
|
-
label=
|
|
100
|
+
label={getLocale('HP_Notupdated')}
|
|
101
101
|
handleDataClick={() => handleDataClick('hadNotUpdate')}
|
|
102
102
|
/>
|
|
103
103
|
</CardFlexContent>
|
|
@@ -94,11 +94,11 @@ export default function OKRTargetComponent() {
|
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
96
|
<CardContainer styles={{ padding: '20px 22px 0' }}>
|
|
97
|
-
<CardTitle content=
|
|
97
|
+
<CardTitle content={getLocale('HP_OKR')} iconUrl={require('../image/targer.png')} />
|
|
98
98
|
{isMyOKREmpty ? (
|
|
99
99
|
<EmptyBackGround
|
|
100
100
|
imgSrc={require('../image/OKRtarget-empty.png')}
|
|
101
|
-
content=
|
|
101
|
+
content={getLocale('HP_EffectiveOKRsetting')}
|
|
102
102
|
behave={{
|
|
103
103
|
type: 'button',
|
|
104
104
|
text: getLocale('OKR_MyO_Collr_Butt_CreatOKR'),
|
|
@@ -78,7 +78,7 @@ export default function OverviewComponent() {
|
|
|
78
78
|
<div className="OverviewComponent-dataContent">
|
|
79
79
|
<DataItem num={allOkrCount} numColor="#3F4755" label={getLocale('Mod_Objective')} updataNum={allOkrInWeekCount} handleDataClick={handleTargetClick} />
|
|
80
80
|
<DataItem num={allMyKrCount} numColor="#3F4755" label={getLocale('Mod_KeyResults')} updataNum={0} />
|
|
81
|
-
<DataItem num={allMyTaskCount} numColor="#3F4755" label='
|
|
81
|
+
<DataItem num={allMyTaskCount} numColor="#3F4755" label={getLocale('HP_Executiotasks')} updataNum={0} />
|
|
82
82
|
</div>
|
|
83
83
|
</Fragment>
|
|
84
84
|
</CardFlexContent>
|
|
@@ -5,6 +5,7 @@ import postComponentForData from '../util/network';
|
|
|
5
5
|
import Avatar from '../../avatar';
|
|
6
6
|
import Tooltip from '../../tooltip';
|
|
7
7
|
import { OpenUserName, OpenDepartmentName } from '../../../utils/open-data';
|
|
8
|
+
import { getLocale } from '../../../utils/getLocale';
|
|
8
9
|
|
|
9
10
|
import './index.scss';
|
|
10
11
|
|
|
@@ -145,10 +146,10 @@ export default function PersonalInfoComponent() {
|
|
|
145
146
|
<div className="PersonalInfoComponent-PersonalInfo__fansinfo">
|
|
146
147
|
<span className="PersonalInfoComponent-PersonalInfo__fansinfo__attention">
|
|
147
148
|
<img src={require('../image/visit-icon.png')} /> <b>{fansNum}</b>
|
|
148
|
-
|
|
149
|
+
{getLocale('HP_peoplefollow')}
|
|
149
150
|
</span>
|
|
150
151
|
<span className="PersonalInfoComponent-PersonalInfo__fansinfo__like">
|
|
151
|
-
<img src={require('../image/liking.png')} /> <b>{likeNum}</b
|
|
152
|
+
<img src={require('../image/liking.png')} /> <b>{likeNum}</b>{getLocale('HP_Kudos')}
|
|
152
153
|
</span>
|
|
153
154
|
</div>
|
|
154
155
|
{scrollMessage.name && scrollMessage.name.length ? (
|
|
@@ -160,7 +161,7 @@ export default function PersonalInfoComponent() {
|
|
|
160
161
|
) : (
|
|
161
162
|
//@ts-ignore
|
|
162
163
|
<AvatarTips
|
|
163
|
-
content="🥰
|
|
164
|
+
content={"🥰 "+getLocale('HP_Smallwindow')}
|
|
164
165
|
styles={{ height: '28px', padding: '0 28px', lineHeight: '28px' }}
|
|
165
166
|
/>
|
|
166
167
|
)}
|
|
@@ -55,7 +55,7 @@ export default function SubOKRComponents() {
|
|
|
55
55
|
)
|
|
56
56
|
} else {
|
|
57
57
|
return <EmptyBackGround
|
|
58
|
-
imgSrc={require('../image/sub-empty.png')} content='
|
|
58
|
+
imgSrc={require('../image/sub-empty.png')} content={getLocale('HP_Noavailable')}
|
|
59
59
|
styles={{ display: 'flex', flexDirection: 'column', justifyContent: 'center' }}
|
|
60
60
|
/>
|
|
61
61
|
}
|
|
@@ -53,15 +53,15 @@ export default function WeekTaskComponent() {
|
|
|
53
53
|
isMyOKREmpty
|
|
54
54
|
? <EmptyBackGround
|
|
55
55
|
imgSrc={require('../image/weektask-empty.png')}
|
|
56
|
-
content='
|
|
56
|
+
content={getLocale('HP_AligningOKR')}
|
|
57
57
|
behave={{
|
|
58
58
|
type: 'button',
|
|
59
59
|
text: getLocale('Pro_page_Mil_Butt_Createatask'),
|
|
60
60
|
onClick: e => toWeekPlan()
|
|
61
61
|
}} />
|
|
62
62
|
: <CardFlexContent>
|
|
63
|
-
<DataItem num={unFinishTaskOnWeek} numColor="#2879FF" label='
|
|
64
|
-
<DataItem num={finishTaskOnWeek} numColor="#5AD8A6" label='
|
|
63
|
+
<DataItem num={unFinishTaskOnWeek} numColor="#2879FF" label={getLocale('HP_Unfinishedweek')} Qtips={getLocale('HP_Thetasksweek')} handleDataClick={() => toWeekPlan()} />
|
|
64
|
+
<DataItem num={finishTaskOnWeek} numColor="#5AD8A6" label={getLocale('HP_Finishedweek')} handleDataClick={() => toWeekPlan()} />
|
|
65
65
|
<DataItem num={dueTaskOnWeek} numColor="#F05E5E" label={getLocale('OKR_MyO_E_Overdue')} handleDataClick={() => toWeekPlan()} />
|
|
66
66
|
</CardFlexContent>
|
|
67
67
|
}
|
|
@@ -6,6 +6,7 @@ import postComponentForData from "../util/network"
|
|
|
6
6
|
import lvMask from '../image/lv'
|
|
7
7
|
import couldMask from '../image/could'
|
|
8
8
|
import titaMask from '../image/tita-mask'
|
|
9
|
+
import { getLocale } from "../../../utils/getLocale";
|
|
9
10
|
|
|
10
11
|
const ComponentId = 'Enterprise-Focus-Hotspots'
|
|
11
12
|
|
|
@@ -35,9 +36,9 @@ export default function WordCloudComponent() {
|
|
|
35
36
|
return (
|
|
36
37
|
<CardContainer styles={{ padding: '20px 22px 0' }}>
|
|
37
38
|
<CardTitle
|
|
38
|
-
content=
|
|
39
|
+
content={getLocale('HP_Hotcompanies')}
|
|
39
40
|
iconUrl={require('../image/Collaboration.png')}
|
|
40
|
-
tips=
|
|
41
|
+
tips={getLocale('HP_Theenterprise')}
|
|
41
42
|
>
|
|
42
43
|
{wordsData.length === 0 && (
|
|
43
44
|
<Advice
|
|
@@ -45,7 +46,7 @@ export default function WordCloudComponent() {
|
|
|
45
46
|
link="https://wpa1.qq.com/o6X4XD1n?_type=wpa&qidian=true"
|
|
46
47
|
>
|
|
47
48
|
<img src={require('../image/advise.svg')} />
|
|
48
|
-
|
|
49
|
+
{getLocale('HP_Upgradeview')}
|
|
49
50
|
</Advice>
|
|
50
51
|
)}
|
|
51
52
|
</CardTitle>
|
|
@@ -5,6 +5,7 @@ import postComponentForData from '../util/network';
|
|
|
5
5
|
import Avatar from '../../avatar';
|
|
6
6
|
import Tooltip from '../../tooltip';
|
|
7
7
|
import { OpenUserName, OpenDepartmentName } from '../../../utils/open-data';
|
|
8
|
+
import { getLocale } from '../../../utils/getLocale';
|
|
8
9
|
|
|
9
10
|
import './index.scss';
|
|
10
11
|
|
|
@@ -145,10 +146,10 @@ export default function PersonalInfoComponent() {
|
|
|
145
146
|
<div className="PersonalInfoComponent-PersonalInfo__fansinfo">
|
|
146
147
|
<span className="PersonalInfoComponent-PersonalInfo__fansinfo__attention">
|
|
147
148
|
<img src={require('../image/visit-icon.png')} /> <b>{fansNum}</b>
|
|
148
|
-
|
|
149
|
+
{getLocale('HP_peoplefollow')}
|
|
149
150
|
</span>
|
|
150
151
|
<span className="PersonalInfoComponent-PersonalInfo__fansinfo__like">
|
|
151
|
-
<img src={require('../image/liking.png')} /> <b>{likeNum}</b
|
|
152
|
+
<img src={require('../image/liking.png')} /> <b>{likeNum}</b>{getLocale('HP_Kudos')}
|
|
152
153
|
</span>
|
|
153
154
|
</div>
|
|
154
155
|
{scrollMessage.name && scrollMessage.name.length ? (
|
|
@@ -160,7 +161,7 @@ export default function PersonalInfoComponent() {
|
|
|
160
161
|
) : (
|
|
161
162
|
//@ts-ignore
|
|
162
163
|
<AvatarTips
|
|
163
|
-
content="🥰
|
|
164
|
+
content={"🥰 "+getLocale('HP_Smallwindow')}
|
|
164
165
|
styles={{ height: '28px', padding: '0 28px', lineHeight: '28px' }}
|
|
165
166
|
/>
|
|
166
167
|
)}
|
|
@@ -99,7 +99,7 @@ const ImgViewer: FC<IImgViewerProps> = forwardRef(
|
|
|
99
99
|
<div className={prefix + "__header"}>
|
|
100
100
|
<span className={prefix + "__header-file-name"}>
|
|
101
101
|
<Tooltip.Text
|
|
102
|
-
text={currentImgData.fileName}
|
|
102
|
+
text={currentImgData && currentImgData.fileName || ''}
|
|
103
103
|
isPercent
|
|
104
104
|
minusWidth={60}
|
|
105
105
|
/>
|
|
@@ -21,8 +21,8 @@ export const MBlogBox = styled.div`
|
|
|
21
21
|
// MblogContent
|
|
22
22
|
export const DivMblogContent = styled.div`
|
|
23
23
|
padding: 8px 10px 6px;
|
|
24
|
-
border: 1px solid #
|
|
25
|
-
border-radius:
|
|
24
|
+
border: 1px solid #DFE3EA;
|
|
25
|
+
border-radius: 8px;
|
|
26
26
|
background-color: #fff;
|
|
27
27
|
position: relative;
|
|
28
28
|
transition: all .2s ease-in-out;
|
|
@@ -81,7 +81,7 @@ export const Tips = styled.div`
|
|
|
81
81
|
// MblogAction
|
|
82
82
|
export const MblogActionWrapper = styled.div`
|
|
83
83
|
height: 30px;
|
|
84
|
-
padding:
|
|
84
|
+
padding: 28px 0 2px 0;
|
|
85
85
|
font-size: 13px;
|
|
86
86
|
line-height: 20px;
|
|
87
87
|
color: #565E66;
|
|
@@ -169,7 +169,7 @@ export const RightBtnGroupWrapper = styled.div`
|
|
|
169
169
|
min-width: 90px;
|
|
170
170
|
height: 32px;
|
|
171
171
|
box-sizing: border-box;
|
|
172
|
-
border-radius:
|
|
172
|
+
border-radius: 18px;
|
|
173
173
|
border: none;
|
|
174
174
|
}
|
|
175
175
|
`
|
|
@@ -219,7 +219,7 @@ export const BtnConfirm = styled.button`
|
|
|
219
219
|
color: #ffffff;
|
|
220
220
|
background: #2879FF;
|
|
221
221
|
white-space: nowrap;
|
|
222
|
-
border-radius:
|
|
222
|
+
border-radius: 18px;
|
|
223
223
|
|
|
224
224
|
&.disabled {
|
|
225
225
|
color: #ffffff;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import empty from '../../images/empty-img.svg';
|
|
4
4
|
import ConditionRender from '../../../../../condition-render';
|
|
5
|
+
import { getLocale } from '../../../../../../utils/getLocale';
|
|
5
6
|
import './index.scss';
|
|
6
7
|
|
|
7
8
|
const preCls = 'titaui-user-message-msg-empty';
|
|
@@ -12,10 +13,10 @@ const Empty = (props) => {
|
|
|
12
13
|
return (
|
|
13
14
|
<div className={classNames(`${preCls}__empty`)}>
|
|
14
15
|
<img src={empty} />
|
|
15
|
-
<div className={classNames(`${preCls}__empty-text`)}
|
|
16
|
+
<div className={classNames(`${preCls}__empty-text`)}>{getLocale('Menu_Title_NoNews')}</div>
|
|
16
17
|
<ConditionRender condition={tabPath !== null}>
|
|
17
18
|
<a target="_blank" href={tabPath} className={classNames(`${preCls}__empty-all`)}>
|
|
18
|
-
|
|
19
|
+
{getLocale('Menu_Title_ViewNews')}
|
|
19
20
|
</a>
|
|
20
21
|
</ConditionRender>
|
|
21
22
|
</div>
|
|
@@ -58,10 +58,8 @@ const BaseInfo: FC<IBaseInfoProps> = ({ okrId }) => {
|
|
|
58
58
|
|
|
59
59
|
const { okrInfo, setOkrInfo } = useContext(CommonContext);
|
|
60
60
|
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
);
|
|
64
|
-
// const [desc, setDesc] = useState(decodeURI(encodeURI(okrInfo.description)));
|
|
61
|
+
const originDesc = decodeURI(encodeURI(okrInfo.description)) === 'null' ? '' : decodeURI(encodeURI(okrInfo.description));
|
|
62
|
+
const [originalDesc, setOriginalDesc] = useState(originDesc || "");
|
|
65
63
|
const [participant, setParticipant] = useState<IUser[]>([]);
|
|
66
64
|
const [followers, setFollowers] = useState<IUser[]>([]);
|
|
67
65
|
const [canEditAllInfo, setCanEditAllInfo] = useState(
|