fix(报告): 测试计划报告总结富文本渲染调整
--bug=1046672 --user=白奇 报告总结中包含表格、任务列表等格式,导出pdf后格式未导出 https://www.tapd.cn/55049933/s/1580970
This commit is contained in:
parent
e3417dd9d9
commit
4995736e30
|
@ -34,8 +34,6 @@
|
||||||
ExtensionCode,
|
ExtensionCode,
|
||||||
ExtensionCodeBlock,
|
ExtensionCodeBlock,
|
||||||
ExtensionColor,
|
ExtensionColor,
|
||||||
ExtensionColumn,
|
|
||||||
ExtensionColumns,
|
|
||||||
ExtensionCommands,
|
ExtensionCommands,
|
||||||
ExtensionDocument,
|
ExtensionDocument,
|
||||||
ExtensionDraggable,
|
ExtensionDraggable,
|
||||||
|
|
|
@ -108,16 +108,12 @@
|
||||||
:share-id="shareId"
|
:share-id="shareId"
|
||||||
is-preview
|
is-preview
|
||||||
/>
|
/>
|
||||||
<div
|
<div v-else-if="item.value === ReportCardTypeEnum.CUSTOM_CARD" ref="customCardRef">
|
||||||
v-else-if="item.value === ReportCardTypeEnum.CUSTOM_CARD"
|
<MsRichText :raw="item.content" :editable="false" />
|
||||||
ref="customCardRef"
|
</div>
|
||||||
v-html="item.content"
|
<div v-else-if="item.value === ReportCardTypeEnum.SUMMARY" ref="summaryRef">
|
||||||
></div>
|
<MsRichText :raw="isDefaultLayout ? detail.summary : item.content" :editable="false" />
|
||||||
<div
|
</div>
|
||||||
v-else-if="item.value === ReportCardTypeEnum.SUMMARY"
|
|
||||||
ref="summaryRef"
|
|
||||||
v-html="isDefaultLayout ? detail.summary : item.content"
|
|
||||||
></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -132,6 +128,7 @@
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
import MsChart from '@/components/pure/chart/index.vue';
|
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 type { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||||
import { lastExecuteResultMap } from '@/components/business/ms-case-associate/utils';
|
import { lastExecuteResultMap } from '@/components/business/ms-case-associate/utils';
|
||||||
import { IconType } from '@/views/api-test/report/component/reportStatus.vue';
|
import { IconType } from '@/views/api-test/report/component/reportStatus.vue';
|
||||||
|
@ -784,13 +781,17 @@
|
||||||
// 可能存在多个自定义卡片
|
// 可能存在多个自定义卡片
|
||||||
customCardRef.value.forEach((item) => {
|
customCardRef.value.forEach((item) => {
|
||||||
if (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]) {
|
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) {
|
if (customCardImages.length > 0 || summaryImages.length > 0) {
|
||||||
let loadedImageCount = 0;
|
let loadedImageCount = 0;
|
||||||
|
@ -996,4 +997,16 @@
|
||||||
:deep(#ms-table-footer-wrapper) {
|
:deep(#ms-table-footer-wrapper) {
|
||||||
@apply hidden;
|
@apply hidden;
|
||||||
}
|
}
|
||||||
|
.rich-wrapper {
|
||||||
|
@apply border-none;
|
||||||
|
:deep(.halo-rich-text-editor) {
|
||||||
|
@apply !p-0;
|
||||||
|
.editor-header {
|
||||||
|
@apply hidden;
|
||||||
|
}
|
||||||
|
.tiptap {
|
||||||
|
@apply !p-0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue