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
Show 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) => {
subTitle=
{
<
p
>
server has been handled it ,please try again or back.
</
p
>
}
extra=
{
[
<
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
</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) => {
const
[
loading
,
setLoading
]
=
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
id
=
JSON
.
parse
(
userInfo
).
userModel
.
id
;
...
...
@@ -108,9 +108,12 @@ const Users = (props: any) => {
if
(
info
.
file
.
status
==
'uploading'
)
{
setFileUploading
(
true
);
}
console
.
log
(
info
);
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
response
.
error_code
==
'0000'
)
{
history
.
push
(
location
.
pathname
+
'/Result'
);
}
else
if
(
info
.
file
.
response
.
error_code
==
'0002'
)
{
message
.
error
(
info
.
file
.
response
.
error_msg
);
}
else
{
history
.
push
(
location
.
pathname
+
'/ResultFailed'
);
message
.
error
(
...
...
@@ -250,15 +253,17 @@ const Users = (props: any) => {
</
button
>
<
div
className=
{
styles
.
buttonAdd
}
>
<
Upload
{
...
propsUpload
}
>
<
Button
icon=
{
compent
.
fileUploading
?
null
:
<
UploadOutlined
/>
}
>
{
compent
.
fileUploading
?
(
<>
<
Spin
indicator=
{
<
LoadingOutlined
style=
{
{
fontSize
:
16
}
}
spin
/>
}
/>
Uploading
</>
<
Button
disabled=
{
fileUploading
}
icon=
{
fileUploading
?
(
<
LoadingOutlined
style=
{
{
fontSize
:
16
}
}
spin
/>
)
:
(
'Batch Upload'
)
}
<
UploadOutlined
/>
)
}
>
{
fileUploading
?
'Uploading'
:
'Batch Upload'
}
</
Button
>
</
Upload
>
</
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