Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
fukai
vue-gjjs
Commits
57324c19
Commit
57324c19
authored
Apr 13, 2023
by
zhanghou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交转pdf的接口用docx4j实现
parent
3ceda9fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
Show.vue
src/views/Docpan/Show.vue
+6
-0
No files found.
src/views/Docpan/Show.vue
View file @
57324c19
<
template
>
<div>
<el-button
@
click=
"downLoad"
>
点击下载word文件
</el-button>
<!--
<el-button
@
click=
"downLoadPdf"
>
点击下载pdf文件
</el-button>
-->
<div
class=
"docWrap"
>
<!-- 预览文件的地方(用于渲染) -->
<div
ref=
"file"
></div>
...
...
@@ -45,6 +46,11 @@ export default {
document
.
body
.
appendChild
(
a
);
// 将a标签追加到文档对象中
a
.
click
();
// 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a
.
remove
();
// 一次性的,用完就删除a标签
},
async
downLoadPdf
()
{
let
params
=
window
.
opener
[
"params"
];
let
docnam
=
params
.
docnam
let
res
=
await
Api
.
post
(
'/service/gitopn/download'
,
this
.
wrapper
(
docnam
));
}
}
};
...
...
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