This commit is contained in:
Euni4U 2025-03-31 18:02:46 +08:00
commit e3f4b7e0ba
3 changed files with 11 additions and 6 deletions

View File

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

View File

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

View File

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