修改BUG

This commit is contained in:
lxd 2025-03-31 17:19:30 +08:00
parent ec07b415bb
commit 9390bd19e7
3 changed files with 11 additions and 6 deletions

View File

@ -221,7 +221,7 @@ const openPdfInNewTab = (url) => {
</style>
</head>
<body>
<iframe src="${url}+#toolbar=0&navpanes=0&view=Fit"></iframe>
<iframe src="${url}#toolbar=0&navpanes=0&view=Fit"></iframe>
</body>
</html>
`)

View File

@ -80,9 +80,9 @@
:header-cell-style="{ background: 'rgb(235, 241, 250)', height: '56px', color: '#333333' }"
:resizable="false"
>
<el-table-column prop="type" label="检查项" width="180" />
<el-table-column prop="category" label="部位" width="200" />
<el-table-column label="模板名称" width="300">
<el-table-column prop="type" label="检查项" width="160" />
<el-table-column prop="category" label="部位" width="160" />
<el-table-column label="模板名称" width="200">
<template #default="scope">
<el-tag v-if="scope.row.contentName" type="success">
{{ scope.row.contentName }}

View File

@ -12,7 +12,7 @@
<div class="iframe-container">
<iframe
v-if="dialogVisible"
src="/templates/report-template.html"
src="/inspect/templates/report-template.html"
frameborder="0"
style="width: 100%; height: 100%; border: none"
@load="handleIframeLoad"
@ -281,6 +281,7 @@ const handleIframeLoad = async () => {
}
if (biochemSummaryContent) {
console.log(biochemData.analyse)
biochemSummaryContent.textContent = biochemData.analyse || ''
} else {
console.error('找不到生化小结元素')
@ -376,7 +377,11 @@ const handleIframeLoad = async () => {
//
const constitutionDetailContainer = doc.getElementById('constitution-detail-container')
if (constitutionDetailContainer) {
constitutionDetailContainer.textContent = reportData.features.replace(/\\r\\n/g, '\n') || '--'
if (reportData.features) {
constitutionDetailContainer.textContent = reportData.features.replace(/\\r\\n/g, '\n') || ''
} else {
constitutionDetailContainer.textContent = ''
}
}
// PDF