Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
99d1d646
Commit
99d1d646
authored
Feb 02, 2020
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传失败1
parent
21bc5ae9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
workDetails.vue
src/components/work/workDetails.vue
+10
-0
index.js
src/plug/index.js
+7
-2
No files found.
src/components/work/workDetails.vue
View file @
99d1d646
...
...
@@ -311,6 +311,7 @@
<div
style=
"margin-bottom:10px;width: 29%;"
>
附件上传:
<el-upload
ref=
"my-upload"
class=
"upload-demo"
drag
:http-request=
"uploadFileBtn"
...
...
@@ -399,6 +400,8 @@ export default {
this
.
attach
=
""
;
},
previewFile
(
e
)
{
window
.
open
(
this
.
attach
,
"_blank"
);
return
const
link
=
document
.
createElement
(
"a"
);
let
_loadUrl
=
this
.
domainManager
().
DomainUrl
;
let
str
=
window
.
location
.
href
;
...
...
@@ -407,6 +410,11 @@ export default {
link
.
click
();
},
uploadFileBtn
(
file
)
{
if
(
file
.
file
.
size
>
1024
*
1024
*
100
)
{
this
.
$message
.
warning
(
'上传文件不能大于100M'
);
this
.
$refs
[
'my-upload'
].
clearFiles
();
return
;
}
//上传
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
...
...
@@ -415,6 +423,8 @@ export default {
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
this
.
attach
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
this
.
$message
.
success
(
this
.
$t
(
"tips.scchenggong"
));
},
err
=>
{
});
},
init
(
id
)
{
...
...
src/plug/index.js
View file @
99d1d646
...
...
@@ -753,10 +753,15 @@ export default {
that
.
$http
.
post
(
uploadUrl
,
formData
,
{})
.
then
(
res
=>
{
successCall
(
res
);
})
}).
catch
(
function
(
reason
){
that
.
$refs
[
'my-upload'
].
clearFiles
();
that
.
$message
.
error
(
'上传失败!'
);
});
}
}).
catch
(
function
(
err
)
{
that
.
$refs
[
'my-upload'
].
clearFiles
();
that
.
$message
.
error
(
'上传失败!'
);
});
}
}
...
...
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