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 1/4] =?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 From e68dd449151e9b0f9b5b60c25649b1eb27053d37 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Sat, 31 Jan 2026 22:41:13 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/business/study/comp/tbbd/Xq.vue | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/views/business/study/comp/tbbd/Xq.vue b/src/views/business/study/comp/tbbd/Xq.vue index 9f6320e..06f1130 100644 --- a/src/views/business/study/comp/tbbd/Xq.vue +++ b/src/views/business/study/comp/tbbd/Xq.vue @@ -29,14 +29,9 @@
- + pdf-orientation="landscape" :paginate-elements-by-height="794" :enable-download="true" :preview-modal="true" + ref="html2Pdf" @hasStartedGeneration="hasStarted" @hasGenerated="hasGenerated">
@@ -65,7 +60,6 @@
{{ $t('page.business.study.studyFormFill.jcgj') }}
-
@@ -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) { From b18cd143a0865f15978dc3a866110ba03de4d6cf Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Sun, 1 Feb 2026 10:14:41 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix=EF=BC=9A[=E6=A8=A1=E6=9D=BF=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Template/CustomTable.vue | 10 +++-- .../business/comps/template/comps/sp/SP003.vue | 20 ++++----- .../business/comps/template/comps/sp/SP00456.vue | 8 ++-- .../template/formConfig/paralleAndLadderConfig.js | 50 +++++++++++----------- src/views/business/study/comp/tbbd/Xq.vue | 2 +- 5 files changed, 48 insertions(+), 42 deletions(-) diff --git a/src/components/Template/CustomTable.vue b/src/components/Template/CustomTable.vue index ea8040c..1dee0b3 100644 --- a/src/components/Template/CustomTable.vue +++ b/src/components/Template/CustomTable.vue @@ -16,8 +16,8 @@ :error="hasError(-1, index, col.headerSelectKey)" @update:error="onErrorUpdate(-1, index, col.headerSelectKey, $event)" /> - ({{ - headerSelectFields[col.headerSelectKey] }}) +
({{ + headerSelectFields[col.headerSelectKey] }})
@@ -929,11 +929,15 @@ export default { } .header-cell { - font-weight: bold; color: #909399; background-color: #f5f7fa; + font-size: 12px; + word-break: break-word; + white-space: normal; } + + .body-cell { color: #606266; background-color: #fff; diff --git a/src/views/business/comps/template/comps/sp/SP003.vue b/src/views/business/comps/template/comps/sp/SP003.vue index fc922e8..ce7070a 100644 --- a/src/views/business/comps/template/comps/sp/SP003.vue +++ b/src/views/business/comps/template/comps/sp/SP003.vue @@ -273,7 +273,7 @@ export default { bodySubType: "span", bodySubKey: "subTargetSolutionCode", bodyFillType: "preFill", - width: 280, + width: 180, myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段 maxVolumeField: "actSolutionVolume",//分装的最大量字段 maxVolumeFieldUnit: "actSolutionVolumeUnit",//分装的最大量单位字段 @@ -283,7 +283,7 @@ export default { { label: "template.sp.sp003.qsrybh", prop: "startSolutionCode", - width: 280, + width: 180, bodyType: "input", bodyFillType: "actFill", bodyMaxlength: 10, @@ -291,7 +291,7 @@ export default { { label: "template.sp.sp003.ysqsrytj", prop: "targetStartSolutionVolume", - width: 280, + width: 180, headerSelectKey: "targetStartSolutionVolumeUnit", fillType: "preFill", headerOptions: this.getDictOptions('business_tjdw'), @@ -309,7 +309,7 @@ export default { { label: "template.sp.sp003.sjqsrytj", prop: "actStartSolutionVolume", - width: 280, + width: 180, headerSelectKey: "actStartSolutionVolumeUnit", fillType: "preFill", headerOptions: this.getDictOptions('business_tjdw'), @@ -322,7 +322,7 @@ export default { { label: "template.sp.sp003.ysxsytj", prop: "targetDiluentVolume", - width: 280, + width: 180, headerSelectKey: "targetDiluentVolumeUnit", fillType: "preFill", headerOptions: this.getDictOptions('business_tjdw'), @@ -340,7 +340,7 @@ export default { { label: "template.sp.sp003.sjxsytj", prop: "actDiluentVolume", - width: 280, + width: 180, headerSelectKey: "actDiluentVolumeUnit", fillType: "preFill", headerOptions: this.getDictOptions('business_tjdw'), @@ -353,7 +353,7 @@ export default { { label: "template.sp.sp003.ysmbrynd", prop: "targetSolutionConcentration", - width: 280, + width: 180, headerSelectKey: "targetSolutionConcentrationUnit", fillType: "preFill", headerOptions: this.getDictOptions('business_nddw'), @@ -364,7 +364,7 @@ export default { { label: "template.sp.sp003.sjmbrynd", prop: "actSolutionConcentration", - width: 280, + width: 180, headerSelectKey: "actSolutionConcentrationUnit", fillType: "preFill", headerOptions: this.getDictOptions('business_nddw'), @@ -382,7 +382,7 @@ export default { { label: "template.sp.sp003.ysmbrytj", prop: "targetSolutionVolume", - width: 280, + width: 180, headerSelectKey: "targetSolutionVolumeUnit", fillType: "preFill", headerOptions: this.getDictOptions('business_tjdw'), @@ -393,7 +393,7 @@ export default { { label: "template.sp.sp003.sjmbrytj", prop: "actSolutionVolume", - width: 280, + width: 180, headerSelectKey: "actSolutionVolumeUnit", fillType: "preFill", headerOptions: this.getDictOptions('business_tjdw'), diff --git a/src/views/business/comps/template/comps/sp/SP00456.vue b/src/views/business/comps/template/comps/sp/SP00456.vue index e5037d5..d4fa762 100644 --- a/src/views/business/comps/template/comps/sp/SP00456.vue +++ b/src/views/business/comps/template/comps/sp/SP00456.vue @@ -683,9 +683,11 @@ export default { } } //使用的试剂、仪器 - const stepResource = this.$refs.stepRef.getStepResource() - this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[]) - this.yqResourceTmp = stepResource.yqResource||[] + // const stepResource = this.$refs.stepRef.getStepResource() + // this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[]) + // this.yqResourceTmp = stepResource.yqResource||[] + + this.resourceTmp=tmpResource return content; }, async onSave() { diff --git a/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js index b2b0463..67ab0e4 100644 --- a/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js +++ b/src/views/business/comps/template/formConfig/paralleAndLadderConfig.js @@ -8,7 +8,7 @@ export const getLadderColumnsConfig = ($this) => { bodySubType: 'span', bodySubKey: 'subTargetSolutionCode', bodyFillType: 'preFill', - width: 280, + width: 180, myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段 maxVolumeField: "actSolutionVolume",//分装的最大量字段 maxVolumeFieldUnit: "actSolutionVolumeUnit",//分装的最大量单位字段 @@ -16,7 +16,7 @@ export const getLadderColumnsConfig = ($this) => { { label: 'template.sp.sp00456.qsrybh', prop: 'startSolutionCode', - width: 280, + width: 180, bodyType: 'input', bodyFillType: 'actFill', bodyMaxlength: 10 @@ -24,7 +24,7 @@ export const getLadderColumnsConfig = ($this) => { { label: 'template.sp.sp00456.ysqsrytj', prop: 'targetStartSolutionVolume', - width: 280, + width: 180, headerSelectKey: 'targetStartSolutionVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), @@ -42,7 +42,7 @@ export const getLadderColumnsConfig = ($this) => { { label: 'template.sp.sp00456.sjqsrytj', prop: 'actStartSolutionVolume', - width: 280, + width: 180, headerSelectKey: 'actStartSolutionVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), @@ -55,7 +55,7 @@ export const getLadderColumnsConfig = ($this) => { { label: 'template.sp.sp00456.ysxsytj', prop: 'targetDiluentVolume', - width: 280, + width: 180, headerSelectKey: 'targetDiluentVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), @@ -74,7 +74,7 @@ export const getLadderColumnsConfig = ($this) => { { label: 'template.sp.sp00456.sjxsytj', prop: 'actDiluentVolume', - width: 280, + width: 180, headerSelectKey: 'actDiluentVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), @@ -87,7 +87,7 @@ export const getLadderColumnsConfig = ($this) => { { label: 'template.sp.sp00456.ysmbrynd', prop: 'targetSolutionConcentration', - width: 280, + width: 180, headerSelectKey: 'targetSolutionConcentrationUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_nddw'), @@ -98,7 +98,7 @@ export const getLadderColumnsConfig = ($this) => { { label: 'template.sp.sp00456.sjmbrynd', prop: 'actSolutionConcentration', - width: 280, + width: 180, headerSelectKey: 'actSolutionConcentrationUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_nddw'), @@ -118,7 +118,7 @@ export const getLadderColumnsConfig = ($this) => { { label: 'template.sp.sp00456.ysmbrytj', prop: 'targetSolutionVolume', - width: 280, + width: 180, headerSelectKey: 'targetSolutionVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), @@ -129,7 +129,7 @@ export const getLadderColumnsConfig = ($this) => { { label: 'template.sp.sp00456.sjmbrytj', prop: 'actSolutionVolume', - width: 280, + width: 180, headerSelectKey: 'actSolutionVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), @@ -169,12 +169,12 @@ export const getParallelColumnsConfig = ($this) => { myCodeFields: ["targetSolutionCode", "subTargetSolutionCode"],//分装的母液编号字段 maxVolumeField: "actSolutionVolume",//分装的最大量字段 maxVolumeFieldUnit: "actSolutionVolumeUnit",//分装的最大量单位字段 - width: 280 + width: 120 }, { label: 'template.sp.sp00456.ysmbrynd', prop: 'targetSolutionConcentration', - width: 280, + width: 180, headerSelectKey: 'targetSolutionConcentrationUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_nddw'), @@ -185,7 +185,7 @@ export const getParallelColumnsConfig = ($this) => { { label: 'template.sp.sp00456.sjmbrynd', prop: 'actSolutionConcentration', - width: 280, + width: 180, headerSelectKey: 'actSolutionConcentrationUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_nddw'), @@ -204,7 +204,7 @@ export const getParallelColumnsConfig = ($this) => { { label: 'template.sp.sp00456.ysmbrytj', prop: 'targetSolutionVolume', - width: 280, + width: 180, headerSelectKey: 'targetSolutionVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), @@ -215,7 +215,7 @@ export const getParallelColumnsConfig = ($this) => { { label: 'template.sp.sp00456.sjmbrytj', prop: 'actSolutionVolume', - width: 280, + width: 180, headerSelectKey: 'actSolutionVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), @@ -234,7 +234,7 @@ export const getParallelColumnsConfig = ($this) => { { label: 'template.sp.sp00456.mbryyxzq', prop: 'targetSolutionCycle', - width: 280, + width: 180, fillType: 'preFill', bodyType: 'inputNumber', bodySubType: 'select', @@ -248,20 +248,20 @@ export const getParallelColumnsConfig = ($this) => { { label: 'template.sp.sp00456.mbrysxr', prop: 'targetSolutionExpirationDate', - width: 180, + width: 160, bodyType: 'span' }, { label: 'template.sp.sp00456.ysysrybh', prop: 'startSolutionCode', - width: 280, + width: 160, bodyType: 'input', bodyFillType: 'preFill' }, { label: 'template.sp.sp00456.sjysrybh', prop: 'actStartSolutionCode', - width: 280, + width: 250, bodyType: 'clickable', bodyFillType: 'actFill', compareTo: 'startSolutionCode', //比较哪个字段 @@ -269,7 +269,7 @@ export const getParallelColumnsConfig = ($this) => { { label: 'template.sp.sp00456.ysysrynd', prop: 'targetStartSolutionConcentration', - width: 280, + width: 160, bodyType: 'inputNumber', bodyFillType: 'preFill', bodySubType: 'select', @@ -282,7 +282,7 @@ export const getParallelColumnsConfig = ($this) => { { label: 'template.sp.sp00456.sjysrynd', prop: 'targetAcSolution', - width: 280, + width: 160, bodyType: 'inputNumber', bodyFillType: 'actFill', bodyDisabled: true, @@ -294,7 +294,7 @@ export const getParallelColumnsConfig = ($this) => { headerSelectKey: 'targetStartSolutionVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), - width: 280, + width: 160, bodyType: 'inputNumber', bodyFillType: 'preFill', bodySubType: 'inputNumber', @@ -315,7 +315,7 @@ export const getParallelColumnsConfig = ($this) => { headerSelectKey: 'actStartSolutionVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), - width: 280, + width: 160, bodyType: 'inputNumber', bodyFillType: 'actFill', bodyMaxlength: 10, @@ -329,7 +329,7 @@ export const getParallelColumnsConfig = ($this) => { headerSelectKey: 'preDiluentVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), - width: 280, + width: 160, bodyType: 'inputNumber', bodyFillType: 'preFill', bodySubType: 'inputNumber', @@ -347,7 +347,7 @@ export const getParallelColumnsConfig = ($this) => { headerSelectKey: 'actDiluentVolumeUnit', fillType: 'preFill', headerOptions: $this.getDictOptions('business_tjdw'), - width: 280, + width: 160, bodyType: 'inputNumber', bodyFillType: 'actFill', bodyMaxlength: 10, diff --git a/src/views/business/study/comp/tbbd/Xq.vue b/src/views/business/study/comp/tbbd/Xq.vue index 06f1130..89c24d2 100644 --- a/src/views/business/study/comp/tbbd/Xq.vue +++ b/src/views/business/study/comp/tbbd/Xq.vue @@ -29,7 +29,7 @@
-
From 162267dc3ebd917a544a4fd92ca5791153bfccc4 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Sun, 1 Feb 2026 11:05:41 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix=EF=BC=9A[=E6=A8=A1=E6=9D=BF=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/business/study/comp/tbbd/Xq.vue | 89 +++++++++++++------------------ 1 file changed, 38 insertions(+), 51 deletions(-) diff --git a/src/views/business/study/comp/tbbd/Xq.vue b/src/views/business/study/comp/tbbd/Xq.vue index 89c24d2..5918421 100644 --- a/src/views/business/study/comp/tbbd/Xq.vue +++ b/src/views/business/study/comp/tbbd/Xq.vue @@ -25,13 +25,11 @@ {{ $t('page.business.study.studyFormFill.dcbhsjgj') }} - 前端导出 -
- +
@@ -39,29 +37,33 @@
{{ $t('page.business.study.studyFormFill.qmxx') }}
-
- - - - - - -
-
- -
+
{{ $t('page.business.study.studyFormFill.jcgj') }}
- - +
@@ -172,7 +174,8 @@ export default { pageNum: 1, formId: null, pageSize: 9999, - } + }, + showExport: false, } }, computed: { @@ -184,20 +187,19 @@ export default { }, methods: { onProgress(progress) { - this.progress = progress + console.log(`生成进度: ${progress}%`) + if (progress == 100) { + this.$modal.closeLoading() + } }, - hasStarted() { + exportExcel(jcgjlx) { this.$modal.loading() - console.log('PDF生成开始') + this.showExport = true + setTimeout(() => { + this.$refs.html2Pdf.generatePdf() + }, 200); }, - hasGenerated() { - console.log('PDF生成完成') - this.$modal.closeLoading() - }, - generatePDF() { - this.$refs.html2Pdf.generatePdf() - }, - exportExcel(jcgjlx) { + exportExcel_bak(jcgjlx) { this.$modal.loading() studyFormFill_exportDetail(_.merge({}, this.queryParamsJcgj, { jcgjlx: jcgjlx, lang: this.$store.getters.language.split("_")[0] })).then(response => { window.open(process.env.VUE_APP_FILE_DOMAIN + response.msg) @@ -205,21 +207,6 @@ export default { this.$modal.closeLoading() }) }, - dcqbjcgj() { - this.$refs.html2Pdf.generatePdf() - }, - dclcjcgj() { - this.$refs.html2Pdf.generatePdf() - }, - dcbjjcgj() { - this.$refs.html2Pdf.generatePdf() - }, - dcxgjcgj() { - this.$refs.html2Pdf.generatePdf() - }, - dcbhsjgj() { - this.$refs.html2Pdf.generatePdf() - }, getJjcgjList(val) { this.$modal.loading() studyFormFill_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {