Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5e98a132
authored
2025-12-16 10:53:53 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 上传文件不符合条件删除问题
1 parent
0f5106a8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
src/components/Upload/index.vue
src/views/data_asset/components/deliverUploadDialog.vue
src/components/Upload/index.vue
View file @
5e98a13
...
...
@@ -39,7 +39,7 @@ const onUpload = async (file, list) => {
const
isExcel
=
file
.
raw
.
type
===
'application/vnd.ms-excel'
||
file
.
raw
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
||
file
.
raw
.
type
==
'text/csv'
;
if
(
!
isExcel
)
{
const
fileUpload
=
fileUploadRef
.
value
[
0
]
||
fileUploadRef
.
value
fileUpload
?.
handleRemove
(
file
)
fileUpload
?.
handleRemove
(
file
.
file
)
ElMessage
.
error
(
'上传文件只能是 .xls, .xlsx 格式'
);
return
false
;
}
...
...
src/views/data_asset/components/deliverUploadDialog.vue
View file @
5e98a13
...
...
@@ -260,13 +260,13 @@ const uploadFile = (file) => {
uploadTime
.
value
=
Moment
(
Date
.
now
()).
format
(
'YYYY-MM-DD HH:mm:ss'
);
ElMessage
.
success
(
'上传成功'
);
}
else
{
uploadRef
.
value
.
handleRemove
(
file
);
uploadRef
.
value
.
handleRemove
(
file
.
file
);
ElMessage
.
error
(
'上传失败,请重新上传!'
);
}
})
})
.
catch
(()
=>
{
uploadRef
.
value
.
handleRemove
(
file
);
uploadRef
.
value
.
handleRemove
(
file
.
file
);
ElMessage
.
error
(
'上传失败,请重新上传'
);
});
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment