|
|
|
@ -29,14 +29,9 @@ |
|
|
|
</el-button> |
|
|
|
<div class="edit-content "> |
|
|
|
<div class="content" style="width: 100%; height: 100%;"> |
|
|
|
<!-- <vue-html2pdf :show-layout="false" :float-layout="true" :enable-download="true" :preview-modal="true" |
|
|
|
:paginate-elements-by-height="1400" filename="我的文档" :pdf-quality="2" |
|
|
|
pdf-format="a4" pdf-orientation="portrait" @progress="onProgress" |
|
|
|
@hasStartedGeneration="hasStarted" @hasGenerated="hasGenerated" ref="html2Pdf"> |
|
|
|
--> |
|
|
|
<vue-html2pdf :show-layout="false" pdf-content-width="100%" :pdf-quality="3" :float-layout="false" |
|
|
|
pdf-orientation="landscape" :enable-download="true" :preview-modal="true" ref="html2Pdf" |
|
|
|
@hasStartedGeneration="hasStarted" @hasGenerated="hasGenerated"> |
|
|
|
pdf-orientation="landscape" :paginate-elements-by-height="794" :enable-download="true" :preview-modal="true" |
|
|
|
ref="html2Pdf" @hasStartedGeneration="hasStarted" @hasGenerated="hasGenerated"> |
|
|
|
<section slot="pdf-content"> |
|
|
|
<div class="pdf-content"> |
|
|
|
<TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="detail" /> |
|
|
|
@ -65,7 +60,6 @@ |
|
|
|
<div class="subtitle"> {{ $t('page.business.study.studyFormFill.jcgj') }}</div> |
|
|
|
</div> |
|
|
|
<JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" /> |
|
|
|
|
|
|
|
<pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal" |
|
|
|
@pagination="getJjcgjList" /> |
|
|
|
</div> |
|
|
|
@ -201,19 +195,6 @@ export default { |
|
|
|
this.$modal.closeLoading() |
|
|
|
}, |
|
|
|
generatePDF() { |
|
|
|
// 找到PDF内容并强制设置样式 |
|
|
|
const pdfContent = document.querySelector('.pdf-content-section, [slot="pdf-content"]') |
|
|
|
if (pdfContent) { |
|
|
|
pdfContent.style.cssText = ` |
|
|
|
background: white !important; |
|
|
|
min-height: 297mm !important; |
|
|
|
opacity: 1 !important; |
|
|
|
visibility: visible !important; |
|
|
|
position: relative !important; |
|
|
|
z-index: 1000 !important; |
|
|
|
` |
|
|
|
} |
|
|
|
// 然后生成PDF |
|
|
|
this.$refs.html2Pdf.generatePdf() |
|
|
|
}, |
|
|
|
exportExcel(jcgjlx) { |
|
|
|
|