diff --git a/src/views/business/study/comp/tbbd/Xq.vue b/src/views/business/study/comp/tbbd/Xq.vue index daa26ea..9a5a46b 100644 --- a/src/views/business/study/comp/tbbd/Xq.vue +++ b/src/views/business/study/comp/tbbd/Xq.vue @@ -27,9 +27,9 @@
- +
@@ -56,11 +56,11 @@ -
+
{{ $t('page.business.study.studyFormFill.jcgj') }}
- +
@@ -200,7 +200,7 @@ export default { showExport: false, qmxxExportList: [], jcgjExportList: [], - + jcgjlxExport:0 } }, computed: { @@ -213,6 +213,7 @@ export default { methods: { onProgress(progress) { console.log(`生成进度: ${progress}%`) + this.removePageBreak() if (progress == 100) { this.showExport = false this.$modal.closeLoading() @@ -220,8 +221,8 @@ export default { }, exportExcel(jcgjlx) { this.$modal.loading() + this.jcgjlxExport=jcgjlx this.showExport = true - this.$modal.loading() studyFormFill_jcgjqmxxList({ jcgjlx: jcgjlx, id: this.form.id }).then(response => { this.jcgjExportList = response.data.jcgj this.qmxxExportList = response.data.qmxx @@ -231,6 +232,12 @@ export default { }, 200); }) }, + //移除分页空白 + removePageBreak() { + document.querySelectorAll('.html2pdf__page-break').forEach(el => { + el.remove() + }) + }, exportExcel_bak(jcgjlx) { this.$modal.loading() studyFormFill_exportDetail(_.merge({}, this.queryParamsJcgj, { jcgjlx: jcgjlx, lang: this.$store.getters.language.split("_")[0] })).then(response => { @@ -339,6 +346,9 @@ export default { .pdf-content { padding: 20px; font-family: Arial, sans-serif; + page-break-inside: avoid !important; + break-inside: avoid !important; + page-break-after: avoid !important; } .pdf-content h1 { @@ -413,4 +423,8 @@ export default { line-height: 35px; text-align: center; } + +.html2pdf__page-break { + display: none !important; +} \ No newline at end of file