diff --git a/src/views/ECG/ECGhtml.vue b/src/views/ECG/ECGhtml.vue
index e9946cfa..ff182984 100644
--- a/src/views/ECG/ECGhtml.vue
+++ b/src/views/ECG/ECGhtml.vue
@@ -409,6 +409,15 @@ const suduratioMap = {
1: '25',
2: '50'
}
+const dyMap = {
+ 0.012: '10',
+ 0.025: '20',
+ 0.05: '40',
+ 0.1: '80',
+ 0.2: '160'
+}
+
+infoParams.lineratio
function convert(command, type) {
if (type === 0) {
return suduratioMap[command] || null
@@ -580,16 +589,16 @@ function begin(c_canvas, beatArray) {
beatArray.forEach((dataArray, index) => {
if (index <= 6) {
const x = 0
- const y = offset - dataArray[index - 1] * 0.025
+ const y = (offset - dataArray[index - 1] * 0.025)
ctx.beginPath()
ctx.moveTo(x, y)
ctx.lineTo(x + 5, y)
- ctx.moveTo(x + 5, y - 40)
- ctx.lineTo(x + 15, y - 40)
- ctx.moveTo(x + 5, y - 40)
- ctx.lineTo(x + 5, y)
- ctx.moveTo(x + 15, y - 40)
- ctx.lineTo(x + 15, y)
+ ctx.moveTo(x + 5, (y - dyMap[infoParams.lineratio]))//上面的横线
+ ctx.lineTo(x + 15, (y - dyMap[infoParams.lineratio]))//上面的横线
+ ctx.moveTo(x + 5, (y - dyMap[infoParams.lineratio]))//左边的竖线
+ ctx.lineTo(x + 5, y)//左边的竖线
+ ctx.moveTo(x + 15, y - dyMap[infoParams.lineratio])//右边的竖线
+ ctx.lineTo(x + 15, y)//右边的竖线
ctx.moveTo(x + 15, y)
ctx.lineTo(x + 20, y)
ctx.stroke()
@@ -622,11 +631,11 @@ function beginr(c_canvas, beatArray) {
ctx.beginPath()
ctx.moveTo(x, y)
ctx.lineTo(x + 5, y)
- ctx.moveTo(x + 5, y - 40)
- ctx.lineTo(x + 15, y - 40)
- ctx.moveTo(x + 5, y - 40)
+ ctx.moveTo(x + 5, y - dyMap[infoParams.lineratio])
+ ctx.lineTo(x + 15, y - dyMap[infoParams.lineratio])
+ ctx.moveTo(x + 5, y - dyMap[infoParams.lineratio])
ctx.lineTo(x + 5, y)
- ctx.moveTo(x + 15, y - 40)
+ ctx.moveTo(x + 15, y - dyMap[infoParams.lineratio])
ctx.lineTo(x + 15, y)
ctx.moveTo(x + 15, y)
ctx.lineTo(x + 20, y)