Commit 57324c19 by zhanghou

提交转pdf的接口用docx4j实现

parent 3ceda9fc
<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));
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment