diff --git a/src/views/ECG/ECGBB.vue b/src/views/ECG/ECGBB.vue deleted file mode 100644 index 85c84085..00000000 --- a/src/views/ECG/ECGBB.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/ECG/ECGFD.vue b/src/views/ECG/ECGFD.vue deleted file mode 100644 index d142a9b9..00000000 --- a/src/views/ECG/ECGFD.vue +++ /dev/null @@ -1,145 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/ECG/ECGForm.vue b/src/views/ECG/ECGForm.vue index e480b505..d96c96d1 100644 --- a/src/views/ECG/ECGForm.vue +++ b/src/views/ECG/ECGForm.vue @@ -8,14 +8,13 @@ :close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true" - >
- -
+ +
{{ rowinfo.pname }} {{ rowinfo.gender }} {{ age + '岁' }} @@ -29,88 +28,168 @@ - 采集 - 分享 - 重采 - 提交诊断 - 打印 + 采集 + 分享 + + 重采 + 申请诊断 + 打印 - + - + -
- +
+ + + + + + 走速 - + + + + + + + 振幅 + > + + 测量 - - 放大 + plain + @click="FD()" + > + + + 放大 --> + plain + @click="iscorrect()" + > + + 纠错 + > + + 网格 + + + + + 刷新
- + - - + + - + - + - + @@ -118,17 +197,25 @@ - - + + - + - - - + + + @@ -136,17 +223,21 @@ - - + + - + - + - + @@ -154,17 +245,21 @@ - - + + - + - + - + @@ -172,17 +267,17 @@ - - + + - + - + - + @@ -190,89 +285,139 @@ - - + + - + - + - + - 心电事件快照 + 心电事件快照 - 智能词库 + 智能词库 - 医生诊断结论 - -
- I - II - III - aVR - aVL - aVF -
-
- V3R - V4R - V5R - V1 - V2 - V3 -
-
- V4 - V5 - V6 - V7 - V8 - V9 + 医生诊断结论 诊断模版 + + +
+
+ I + II + III + aVR + aVL + aVF +
+
+ V3R + V4R + V5R + V1 + V2 + V3 +
+
+ V4 + V5 + V6 + V7 + V8 + V9 +
- 保存 + 申请诊断 + 保存
+ + + 诊断数据模版 + + + diff --git a/src/views/ECG/ECGhtml.vue b/src/views/ECG/ECGhtml.vue index 15d915a5..3d1cb8a9 100644 --- a/src/views/ECG/ECGhtml.vue +++ b/src/views/ECG/ECGhtml.vue @@ -2,28 +2,28 @@
- +
- - + +
- - + +
@@ -42,6 +42,7 @@ :show-tooltip="false" />
+
@@ -104,6 +105,9 @@ const beatArray2 = ref([]) //备份数据 let offset = 0 const spacing = 20 +const heightoff=ref(0)//心电图的偏移量 高度变化的时候 +const FD=ref(false) + function handleMouseDown(event, type) { if (type === 'L') { ctx.value = topCanvas.value.getContext('2d') @@ -141,17 +145,17 @@ function drawLineAndDistance(point1, point2) { //竖线 if (Math.abs(point2.x - point1.x) <= 20) { point2.x = point1.x - lineTo(point1.x, point1.y, point2.x, point2.y,1) - } else if (Math.abs(point2.y - point1.y) <= 20) {//横 + lineTo(point1.x, point1.y, point2.x, point2.y, 1) + } else if (Math.abs(point2.y - point1.y) <= 20) { + //横 point2.y = point1.y - lineTo(point1.x, point1.y, point2.x, point2.y,0) + lineTo(point1.x, point1.y, point2.x, point2.y, 0) } else { lastPoint.value = null } } function lineTo(x, y, x1, y1, type) { - // 绘制两个点 ctx.value.fillStyle = 'black' ctx.value.beginPath() @@ -170,16 +174,15 @@ function lineTo(x, y, x1, y1, type) { ctx.value.stroke() // 计算并绘制距离文本 - const distance = calculateDistance(x, y, x1,y1) + const distance = calculateDistance(x, y, x1, y1) const ms = (25.4 / 96) * (25 / 1000) * distance ctx.value.font = '11px Arial' ctx.value.fillStyle = 'black' if (type === 1) { - ctx.value.fillText(`距离: ${ms.toFixed(2)}ms`, x + 5, y +30) + ctx.value.fillText(`距离: ${ms.toFixed(2)}ms`, x + 5, y + 30) } else { ctx.value.fillText(`距离: ${ms.toFixed(2)}ms`, x + 10, y - 10) } - } /*鼠标绘制相关*/ @@ -209,17 +212,28 @@ onMounted(async () => { }) nextTick(() => { + /* 计算宽度和高度*/ var canvasContainer = document.getElementById('canvas-container') var canvasContainer1 = document.getElementById('canvas-container1') + + var leftCanvas = document.getElementById('leftCanvas') // 获取元素的计算后的样式 var style = window.getComputedStyle(canvasContainer) + // 获取元素的计算后的样式 + var leftCanvasstyle = window.getComputedStyle(leftCanvas) // 获取宽度 var widthPercentage = style.width + //获取高度 + var heightPercentage = style.height + var widthInPixels = canvasContainer.offsetWidth + var heightInPixels = canvasContainer.offsetHeight + // 宽度除以 20 并取整 var adjustedWidth = widthInPixels / 20 + var adjustedheight = heightInPixels / 20 // 判断 adjustedWidth 是否为整数 if (Number.isInteger(adjustedWidth)) { canvasContainer.style.width = widthInPixels + 'px' @@ -230,6 +244,17 @@ nextTick(() => { canvasContainer1.style.width = awidth - 20 + 'px' console.log('adjustedWidth 不是整数') } + if (Number.isInteger(adjustedheight)) { + canvasContainer.style.height = heightInPixels + 'px' + leftCanvas.height = heightInPixels + 'px' + } else { + const integer = Math.round(adjustedheight) + const ahe = integer * 20 + canvasContainer.style.height = ahe - 118 + 'px' + canvasContainer1.style.height = ahe - 118 + 'px' + leftCanvas.height = ahe - 118 + heightoff.value=(ahe -118)/6 + } fetchData() }) @@ -284,11 +309,12 @@ watch( () => infoParams.lineratio, () => infoParams.suduratio, () => infoParams.isrefresh, - () => infoParams.iscorrect + () => infoParams.iscorrect, + ()=>infoParams.Isfd ], ( - [newIsGridValue, newAnotherValue, newlineratio, newsuduratio, newisrefresh, newiniscorrect], - [oldIsGridView, oldAnotherValue, oldlineratio, oldsuduratio, oldisrefresh, oldiscorrect] + [newIsGridValue, newAnotherValue, newlineratio, newsuduratio, newisrefresh, newiniscorrect,newfd], + [oldIsGridView, oldAnotherValue, oldlineratio, oldsuduratio, oldisrefresh, oldiscorrect,oldds] ) => { // 检查 isGrid 是否发生变化 if (newIsGridValue !== oldIsGridView) { @@ -316,6 +342,11 @@ watch( if (newiniscorrect !== oldiscorrect) { isdialog.value = newiniscorrect } + if(newfd!==oldds) + { + FD.value=newfd + console.log(FD.value) + } } ) //恢复导联 @@ -539,7 +570,7 @@ function begin(c_canvas, beatArray) { ctx.globalAlpha = 1 ctx.strokeStyle = '#000000' let offset = -50 - const spacing = 100 + const spacing = heightoff.value beatArray.forEach((dataArray, index) => { if (index <= 6) { const x = 0 @@ -577,7 +608,7 @@ function beginr(c_canvas, beatArray) { ctx.globalAlpha = 1 ctx.strokeStyle = '#000000' let offset = -50 - const spacing = 100 + const spacing = heightoff.value beatArray.forEach((dataArray, index) => { if (index <= 6) { const x = 0 @@ -617,7 +648,7 @@ function drawMultipleLinesl(c_canvas, beatArrays) { const ctx = c_canvas.getContext('2d') ctx.clearRect(0, 0, c_canvas.width, c_canvas.height) let offset = 0 - const spacing = 100 + const spacing = heightoff.value beatArrays.forEach((dataArray, index) => { if (index <= 5) { drawLine1(c_canvas, dataArray, offset, index) @@ -630,7 +661,7 @@ function drawMultipleLinesr(c_canvas, beatArrays) { const ctx = c_canvas.getContext('2d') ctx.clearRect(0, 0, c_canvas.width, c_canvas.height) let offset = 0 - const spacing = 100 + const spacing = heightoff.value beatArrays.forEach((dataArray, index) => { if (index > 5) { drawLine1(c_canvas, dataArray, offset, index) @@ -647,11 +678,11 @@ function drawLine1(c_canvas, beatArray, offset, index) { if (index <= 5) { if (beatArray.length > 0) { const firstX = 0 - const firstY = 50 - beatArray[0] * infoParams.lineratio + offset + const firstY = (heightoff.value-50) - beatArray[0] * infoParams.lineratio + offset ctx.moveTo(firstX, firstY) for (let i = 0; i < beatArray.length - 1; i++) { const x2 = (0 + (i + 1) / 10) * infoParams.suduratio - const y2 = 50 - beatArray[i + 1] * infoParams.lineratio + offset + const y2 = (heightoff.value-50) - beatArray[i + 1] * infoParams.lineratio + offset ctx.lineTo(x2, y2) } ctx.stroke() @@ -661,11 +692,11 @@ function drawLine1(c_canvas, beatArray, offset, index) { if (index > 5) { if (beatArray.length > 0) { const firstX = 0 - const firstY = 50 - beatArray[0] * infoParams.lineratio + offset + const firstY = (heightoff.value-50) - beatArray[0] * infoParams.lineratio + offset ctx.moveTo(firstX, firstY) for (let i = 0; i < beatArray.length - 1; i++) { const x2 = (0 + (i + 1) / 10) * infoParams.suduratio - const y2 = 50 - beatArray[i + 1] * infoParams.lineratio + offset + const y2 = (heightoff.value-50) - beatArray[i + 1] * infoParams.lineratio + offset ctx.lineTo(x2, y2) } ctx.stroke() @@ -685,6 +716,7 @@ function drawLine1(c_canvas, beatArray, offset, index) { overflow-y: hidden; height: 100%; max-width: 3920px; + max-height: 3920px; } #canvas-container, #canvas-container1 { @@ -692,14 +724,14 @@ function drawLine1(c_canvas, beatArray, offset, index) { overflow-y: hidden; position: relative; width: 50%; - height: 600px; + height: 77vh; margin-right: 0; } #bottomCanvas, #bottomCanvas1 { position: absolute; /* width: 1140; */ - height: 600px; + /* height: 75vh; */ z-index: 0; margin-left: 20px; } @@ -707,7 +739,7 @@ function drawLine1(c_canvas, beatArray, offset, index) { #rightCanvas { position: absolute; width: 21; - height: 600px; + /* height: 600px; */ z-index: 99; background-color: rgb(255, 255, 255); } @@ -715,7 +747,7 @@ function drawLine1(c_canvas, beatArray, offset, index) { #topCanvas1 { position: absolute; width: 1140px; - height: 600px; + /* height: 600px; */ z-index: 1; background: transparent; margin-left: 20px; diff --git a/src/views/tblist/patientexamlistECG/index.vue b/src/views/tblist/patientexamlistECG/index.vue index c535d99d..f43d345b 100644 --- a/src/views/tblist/patientexamlistECG/index.vue +++ b/src/views/tblist/patientexamlistECG/index.vue @@ -262,7 +262,7 @@ />