Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
project_progress
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 83f4732b
authored
Jan 09, 2025
by
liangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限制大小
1 parent
a4101706
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletions
src/utils/http.js
src/views/assessZC/projectView.vue
src/utils/http.js
View file @
83f4732
...
...
@@ -88,6 +88,10 @@ axios.interceptors.response.use(response => {
return
response
;
}
},
err
=>
{
if
(
loadingInstance
)
{
loadingInstance
.
close
();
Message
.
error
(
'上传失败'
)
}
if
(
err
&&
err
.
response
)
{
console
.
log
(
'连接到服务器失败'
);
}
else
{
...
...
src/views/assessZC/projectView.vue
View file @
83f4732
...
...
@@ -245,6 +245,7 @@
return fileupdate(scope.row, res);
}
"
:before-upload="beforeUpload"
:on-change="uploadChange"
:with-credentials="true"
:auto-upload="true"
...
...
@@ -512,6 +513,14 @@ export default {
},
methods
:
{
beforeUpload
(
file
)
{
console
.
log
(
file
.
size
/
1024
/
1024
,
'多大'
)
const
isLt500M
=
file
.
size
/
1024
/
1024
<
500
;
if
(
!
isLt500M
)
{
this
.
$message
.
error
(
'上传的文件不能超过500MB!'
);
}
return
isLt500M
;
},
numberVal
(
val
)
{
this
.
$forceUpdate
();
},
...
...
@@ -767,7 +776,6 @@ export default {
// 移除附件
// 监控上传文件列表
uploadChange
(
file
,
fileList
)
{
// console.log(fileList, "this.fileList");
// let existFile = fileList
// .slice(0, fileList.length - 1)
// .find((f) => f.name === file.name);
...
...
Write
Preview
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