From a46109b414c95449d1b6b953fcff5d9a5315adae Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Sat, 31 Jan 2026 22:23:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/comps/template/TemplateTable.vue | 8 +- src/views/business/study/comp/tbbd/Xq.vue | 136 ++++++++++++++++----- 2 files changed, 107 insertions(+), 37 deletions(-) diff --git a/src/views/business/comps/template/TemplateTable.vue b/src/views/business/comps/template/TemplateTable.vue index e4f1713..c7862fc 100644 --- a/src/views/business/comps/template/TemplateTable.vue +++ b/src/views/business/comps/template/TemplateTable.vue @@ -81,10 +81,10 @@ export default { //色谱 'SP001': 'SP001', 'SP002': 'SP002', - 'SP003': 'SWYPBQGZYZBB', - 'SP004': 'SWYPNBGZYZBB', - 'SP005': 'SWYPNBGZYZBB', - 'SP006': 'SWYPNBGZYZBB', + 'SP003': 'SP003', + 'SP004': 'SP00456', + 'SP005': 'SP00456', + 'SP006': 'SP00456', 'SP008': 'ZQDYJMD', 'SP009': 'Recovery', 'SP010': 'QXWDX', diff --git a/src/views/business/study/comp/tbbd/Xq.vue b/src/views/business/study/comp/tbbd/Xq.vue index e2b3176..9f6320e 100644 --- a/src/views/business/study/comp/tbbd/Xq.vue +++ b/src/views/business/study/comp/tbbd/Xq.vue @@ -25,39 +25,52 @@ {{ $t('page.business.study.studyFormFill.dcbhsjgj') }} + 前端导出 +
-
-
- -
-
-
{{ $t('page.business.study.studyFormFill.qmxx') }}
-
-
- - - - - - -
-
- -
-
-
-
{{ $t('page.business.study.studyFormFill.jcgj') }}
-
- +
+ + +
+
+ +
+
+
{{ $t('page.business.study.studyFormFill.qmxx') }}
+
+
+ + + + + + +
+
+ +
+
+
+
{{ $t('page.business.study.studyFormFill.jcgj') }}
+
+ - -
+ +
+
+
@@ -96,7 +109,7 @@ - @@ -115,9 +128,10 @@ import { studyFormFill_tb, studyFormFill_info, studyFormFill_jcgj, studyFormFill import { mapGetters } from 'vuex' import JcgjList from "@/views/business/comps/common/JcgjList"; import TemplateTable from '@/views/business/comps/template/TemplateTable'; +import VueHtml2pdf from 'vue-html2pdf' export default { name: "Xq", - components: { JcgjList, TemplateTable }, + components: { JcgjList, TemplateTable, VueHtml2pdf }, data() { return { openApprove: false, @@ -175,6 +189,33 @@ export default { created() { }, methods: { + onProgress(progress) { + this.progress = progress + }, + hasStarted() { + this.$modal.loading() + console.log('PDF生成开始') + }, + hasGenerated() { + console.log('PDF生成完成') + 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) { this.$modal.loading() studyFormFill_exportDetail(_.merge({}, this.queryParamsJcgj, { jcgjlx: jcgjlx, lang: this.$store.getters.language.split("_")[0] })).then(response => { @@ -265,3 +306,32 @@ export default { } } + \ No newline at end of file