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
4c5fabaa
Commit
4c5fabaa
authored
Oct 11, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a371b088
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
8 deletions
+41
-8
BasicDocuments.vue
src/components/FinancialModule/BasicDocuments.vue
+41
-8
No files found.
src/components/FinancialModule/BasicDocuments.vue
View file @
4c5fabaa
...
...
@@ -872,11 +872,11 @@
<li
v-if=
"uploadImgList.length<10"
>
<el-upload
class=
"avatar-uploader"
:action=
"importFileUrl"
action=
""
:http-request=
"uploadFileBtn"
:show-file-list=
"false"
multiple
:limit=
"10"
:on-success=
"handleAvatarSuccess"
>
:multiple=
"true"
:limit=
"10"
>
<i
class=
"el-icon-plus avatar-uploader-icon"
></i>
<span
class=
"_upload_tips"
>
最多可上传10张图片
</span>
</el-upload>
...
...
@@ -1170,12 +1170,12 @@
</li>
<li
v-if=
"uploadImgList.length<10"
>
<el-upload
action=
""
class=
"avatar-uploader"
:
action=
"importFileUrl
"
:
http-request=
"uploadFileBtn
"
:show-file-list=
"false"
multiple
:limit=
"10"
:on-success=
"handleAvatarSuccess"
>
:multiple=
"true"
:limit=
"10"
>
<i
class=
"el-icon-plus avatar-uploader-icon"
></i>
<span
class=
"_upload_tips"
>
最多可上传10张图片
</span>
</el-upload>
...
...
@@ -2185,6 +2185,39 @@ export default {
deleteImg
(
i
){
// 删除
this
.
uploadImgList
.
splice
(
i
,
1
)
},
uploadFileBtn
(
file
)
{
//上传
if
(
file
.
file
.
size
>
1024
*
1024
*
10
)
{
this
.
$message
.
warning
(
this
.
$t
(
'tips.wjdxbncgsz'
))
return
}
// 1 文档 2 数据 3 图片
let
typeArr
=
[
{
stringArr
:
'GIF|JPG|JPEG|PNG|BMP'
,
type
:
3
},
{
stringArr
:
'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF'
,
type
:
1
},
]
let
ft
=
file
.
file
.
name
.
substring
(
file
.
file
.
name
.
lastIndexOf
(
'.'
)
+
1
,
file
.
file
.
name
.
length
).
toUpperCase
();
let
fileTypeNumber
=
2
;
let
typeOk
=
false
;
typeArr
.
forEach
(
x
=>
{
if
(
x
.
stringArr
.
indexOf
(
ft
)
!=
'-1'
)
{
fileTypeNumber
=
x
.
type
;
typeOk
=
true
;
}
})
if
(
!
typeOk
)
return
this
.
$message
.
error
(
this
.
$t
(
'tips.qscWEfile'
));
let
newArr
=
[];
newArr
.
push
(
file
.
file
)
let
path
=
"/Upload/Temporary/"
this
.
$message
.
info
(
this
.
$t
(
'tips.shangchuanzhong'
))
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
let
obj
=
{
src
:
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
}
this
.
uploadImgList
.
push
(
obj
)
this
.
$message
.
success
(
this
.
$t
(
'tips.scchenggong'
))
},
1
);
},
handleAvatarSuccess
(
res
,
file
)
{
//上传
if
(
res
.
resultCode
==
1
){
var
img_path
=
res
.
data
.
FullFilePath
...
...
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