ECG打印预览

This commit is contained in:
旺仔 2024-12-09 00:02:12 +08:00
parent 657c7ae427
commit 3a3af0e218
2 changed files with 38 additions and 32 deletions

View File

@ -191,7 +191,7 @@
plain
@click="opencomparediag"
>
<el-icon><Reading /></el-icon>
<el-icon><Reading /></el-icon>
</el-button>
<span style="font-size: 15px; margin-bottom: 10px">对比</span>
</div>
@ -515,7 +515,7 @@
<div id="printMe_ecg">
<div class="page-item-ecg">
<ReportInfoECG
style="height: 99.88%"
style="height: 99.888%"
:extraInfo="queryParams"
:jsonurl="queryParams.ecgJsonDataFilePath"
:lineratio="0.025"
@ -608,7 +608,7 @@ const ECGDialog = ref() //危急值消息弹窗
const isshowwjz = ref(false)
const isshowysb = ref(false)
const ECGReportDialog = ref() //
const ECGCompare=ref()//
const ECGCompare = ref() //
//
const treeDefaultProps = {
children: 'children',
@ -794,7 +794,7 @@ function openreprotdiag() {
}
//
function opencomparediag() {
ECGCompare.value.opencomparediag( rowinfo.value)
ECGCompare.value.opencomparediag(rowinfo.value)
}
//
function iscorrect() {
@ -994,9 +994,9 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/* 打印(报告单) */
.page-item-ecg {
padding: 1mm 0.8mm 1mm 2mm;
max-width: 1400px;
margin: 0 auto;
padding: 1mm 0.8mm 1mm 0.6mm;
max-width: 1184px;
margin: 6vh auto 0 auto;
border: 2px solid #ccc;
border-radius: 8px;
}
@ -1012,8 +1012,8 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
page-break-after: always;
padding: 0;
max-width: none;
width: calc(100% - 4.2mm);
margin: 0 0 0 2.6mm;
width: calc(100% - 3mm);
margin: 0 0 0 1.2mm;
}
}
</style>

View File

@ -49,58 +49,58 @@
alt=""
fit="fill"
loading="eager"
style="width: 100%; height: 148mm"
style="width: 100%"
:src="reportimage"
crossorigin="anonymous"
v-if="true"
/>
<el-scrollbar v-show="false">
<div id="ecg-substance" style="width: 1760px">
<div class="ecg-container" style="height: 872px">
<div id="canvas-container-l" style="height: 872px">
<div id="ecg-substance" style="width: 1162px">
<div class="ecg-container" style="height: 632px">
<div id="canvas-container-l" style="height: 632px">
<canvas
crossorigin="anonymous"
ref="leftCanvas"
id="leftCanvas"
width="21"
height="861"
height="621"
></canvas>
<canvas
crossorigin="anonymous"
ref="bottomCanvasL"
id="bottomCanvas-l"
width="1700"
height="861"
width="3700"
height="621"
></canvas>
<canvas
crossorigin="anonymous"
ref="topCanvasL"
id="topCanvas-l"
width="1700"
height="861"
width="3700"
height="621"
></canvas>
</div>
<div id="canvas-container-r" style="height: 872px">
<div id="canvas-container-r" style="height: 632px">
<canvas
crossorigin="anonymous"
ref="rightCanvas"
id="rightCanvas"
width="21"
height="861"
height="621"
></canvas>
<canvas
crossorigin="anonymous"
ref="bottomCanvasR"
id="bottomCanvas-r"
width="1700"
height="861"
width="3700"
height="621"
></canvas>
<canvas
crossorigin="anonymous"
ref="topCanvasR"
id="topCanvas-r"
width="1700"
height="861"
width="3700"
height="621"
></canvas>
</div>
</div>
@ -518,8 +518,8 @@ const fetchData = async () => {
//ecgCenter.offsetWidth
//ecgCenter.offsetHeight
let targetWidth = 1760
let targetHeight = 862
let targetWidth = 1164
let targetHeight = 624
let options = {
allowTaint: false,
taintTest: false,
@ -528,7 +528,7 @@ const fetchData = async () => {
width: targetWidth,
height: targetHeight,
dpi: 300, //DPI
scale: 1.14 //
scale: 1.2 //
} as any
const canvas = await html2canvas(ecgCenter, options)
if (canvas) {
@ -602,7 +602,7 @@ const createImage = async () => {
/** 钩子方法 **/
onMounted(async () => {
//heightoff.value = (leftCanvas.value.height - 100) / 6
heightoff.value = (821 - 0) / 6
heightoff.value = (618 - 0) / 6
await fetchData()
})
@ -623,13 +623,13 @@ defineExpose({ ecg_loading })
margin: 1px;
padding: 1px;
position: relative;
width: 99.2%;
width: 99.888%;
min-height: 204mm;
}
.ecg-main {
margin-top: 8px;
margin-bottom: 26px;
margin-top: 4px;
margin-bottom: 30px;
}
/*** ecg核心 ***/
@ -648,8 +648,14 @@ defineExpose({ ecg_loading })
position: relative;
overflow-x: hidden;
overflow-y: hidden;
}
#canvas-container-l {
width: calc(50% - 1px);
}
#canvas-container-r {
width: 50%;
margin-right: 0;
}
#leftCanvas,