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
fca46b7d
Commit
fca46b7d
authored
Jan 27, 2021
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户模块 批量上传适配safari 浏览器
parent
c5f0d091
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
12 deletions
+5
-12
config.ts
config/config.ts
+1
-1
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+4
-11
No files found.
config/config.ts
View file @
fca46b7d
...
...
@@ -191,7 +191,7 @@ export default defineConfig({
},
{
path
:
'./OwnerComplaints'
,
//
name: 'ownercomplaints',
name
:
'ownercomplaints'
,
component
:
'./CommercialService/PropertyServices'
,
},
{
...
...
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
fca46b7d
...
...
@@ -97,28 +97,21 @@ const Users = (props: any) => {
name
:
'file'
,
action
:
'/tos/excel/upload?userId='
+
id
,
beforeUpload
:
(
file
:
any
)
=>
{
console
.
log
(
file
);
if
(
permissionArr
.
indexOf
(
'4'
)
<
0
)
{
message
.
error
(
'No permissions'
);
return
false
;
}
if
(
file
.
type
!==
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
&&
file
.
type
!==
'application/vnd.ms-excel'
)
{
if
(
file
.
name
.
indexOf
(
'.xlsx'
)
===
-
1
&&
file
.
name
.
indexOf
(
'.xls'
)
===
-
1
)
{
message
.
error
(
`
${
file
.
name
}
file format is incorrect!`
);
return
false
;
}
else
{
return
true
;
}
return
(
file
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
||
file
.
type
===
'application/vnd.ms-excel'
);
},
onChange
(
info
:
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'
);
...
...
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