Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.CadastralSystem
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
9acbfe0d
authored
2020-12-14 20:01:27 +0800
by
weimo934
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refactor(fjcl):文件上传修改
1 parent
b12f6345
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
21 deletions
src/views/zd/fjcl/fjcl.vue
src/views/zd/fjcl/fjcl.vue
View file @
9acbfe0
...
...
@@ -3,6 +3,7 @@
<el-upload
class=
"upload-demo"
action=
"/api/file/uploadList"
:data=
"fileData"
:on-preview=
"handlePreview"
:on-remove=
"handleRemove"
:before-remove=
"beforeRemove"
...
...
@@ -50,9 +51,13 @@
name
:
"fjcl"
,
data
()
{
return
{
fileData
:{
glbsm
:
''
,
dylx
:
''
},
list
:
[
],
filesData
:
{
/*
filesData: {
dylx: "",
glbsm: "",
list: [
...
...
@@ -63,7 +68,7 @@
preViewUrl:""
}
]
},
},
*/
}
},
mounted
()
{
...
...
@@ -101,28 +106,27 @@
window
.
open
(
`/api/file/download?url=`
+
url
);
},
getFileList
()
{
console
.
log
(
this
.
$route
.
name
,
'NAME'
)
switch
(
this
.
$route
.
name
)
{
case
"宗地"
:
this
.
file
s
Data
.
dylx
=
'zd'
;
this
.
file
s
Data
.
glbsm
=
this
.
$store
.
state
.
zdbsm
this
.
fileData
.
dylx
=
'zd'
;
this
.
fileData
.
glbsm
=
this
.
$store
.
state
.
zdbsm
break
;
case
"自然幢"
:
this
.
file
s
Data
.
dylx
=
'zrz'
;
this
.
file
s
Data
.
glbsm
=
this
.
$store
.
state
.
zrzbsm
this
.
fileData
.
dylx
=
'zrz'
;
this
.
fileData
.
glbsm
=
this
.
$store
.
state
.
zrzbsm
break
case
"多幢"
:
this
.
file
s
Data
.
dylx
=
'dz'
;
this
.
file
s
Data
.
glbsm
=
this
.
$store
.
state
.
dzbsm
this
.
fileData
.
dylx
=
'dz'
;
this
.
fileData
.
glbsm
=
this
.
$store
.
state
.
dzbsm
break
case
"户"
:
this
.
file
s
Data
.
dylx
=
'h'
;
this
.
file
s
Data
.
glbsm
=
this
.
$store
.
state
.
hbsm
this
.
fileData
.
dylx
=
'h'
;
this
.
fileData
.
glbsm
=
this
.
$store
.
state
.
hbsm
break
;
default
:
break
}
getFileLis
(
this
.
file
s
Data
.
glbsm
).
then
(
res
=>
{
getFileLis
(
this
.
fileData
.
glbsm
).
then
(
res
=>
{
if
(
res
.
success
)
{
this
.
list
=
res
.
result
;
}
else
{
...
...
@@ -134,15 +138,7 @@
console
.
log
(
"上传文件失败"
,
err
)
},
uploadSuccess
(
res
,
file
,
fileList
)
{
this
.
filesData
.
list
=
res
.
result
;
insertFile
(
this
.
filesData
).
then
(
res
=>
{
if
(
res
.
success
)
{
Message
.
success
(
"上传成功"
)
this
.
getFileList
(
this
.
filesData
.
glbsm
)
}
else
{
Message
.
error
(
res
.
message
)
}
})
this
.
getFileList
();
},
handleRemove
(
file
,
fileList
)
{
console
.
log
(
file
,
fileList
);
...
...
Please
register
or
sign in
to post a comment