Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
5452ce6e
Commit
5452ce6e
authored
Dec 15, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户模块批量上传优化
parent
8031fe53
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
ResultPageFailed.tsx
...es/UserManagement/LIFEUserManagement/ResultPageFailed.tsx
+1
-1
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+15
-10
No files found.
src/pages/UserManagement/LIFEUserManagement/ResultPageFailed.tsx
View file @
5452ce6e
...
@@ -24,7 +24,7 @@ const ResultPageFailed = (props: any) => {
...
@@ -24,7 +24,7 @@ const ResultPageFailed = (props: any) => {
subTitle=
{
<
p
>
server has been handled it ,please try again or back.
</
p
>
}
subTitle=
{
<
p
>
server has been handled it ,please try again or back.
</
p
>
}
extra=
{
[
extra=
{
[
<
Button
type=
"primary"
key=
"ok"
>
<
Button
type=
"primary"
key=
"ok"
>
{
/* <a href={'http://47.74.233.180:8651/tos/excel/down?operator_id=' +
getCookie('id')
}>
{
/* <a href={'http://47.74.233.180:8651/tos/excel/down?operator_id=' +
resultId
}>
Download
Download
</a> */
}
</a> */
}
<
a
href=
{
'http://192.168.1.28:8651/tos/excel/down?operator_id='
+
resultId
}
>
Download
</
a
>
<
a
href=
{
'http://192.168.1.28:8651/tos/excel/down?operator_id='
+
resultId
}
>
Download
</
a
>
...
...
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
5452ce6e
...
@@ -47,7 +47,7 @@ const Users = (props: any) => {
...
@@ -47,7 +47,7 @@ const Users = (props: any) => {
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
fileUploading
,
setFileUploading
]
=
useState
(
false
);
const
[
fileUploading
,
setFileUploading
]
=
useState
(
false
);
const
[
compent
,
setCompent
]
=
useState
({
loading
:
false
,
fileUploading
:
false
});
//
const [compent, setCompent] = useState({ loading: false, fileUploading: false });
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
||
''
;
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
||
''
;
const
id
=
JSON
.
parse
(
userInfo
).
userModel
.
id
;
const
id
=
JSON
.
parse
(
userInfo
).
userModel
.
id
;
...
@@ -108,9 +108,12 @@ const Users = (props: any) => {
...
@@ -108,9 +108,12 @@ const Users = (props: any) => {
if
(
info
.
file
.
status
==
'uploading'
)
{
if
(
info
.
file
.
status
==
'uploading'
)
{
setFileUploading
(
true
);
setFileUploading
(
true
);
}
}
console
.
log
(
info
);
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
response
.
error_code
==
'0000'
)
{
if
(
info
.
file
.
response
.
error_code
==
'0000'
)
{
history
.
push
(
location
.
pathname
+
'/Result'
);
history
.
push
(
location
.
pathname
+
'/Result'
);
}
else
if
(
info
.
file
.
response
.
error_code
==
'0002'
)
{
message
.
error
(
info
.
file
.
response
.
error_msg
);
}
else
{
}
else
{
history
.
push
(
location
.
pathname
+
'/ResultFailed'
);
history
.
push
(
location
.
pathname
+
'/ResultFailed'
);
message
.
error
(
message
.
error
(
...
@@ -250,15 +253,17 @@ const Users = (props: any) => {
...
@@ -250,15 +253,17 @@ const Users = (props: any) => {
</
button
>
</
button
>
<
div
className=
{
styles
.
buttonAdd
}
>
<
div
className=
{
styles
.
buttonAdd
}
>
<
Upload
{
...
propsUpload
}
>
<
Upload
{
...
propsUpload
}
>
<
Button
icon=
{
compent
.
fileUploading
?
null
:
<
UploadOutlined
/>
}
>
<
Button
{
compent
.
fileUploading
?
(
disabled=
{
fileUploading
}
<>
icon=
{
<
Spin
indicator=
{
<
LoadingOutlined
style=
{
{
fontSize
:
16
}
}
spin
/>
}
/>
fileUploading
?
(
Uploading
<
LoadingOutlined
style=
{
{
fontSize
:
16
}
}
spin
/>
</>
)
:
(
)
:
(
<
UploadOutlined
/>
'Batch Upload'
)
)
}
}
>
{
fileUploading
?
'Uploading'
:
'Batch Upload'
}
</
Button
>
</
Button
>
</
Upload
>
</
Upload
>
</
div
>
</
div
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment