From 4995736e302d2680a4d5fc7a22e27e02eec8fb8f Mon Sep 17 00:00:00 2001 From: baiqi Date: Thu, 19 Sep 2024 14:31:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8A=A5=E5=91=8A):=20=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=8A=A5=E5=91=8A=E6=80=BB=E7=BB=93=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=B8=B2=E6=9F=93=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1046672 --user=白奇 报告总结中包含表格、任务列表等格式,导出pdf后格式未导出 https://www.tapd.cn/55049933/s/1580970 --- .../pure/ms-rich-text/MsRichText.vue | 2 - .../test-plan/report/detail/exportPDF.vue | 37 +++++++++++++------ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/pure/ms-rich-text/MsRichText.vue b/frontend/src/components/pure/ms-rich-text/MsRichText.vue index 59055e3ce0..4b8d5d7038 100644 --- a/frontend/src/components/pure/ms-rich-text/MsRichText.vue +++ b/frontend/src/components/pure/ms-rich-text/MsRichText.vue @@ -34,8 +34,6 @@ ExtensionCode, ExtensionCodeBlock, ExtensionColor, - ExtensionColumn, - ExtensionColumns, ExtensionCommands, ExtensionDocument, ExtensionDraggable, diff --git a/frontend/src/views/test-plan/report/detail/exportPDF.vue b/frontend/src/views/test-plan/report/detail/exportPDF.vue index 5da4b1459f..70fad42ee8 100644 --- a/frontend/src/views/test-plan/report/detail/exportPDF.vue +++ b/frontend/src/views/test-plan/report/detail/exportPDF.vue @@ -108,16 +108,12 @@ :share-id="shareId" is-preview /> -
-
+
+ +
+
+ +
@@ -132,6 +128,7 @@ import dayjs from 'dayjs'; import MsChart from '@/components/pure/chart/index.vue'; + import MsRichText from '@/components/pure/ms-rich-text/MsRichText.vue'; import type { MsTableColumn } from '@/components/pure/ms-table/type'; import { lastExecuteResultMap } from '@/components/business/ms-case-associate/utils'; import { IconType } from '@/views/api-test/report/component/reportStatus.vue'; @@ -784,13 +781,17 @@ // 可能存在多个自定义卡片 customCardRef.value.forEach((item) => { if (item) { - customCardImages = customCardImages.concat(Array.from(item.querySelectorAll('img'))); + customCardImages = customCardImages.concat( + Array.from(item.querySelectorAll('img')).filter((e) => e.className !== 'ProseMirror-separator') + ); } }); } if (summaryRef.value[0]) { // 只有一个总结 - summaryImages = Array.from(summaryRef.value[0].querySelectorAll('img')); + summaryImages = Array.from(summaryRef.value[0].querySelectorAll('img')).filter( + (e) => e.className !== 'ProseMirror-separator' + ); } if (customCardImages.length > 0 || summaryImages.length > 0) { let loadedImageCount = 0; @@ -996,4 +997,16 @@ :deep(#ms-table-footer-wrapper) { @apply hidden; } + .rich-wrapper { + @apply border-none; + :deep(.halo-rich-text-editor) { + @apply !p-0; + .editor-header { + @apply hidden; + } + .tiptap { + @apply !p-0; + } + } + }