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
bc2e7b47
authored
2020-11-24 18:31:34 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://yun.pashanhoo.com:9090/renchao/CadastralSystem
2 parents
39eb31fd
4c8e4c22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
src/api/common.js
src/views/zd/fjcl/fjcl.vue
src/api/common.js
View file @
bc2e7b4
...
...
@@ -162,3 +162,17 @@ export function getFileLis(glbsm) {
}
})
}
/**
* 获取文件预览地址
*/
export
function
loadFile
(
url
)
{
return
request
({
url
:
"/file/loadImage"
,
method
:
'get'
,
params
:{
url
}
})
}
...
...
src/views/zd/fjcl/fjcl.vue
View file @
bc2e7b4
...
...
@@ -32,7 +32,7 @@
<td
class=
"lx"
>
{{
item
.
filepostfix
}}
</td>
<td
class=
"cz"
>
<span
@
click=
"downloadFile(item.fileurl)"
>
下载
</span>
<span>
预览
</span>
<span
@
click=
"loadFile(item.fileurl)"
>
预览
</span>
</td>
</tr>
</table>
...
...
@@ -40,7 +40,7 @@
</
template
>
<
script
>
import
{
insertFile
,
getFileLis
,
downloadFile
}
from
"./../../../api/common"
import
{
insertFile
,
getFileLis
,
downloadFile
,
loadFile
}
from
"./../../../api/common"
import
{
Message
}
from
"element-ui"
export
default
{
...
...
@@ -83,6 +83,13 @@
this
.
getFileList
(
this
.
filesData
.
glbsm
)
},
methods
:
{
loadFile
(
url
){
loadFile
(
url
).
then
(
res
=>
{
if
(
res
.
success
)
{
window
.
open
(
res
.
message
)
}
})
},
downloadFile
(
url
)
{
window
.
open
(
`/api/file/download?url=`
+
url
);
},
...
...
Please
register
or
sign in
to post a comment