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
164bf2a4
Commit
164bf2a4
authored
Jan 21, 2021
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户管理批零上传bug修复,适配老版本excel文档
parent
456aff51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+8
-7
No files found.
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
164bf2a4
...
@@ -95,21 +95,22 @@ const Users = (props: any) => {
...
@@ -95,21 +95,22 @@ const Users = (props: any) => {
// 上传的模块
// 上传的模块
const
propsUpload
=
{
const
propsUpload
=
{
name
:
'file'
,
name
:
'file'
,
// action: () => {
// // return 'http://47.74.233.180:8651/tos/excel/upload?userId=' + id;
// // return 'http://192.168.1.28:8651/tos/excel/upload?userId=' + id;
// return '/tos/excel/upload?userId=' + id;
// },
action
:
'/tos/excel/upload?userId='
+
id
,
action
:
'/tos/excel/upload?userId='
+
id
,
beforeUpload
:
(
file
:
any
)
=>
{
beforeUpload
:
(
file
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'4'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'4'
)
<
0
)
{
message
.
error
(
'No permissions'
);
message
.
error
(
'No permissions'
);
return
false
;
return
false
;
}
}
if
(
file
.
type
!==
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
)
{
if
(
file
.
type
!==
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
||
file
.
type
!==
'application/vnd.ms-excel'
)
{
message
.
error
(
`
${
file
.
name
}
file format is incorrect!`
);
message
.
error
(
`
${
file
.
name
}
file format is incorrect!`
);
}
}
return
file
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
;
return
(
file
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
||
file
.
type
===
'application/vnd.ms-excel'
);
},
},
onChange
(
info
:
any
)
{
onChange
(
info
:
any
)
{
if
(
info
.
file
.
status
==
'uploading'
)
{
if
(
info
.
file
.
status
==
'uploading'
)
{
...
...
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