costy-plus 1.0.86-0 → 1.0.87-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/src/CommonWaveForm/interface.d.ts +1 -0
- package/dist/es/src/CommonWaveForm/method.js +35 -34
- package/dist/es/src/EnlargeWaveView/medthod.js +101 -98
- package/dist/es/src/MagnifierWave/medthod.js +49 -48
- package/dist/es/types/EcgWave.d.ts +2 -0
- package/dist/lib/src/CommonWaveForm/interface.d.ts +1 -0
- package/dist/lib/src/CommonWaveForm/method.js +1 -1
- package/dist/lib/src/EnlargeWaveView/medthod.js +1 -1
- package/dist/lib/src/MagnifierWave/medthod.js +1 -1
- package/dist/lib/types/EcgWave.d.ts +2 -0
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ import q from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/nod
|
|
|
15
15
|
import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
|
|
16
16
|
import { Prop as c } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
|
|
17
17
|
import { flattenDeep as Q, max as K, min as U } from "lodash";
|
|
18
|
-
import { throttling as $, getStepForSpeed as
|
|
18
|
+
import { throttling as $, getStepForSpeed as S, getPrintLengthToPx as Z, getSens as W, getDataLenTimes as A, getPointIdxForPx as L, getActualY as H } from "@costy-plus/utils";
|
|
19
19
|
import * as J from "zrender";
|
|
20
20
|
import { Group as v, Polyline as x, Line as P, Text as I, Polygon as ee, util as te } from "zrender";
|
|
21
21
|
var ie = Object.defineProperty, se = Object.getOwnPropertyDescriptor, u = (e, t, i, s) => {
|
|
@@ -109,7 +109,7 @@ let g = class extends E {
|
|
|
109
109
|
startInd: this.slidingWindowInfo.startInd || 0,
|
|
110
110
|
endInd: this.slidingWindowInfo.endInd <= t || this.leadModel.isSingleMode ? t : this.slidingWindowInfo.endInd
|
|
111
111
|
}, this.scrollConfig.isShow && !this.leadModel.isSingleMode) {
|
|
112
|
-
const s =
|
|
112
|
+
const s = S(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), a = this.dataTotalLength * s;
|
|
113
113
|
this.vuescrollWH.width = this.canvasContainer.width + (a || 0) - this.splitPoint;
|
|
114
114
|
}
|
|
115
115
|
const i = Math.ceil((this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / e);
|
|
@@ -160,7 +160,7 @@ let g = class extends E {
|
|
|
160
160
|
const i = Z(((t = this.waveConfigs[0]) == null ? void 0 : t.sampleRate) || 0) + this.leadHeadConfig.leadHedeWidth;
|
|
161
161
|
i <= e && (e = i);
|
|
162
162
|
} else if (this.leadModel.isContinuous) {
|
|
163
|
-
const i =
|
|
163
|
+
const i = S(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), s = this.dataTotalLength * i;
|
|
164
164
|
!this.leadModel.isSingleMode && (s || 0) < e - this.leadHeadConfig.leadHedeWidth && (e = (s || 0) + this.leadHeadConfig.leadHedeWidth);
|
|
165
165
|
}
|
|
166
166
|
this.drawArea = {
|
|
@@ -180,7 +180,7 @@ let g = class extends E {
|
|
|
180
180
|
}, this.currentHeardBeat = {
|
|
181
181
|
heardBeat: null,
|
|
182
182
|
ele: null
|
|
183
|
-
}, this.leadNameList = this.leadNames.map((i, s) => s) || [], this.totalRows = this.leadModel.line + this.leadModel.add || 1, this.highestAndLowestPoint = this.calcHighestAndLowestPoint(), this.leadModel.isSingleMode ? (this.splitBlockHeight = Math.abs(this.highestAndLowestPoint.maxPoints) + Math.abs(this.highestAndLowestPoint.minPoints) + 22, this.splitBlockHeight > this.drawArea.height && (this.splitBlockHeight = this.drawArea.height / 6)) : this.splitBlockHeight = this.drawArea.height / this.totalRows, this.publicStep =
|
|
183
|
+
}, this.leadNameList = this.leadNames.map((i, s) => s) || [], this.totalRows = this.leadModel.line + this.leadModel.add || 1, this.highestAndLowestPoint = this.calcHighestAndLowestPoint(), this.leadModel.isSingleMode ? (this.splitBlockHeight = Math.abs(this.highestAndLowestPoint.maxPoints) + Math.abs(this.highestAndLowestPoint.minPoints) + 22, this.splitBlockHeight > this.drawArea.height && (this.splitBlockHeight = this.drawArea.height / 6)) : this.splitBlockHeight = this.drawArea.height / this.totalRows, this.publicStep = S(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), this.rulerStep = (this.publicStep || 1) * (this.leadModel.publicSampleRate || 1) / (this.gridConfig.cellMg * 2 + 2);
|
|
184
184
|
}
|
|
185
185
|
initWaveFormPeer() {
|
|
186
186
|
var i;
|
|
@@ -223,26 +223,26 @@ let g = class extends E {
|
|
|
223
223
|
for (let h = 1; h <= this.leadModel.line; h++) {
|
|
224
224
|
if (!(this.waveConfigs || [])[h - 1 + s])
|
|
225
225
|
break e;
|
|
226
|
-
!this.waveConfigs[h - 1 + s].isShowLeadHead || (t = !1, e = (this.leadNames || [])[h - 1 + s] || "", this.waveConfigs[h - 1 + s].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(e) && (t = !0), i = this.waveConfigs[h - 1 + s].posX ? this.waveConfigs[h - 1 + s].posX - this.leadHeadConfig.leadHedeWidth : 0, (r = this.leadHeadGroup) == null || r.add(
|
|
226
|
+
!this.waveConfigs[h - 1 + s].isShowLeadHead || (t = !1, e = (this.leadNames || [])[h - 1 + s] || "", this.waveConfigs[h - 1 + s].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(e) && (t = !0), i = this.waveConfigs[h - 1 + s].posX ? this.waveConfigs[h - 1 + s].posX - this.leadHeadConfig.leadHedeWidth : 0, this.leadHeadConfig.isShowLeadCalibration !== !1 && ((r = this.leadHeadGroup) == null || r.add(
|
|
227
227
|
this.createLeadHead(
|
|
228
228
|
i,
|
|
229
229
|
this.waveConfigs[h - 1 + s].posY || h * this.splitBlockHeight,
|
|
230
|
-
|
|
230
|
+
W(this.waveConfigs[h - 1 + s].gain, this.gridConfig.cellMg),
|
|
231
231
|
t
|
|
232
232
|
)
|
|
233
|
-
));
|
|
233
|
+
)));
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
236
|
let a = null;
|
|
237
237
|
for (let d = 0; d < this.leadModel.add; d++)
|
|
238
|
-
!this.waveConfigs[this.longLeadConfig.leadIdxs[d]] || (a = this.waveConfigs[this.longLeadConfig.leadIdxs[d]], e = this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[d]]], t = !1, a.gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(e) && (t = !0), i = a.posX ? a.posX - this.leadHeadConfig.leadHedeWidth : 0, (f = this.leadHeadGroup) == null || f.add(
|
|
238
|
+
!this.waveConfigs[this.longLeadConfig.leadIdxs[d]] || (a = this.waveConfigs[this.longLeadConfig.leadIdxs[d]], e = this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[d]]], t = !1, a.gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(e) && (t = !0), i = a.posX ? a.posX - this.leadHeadConfig.leadHedeWidth : 0, this.leadHeadConfig.isShowLeadCalibration !== !1 && ((f = this.leadHeadGroup) == null || f.add(
|
|
239
239
|
this.createLeadHead(
|
|
240
240
|
i,
|
|
241
241
|
a.posY || (d + 1 + this.leadModel.line) * this.splitBlockHeight,
|
|
242
|
-
|
|
242
|
+
W(a.gain, this.gridConfig.cellMg),
|
|
243
243
|
t
|
|
244
244
|
)
|
|
245
|
-
));
|
|
245
|
+
)));
|
|
246
246
|
a = null, (l = this.sceneIns) == null || l.add(this.leadHeadGroup);
|
|
247
247
|
}
|
|
248
248
|
createLeadHead(e, t, i, s) {
|
|
@@ -288,7 +288,7 @@ let g = class extends E {
|
|
|
288
288
|
(o = this.splitLineGroup) == null || o.removeAll(), (n = this.sceneIns) == null || n.remove(this.splitLineGroup);
|
|
289
289
|
const e = (this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / (this.leadModel.column || 1);
|
|
290
290
|
if (this.splitPoint = e, this.leadModel.isSingleMode) {
|
|
291
|
-
const d =
|
|
291
|
+
const d = S(
|
|
292
292
|
this.waveConfigs[this.singleModeConfig.defaultSelect].speed,
|
|
293
293
|
this.gridConfig.cellMg,
|
|
294
294
|
this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate
|
|
@@ -309,7 +309,7 @@ let g = class extends E {
|
|
|
309
309
|
continue e;
|
|
310
310
|
if ((this.waveConfigs || [])[h - 1 + i].posX !== void 0 && (t = (this.waveConfigs || [])[h - 1 + i].posX), s = (this.waveConfigs || [])[h - 1 + i].leadIdx, s === void 0)
|
|
311
311
|
break;
|
|
312
|
-
a =
|
|
312
|
+
a = W((this.waveConfigs || [])[h - 1 + i].gain, this.gridConfig.cellMg), (this.waveConfigs || [])[h - 1 + i].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.leadNames[s]) ? (r = this.splitLineGroup) == null || r.add(
|
|
313
313
|
this.creatSplitLine(
|
|
314
314
|
t,
|
|
315
315
|
((this.waveConfigs || [])[h - 1 + i].posY || h * this.splitBlockHeight) - (a || 0) / 2 * 0.5,
|
|
@@ -359,7 +359,7 @@ let g = class extends E {
|
|
|
359
359
|
}, e)
|
|
360
360
|
}), i = new I({
|
|
361
361
|
style: y({
|
|
362
|
-
text: `${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,
|
|
362
|
+
text: this.rulerConfig.renderText || `${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,
|
|
363
363
|
x: this.leadHeadConfig.leadHedeWidth / 2 + 20,
|
|
364
364
|
y: this.canvasContainer.height - this.ruleH
|
|
365
365
|
}, e)
|
|
@@ -372,7 +372,7 @@ let g = class extends E {
|
|
|
372
372
|
return;
|
|
373
373
|
const t = this.dataTotalTimes / 1e3;
|
|
374
374
|
let i = this.leadHeadConfig.leadHedeWidth, s = 0, a = t;
|
|
375
|
-
const o =
|
|
375
|
+
const o = S(this.rulerConfig.speed, this.gridConfig.cellMg, this.rulerConfig.sampleRate);
|
|
376
376
|
if (this.leadModel.isContinuous)
|
|
377
377
|
a = t * 5;
|
|
378
378
|
else if (!this.leadModel.add && o) {
|
|
@@ -413,11 +413,11 @@ let g = class extends E {
|
|
|
413
413
|
let e = 0, t = 0;
|
|
414
414
|
const i = this.waveLists[this.singleModeConfig.defaultSelect] || [];
|
|
415
415
|
let s = this.slidingWindowInfo.startInd || 0, a = this.slidingWindowInfo.endInd || 0;
|
|
416
|
-
const o =
|
|
416
|
+
const o = S(
|
|
417
417
|
this.waveConfigs[this.singleModeConfig.defaultSelect].speed,
|
|
418
418
|
this.gridConfig.cellMg,
|
|
419
419
|
this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate
|
|
420
|
-
), n =
|
|
420
|
+
), n = W(this.waveConfigs[this.singleModeConfig.defaultSelect].gain, this.gridConfig.cellMg), r = [], f = Math.ceil(i.length / (this.slidingWindowInfo.points || 1));
|
|
421
421
|
for (let l = 0; l < 1; l++) {
|
|
422
422
|
e = l * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0;
|
|
423
423
|
for (let d = 1; d <= f; d++)
|
|
@@ -427,7 +427,7 @@ let g = class extends E {
|
|
|
427
427
|
endInd: a,
|
|
428
428
|
step: o,
|
|
429
429
|
sens: n,
|
|
430
|
-
data: i.slice(s, a).map((h, C) => this.waveConfigs[this.singleModeConfig.defaultSelect].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName) ?
|
|
430
|
+
data: i.slice(s, a).map((h, C) => this.waveConfigs[this.singleModeConfig.defaultSelect].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName) ? H(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, h, n / 2) : H(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, h, n)).map((h, C) => [C * (o || 0), -h])
|
|
431
431
|
});
|
|
432
432
|
}
|
|
433
433
|
return r;
|
|
@@ -483,8 +483,8 @@ let g = class extends E {
|
|
|
483
483
|
this.heartFight.mode && this.currentHeardBeat.heardBeat === null && (this.currentHeardBeat.heardBeat = this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect] || null, this.drawHeardBeatLine());
|
|
484
484
|
let t = 0, i = 0;
|
|
485
485
|
if (this.leadModel.add) {
|
|
486
|
-
const
|
|
487
|
-
i = this.loopArrowY.add - (
|
|
486
|
+
const M = W(this.waveConfigs[this.longLeadConfig.leadIdxs[0]].gain, this.gridConfig.cellMg);
|
|
487
|
+
i = this.loopArrowY.add - (M || 0) - this.splitBlockHeight / 3.5;
|
|
488
488
|
} else
|
|
489
489
|
i = 20;
|
|
490
490
|
let s = 0, a = 0;
|
|
@@ -492,14 +492,14 @@ let g = class extends E {
|
|
|
492
492
|
fontSize: 12,
|
|
493
493
|
fill: "red",
|
|
494
494
|
fontFamily: this.fontFamily
|
|
495
|
-
}, n =
|
|
495
|
+
}, n = S(
|
|
496
496
|
this.waveConfigs[this.heartFight.showIdxPai].speed,
|
|
497
497
|
this.gridConfig.cellMg,
|
|
498
498
|
this.waveConfigs[this.heartFight.showIdxPai].sampleRate
|
|
499
499
|
);
|
|
500
500
|
let r = 0;
|
|
501
|
-
for (let
|
|
502
|
-
const p = this.heartBeatPosition[this.heartFight.showIdxPai][
|
|
501
|
+
for (let M = 0; M < (this.heartBeatPosition[this.heartFight.showIdxPai] || []).length; M++) {
|
|
502
|
+
const p = this.heartBeatPosition[this.heartFight.showIdxPai][M];
|
|
503
503
|
if (r = ((p == null ? void 0 : p.position) || 0) - e, !(e > ((p == null ? void 0 : p.position) || 0)) && !(!this.leadModel.isContinuous && !this.leadModel.add && r > (this.slidingWindowInfo.points || 0)) && !(this.leadModel.isSingleMode && r > (this.slidingWindowInfo.points || 0))) {
|
|
504
504
|
if (((p == null ? void 0 : p.position) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))
|
|
505
505
|
break;
|
|
@@ -621,11 +621,11 @@ let g = class extends E {
|
|
|
621
621
|
const e = [];
|
|
622
622
|
let t = this.leadHeadConfig.leadHedeWidth, i = 0, s = 0, a = [], o = 0, n = 0;
|
|
623
623
|
for (let r = 0; r < this.leadModel.add; r++)
|
|
624
|
-
s = this.longLeadConfig.leadIdxs[r], this.waveConfigs[s] && (t = this.waveConfigs[s].addPosX || t, o =
|
|
624
|
+
s = this.longLeadConfig.leadIdxs[r], this.waveConfigs[s] && (t = this.waveConfigs[s].addPosX || t, o = S(this.waveConfigs[s].speed, this.gridConfig.cellMg, this.waveConfigs[s].sampleRate), n = W(this.waveConfigs[s].gain, this.gridConfig.cellMg), i = this.waveConfigs[s].addPosY || (r + this.leadModel.line + 1) * this.splitBlockHeight, a = this.waveLists[s] || [], r === 0 && (this.loopArrowY.add = i), e.push({
|
|
625
625
|
pos: [t, i],
|
|
626
626
|
startInd: this.addSlidingWindowInfo.startInd || 0,
|
|
627
627
|
endInd: this.addSlidingWindowInfo.endInd || 0,
|
|
628
|
-
data: a.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((f, l) => this.waveConfigs[s].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[s].leadName) ?
|
|
628
|
+
data: a.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((f, l) => this.waveConfigs[s].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[s].leadName) ? H(this.waveConfigs[s].sensitivity, f, n / 2) : H(this.waveConfigs[s].sensitivity, f, n)).map((f, l) => [l * (o || 0), -f]),
|
|
629
629
|
sens: n,
|
|
630
630
|
step: o
|
|
631
631
|
}));
|
|
@@ -663,13 +663,13 @@ let g = class extends E {
|
|
|
663
663
|
for (let l = 0; l < this.leadModel.column; l++) {
|
|
664
664
|
e = l * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0, this.leadModel.isContinuous && l > 0 && (n = r, r = n + (this.slidingWindowInfo.points || 0));
|
|
665
665
|
for (let d = 1; d <= this.leadModel.line && (t = d * this.splitBlockHeight, !(i > (this.waveLists || []).length - 1)); d++)
|
|
666
|
-
e = this.waveConfigs[i].posX || e, t = this.waveConfigs[i].posY || t, a =
|
|
666
|
+
e = this.waveConfigs[i].posX || e, t = this.waveConfigs[i].posY || t, a = S(this.waveConfigs[i].speed, this.gridConfig.cellMg, this.waveConfigs[i].sampleRate), o = W(this.waveConfigs[i].gain, this.gridConfig.cellMg), s = this.waveLists[i] || [], this.waveConfigs[i] && (d === 1 && (this.loopArrowY.rowAndCol = t), f.push({
|
|
667
667
|
pos: [e, t],
|
|
668
668
|
startInd: n,
|
|
669
669
|
endInd: r,
|
|
670
670
|
sens: o,
|
|
671
671
|
step: a,
|
|
672
|
-
data: s.slice(n, r).map((h, C) => this.waveConfigs[i].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[i].leadName) ?
|
|
672
|
+
data: s.slice(n, r).map((h, C) => this.waveConfigs[i].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[i].leadName) ? H(this.waveConfigs[i].sensitivity, h, o / 2) : H(this.waveConfigs[i].sensitivity, h, o)).map((h, C) => [C * (a || 0), -h])
|
|
673
673
|
}), i++);
|
|
674
674
|
}
|
|
675
675
|
return f;
|
|
@@ -702,28 +702,29 @@ let g = class extends E {
|
|
|
702
702
|
this.waveDataCopy = e, e = null;
|
|
703
703
|
}
|
|
704
704
|
createLeadName(e, t, i, s = !1) {
|
|
705
|
-
var
|
|
706
|
-
|
|
705
|
+
var o;
|
|
706
|
+
let a = t;
|
|
707
|
+
this.leadHeadConfig.isShowLeadCalibration === !1 && (a = t - this.leadHeadConfig.leadHedeWidth + 5), (o = this.leadHeadNameGroup) == null || o.add(new I({
|
|
707
708
|
style: {
|
|
708
|
-
x:
|
|
709
|
+
x: a,
|
|
709
710
|
y: i,
|
|
710
711
|
text: this.leadNames[e],
|
|
711
712
|
fontSize: this.leadConfig.fontSize,
|
|
712
713
|
fill: this.leadConfig.lineColor,
|
|
713
714
|
fontFamily: this.leadConfig.fontFamily
|
|
714
715
|
},
|
|
715
|
-
oncontextmenu: (
|
|
716
|
-
|
|
717
|
-
event: D(y({},
|
|
716
|
+
oncontextmenu: (n) => {
|
|
717
|
+
n.event.preventDefault(), this.$emit("notiifyLeadName", {
|
|
718
|
+
event: D(y({}, n), {
|
|
718
719
|
name: this.leadNames[e],
|
|
719
720
|
idx: e
|
|
720
721
|
}),
|
|
721
722
|
isAdd: s
|
|
722
723
|
});
|
|
723
724
|
},
|
|
724
|
-
onclick: (
|
|
725
|
+
onclick: (n) => {
|
|
725
726
|
this.$emit("notiifyLeadName", {
|
|
726
|
-
event: D(y({},
|
|
727
|
+
event: D(y({}, n), {
|
|
727
728
|
name: this.leadNames[e],
|
|
728
729
|
idx: e
|
|
729
730
|
}),
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import y from "vue";
|
|
2
|
-
import
|
|
2
|
+
import w from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
|
|
3
3
|
import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
|
|
4
|
-
import { Prop as
|
|
4
|
+
import { Prop as a } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
|
|
5
5
|
import { Watch as v } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js";
|
|
6
|
-
import { AnalysisMode as c, AnalyseParameterTable as
|
|
6
|
+
import { AnalysisMode as c, AnalyseParameterTable as I, getActualY as S, LeadNameTexts as C, getStepForSpeed as F } from "@costy-plus/utils";
|
|
7
7
|
import { Polyline as p, Text as g, Group as L } from "zrender";
|
|
8
|
-
var
|
|
9
|
-
for (var o =
|
|
10
|
-
(d = e[l]) && (o = (
|
|
11
|
-
return
|
|
8
|
+
var b = Object.defineProperty, x = Object.getOwnPropertyDescriptor, i = (e, t, n, r) => {
|
|
9
|
+
for (var o = r > 1 ? void 0 : r ? x(t, n) : t, l = e.length - 1, d; l >= 0; l--)
|
|
10
|
+
(d = e[l]) && (o = (r ? d(t, n, o) : d(o)) || o);
|
|
11
|
+
return r && o && b(t, n, o), o;
|
|
12
12
|
};
|
|
13
13
|
let s = class extends y {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this.AnalysisMode = c, this.AnalyseParameterTable =
|
|
15
|
+
super(...arguments), this.AnalysisMode = c, this.AnalyseParameterTable = I, this.sceneIns = Object.freeze(null), this.AssistCtx = Object.freeze(null), this.leadNameIns = Object.freeze(null), this.sensAndSpeedIns = Object.freeze(null), this.waveFromIns = Object.freeze(null), this.waveFromGroup = Object.freeze(null), this.measureGroup = Object.freeze(null), this.leadHeadIns = Object.freeze(null), this.M1 = Object.freeze(null), this.M2 = Object.freeze(null), this.P1 = Object.freeze(null), this.P2 = Object.freeze(null), this.R1 = Object.freeze(null), this.R2 = Object.freeze(null), this.T1 = Object.freeze(null), this.T2 = Object.freeze(null), this.bottomSafeAreaH = Object.freeze(63), this.drawWaveFromX = Object.freeze(0), this.dbClickTime = Object.freeze(0), this.startPos = Object.freeze(0), this.currentGainIdx = Object.freeze(0), this.currentSpeedIdx = Object.freeze(0), this.currentLeadAnalyseValueIdx = Object.freeze(0), this.longdata = Object.freeze(void 0), this.waveFromLenPX = Object.freeze(0), this.leadNames = [], this.leadNameActive = {
|
|
16
16
|
name: "",
|
|
17
17
|
val: -2
|
|
18
18
|
}, this.currentSens = 0, this.currentSpeedValue = 0, this.currentStep = 0;
|
|
19
19
|
}
|
|
20
20
|
watchActiveLeadIdx(e) {
|
|
21
21
|
var t;
|
|
22
|
-
this.leadNameActive = this.leadNames.find((
|
|
22
|
+
this.leadNameActive = this.leadNames.find((n) => n.val === e) || {
|
|
23
23
|
name: "",
|
|
24
24
|
val: -2
|
|
25
25
|
}, (t = this.leadNameIns) == null || t.attr({
|
|
@@ -29,18 +29,18 @@ let s = class extends y {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
watchLeadNameList(e) {
|
|
32
|
-
this.leadNames = e.map((t,
|
|
33
|
-
var
|
|
34
|
-
return this.activeLeadIdx ===
|
|
32
|
+
this.leadNames = e.map((t, n) => {
|
|
33
|
+
var r;
|
|
34
|
+
return this.activeLeadIdx === n && ((r = this.leadNameIns) == null || r.attr({
|
|
35
35
|
style: {
|
|
36
36
|
text: this.outLeadNames ? this.outLeadNames[t] : this.LeadNameTextsPorps[t]
|
|
37
37
|
}
|
|
38
38
|
}), this.leadNameActive = {
|
|
39
39
|
name: this.outLeadNames ? this.outLeadNames[t] : this.LeadNameTextsPorps[t],
|
|
40
|
-
val:
|
|
40
|
+
val: n
|
|
41
41
|
}), {
|
|
42
42
|
name: this.outLeadNames ? this.outLeadNames[t] : this.LeadNameTextsPorps[t],
|
|
43
|
-
val:
|
|
43
|
+
val: n
|
|
44
44
|
};
|
|
45
45
|
}).concat({
|
|
46
46
|
name: "ALL",
|
|
@@ -54,8 +54,8 @@ let s = class extends y {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
destroyed() {
|
|
57
|
-
var e, t,
|
|
58
|
-
(e = this.waveFromGroup) == null || e.removeAll(), (t = this.measureGroup) == null || t.removeAll(), (
|
|
57
|
+
var e, t, n, r, o, l, d, h, u, m, f;
|
|
58
|
+
(e = this.waveFromGroup) == null || e.removeAll(), (t = this.measureGroup) == null || t.removeAll(), (n = this.M1) == null || n.removeAll(), (r = this.M2) == null || r.removeAll(), (o = this.P1) == null || o.removeAll(), (l = this.P2) == null || l.removeAll(), (d = this.R1) == null || d.removeAll(), (h = this.R2) == null || h.removeAll(), (u = this.T1) == null || u.removeAll(), (m = this.T2) == null || m.removeAll();
|
|
59
59
|
try {
|
|
60
60
|
(f = this.sceneIns) == null || f.dispose();
|
|
61
61
|
} catch (A) {
|
|
@@ -77,56 +77,59 @@ let s = class extends y {
|
|
|
77
77
|
}), this.drawWaveFrom();
|
|
78
78
|
}
|
|
79
79
|
createLeadHead() {
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
[
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
80
|
+
var e, t;
|
|
81
|
+
if (this.leadHeadConfig.isShowLeadCalibration !== !1) {
|
|
82
|
+
const r = this.containerWH.height / 2, o = this.leadHeadConfig.leadHedeWidth / 4;
|
|
83
|
+
this.leadHeadIns && ((e = this.sceneIns) == null || e.remove(this.leadHeadIns)), this.leadHeadIns = new p({
|
|
84
|
+
cursor: "",
|
|
85
|
+
shape: {
|
|
86
|
+
points: [
|
|
87
|
+
[
|
|
88
|
+
0 + 0,
|
|
89
|
+
0 + r
|
|
90
|
+
],
|
|
91
|
+
[
|
|
92
|
+
o + 0,
|
|
93
|
+
0 + r
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
o + 0,
|
|
97
|
+
-this.currentSens + r
|
|
98
|
+
],
|
|
99
|
+
[
|
|
100
|
+
3 * o + 0,
|
|
101
|
+
-this.currentSens + r
|
|
102
|
+
],
|
|
103
|
+
[
|
|
104
|
+
3 * o + 0,
|
|
105
|
+
0 + r
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
4 * o + 0,
|
|
109
|
+
0 + r
|
|
110
|
+
]
|
|
109
111
|
]
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
}
|
|
112
|
+
},
|
|
113
|
+
style: {
|
|
114
|
+
stroke: this.leadHeadConfig.leadHedeColor,
|
|
115
|
+
lineWidth: this.leadHeadConfig.leadHedeLineWidth
|
|
116
|
+
}
|
|
117
|
+
}), (t = this.sceneIns) == null || t.add(this.leadHeadIns);
|
|
118
|
+
}
|
|
117
119
|
}
|
|
118
120
|
createLeadName() {
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
+
var t;
|
|
122
|
+
let e = this.leadHeadConfig.leadHedeWidth;
|
|
123
|
+
this.leadHeadConfig.isShowLeadCalibration === !1 && (e = 5), this.leadNameIns = new g({
|
|
121
124
|
style: {
|
|
122
|
-
x:
|
|
125
|
+
x: e,
|
|
123
126
|
y: this.containerWH.height / 2 - this.leadConfig.fontSize,
|
|
124
127
|
text: this.leadNameActive.name,
|
|
125
128
|
fontSize: this.leadConfig.fontSize,
|
|
126
129
|
fill: this.leadConfig.lineColor,
|
|
127
130
|
fontFamily: this.leadConfig.fontFamily
|
|
128
131
|
}
|
|
129
|
-
}), (
|
|
132
|
+
}), (t = this.sceneIns) == null || t.add(this.leadNameIns);
|
|
130
133
|
}
|
|
131
134
|
createSensAndSpeed() {
|
|
132
135
|
var e, t;
|
|
@@ -159,16 +162,16 @@ let s = class extends y {
|
|
|
159
162
|
this.leadNameActive.val === -1 ? this.drawAllLead() : this.drawSingleLead();
|
|
160
163
|
}
|
|
161
164
|
drawAllLead() {
|
|
162
|
-
var t,
|
|
165
|
+
var t, n;
|
|
163
166
|
(t = this.waveFromIns) == null || t.hide(), this.waveFromGroup ? this.waveFromGroup.removeAll() : this.waveFromGroup = new L({
|
|
164
167
|
name: "waveFromGroup"
|
|
165
168
|
}), this.longdata = void 0;
|
|
166
169
|
const e = this.containerWH.height / 2;
|
|
167
|
-
for (let
|
|
168
|
-
const { beatData: o, startPos: l } = this.getWaveFrom(this.leadNames[
|
|
170
|
+
for (let r = 0; r < this.leadNames.length - 1; r++) {
|
|
171
|
+
const { beatData: o, startPos: l } = this.getWaveFrom(this.leadNames[r].val);
|
|
169
172
|
this.startPos = l, this.waveFromLenPX = o.length * this.currentStep, this.drawWaveFromX = this.containerWH.width / 2 - this.waveFromLenPX / 2 + this.leadHeadConfig.leadHedeWidth, this.waveFromGroup.add(new p({
|
|
170
173
|
cursor: "",
|
|
171
|
-
name: `${
|
|
174
|
+
name: `${r}`,
|
|
172
175
|
shape: {
|
|
173
176
|
points: o.map((d, h) => [
|
|
174
177
|
h * this.currentStep + this.drawWaveFromX,
|
|
@@ -176,24 +179,24 @@ let s = class extends y {
|
|
|
176
179
|
])
|
|
177
180
|
},
|
|
178
181
|
style: {
|
|
179
|
-
stroke: this.leadColors[
|
|
182
|
+
stroke: this.leadColors[r] || this.leadColors[r % this.leadColors.length],
|
|
180
183
|
lineWidth: this.leadConfig.lineWidth
|
|
181
184
|
}
|
|
182
185
|
}));
|
|
183
186
|
}
|
|
184
|
-
(
|
|
187
|
+
(n = this.sceneIns) == null || n.add(this.waveFromGroup);
|
|
185
188
|
}
|
|
186
189
|
drawSingleLead() {
|
|
187
190
|
var o, l, d;
|
|
188
191
|
this.waveFromGroup && ((o = this.sceneIns) == null || o.remove(this.waveFromGroup));
|
|
189
|
-
const { beatData: e, startPos: t, originData:
|
|
190
|
-
this.startPos = t, this.waveFromLenPX = e.length * this.currentStep, this.drawWaveFromX = this.containerWH.width / 2 - this.waveFromLenPX / 2 + this.leadHeadConfig.leadHedeWidth, this.longdata =
|
|
191
|
-
const
|
|
192
|
+
const { beatData: e, startPos: t, originData: n } = this.getWaveFrom();
|
|
193
|
+
this.startPos = t, this.waveFromLenPX = e.length * this.currentStep, this.drawWaveFromX = this.containerWH.width / 2 - this.waveFromLenPX / 2 + this.leadHeadConfig.leadHedeWidth, this.longdata = n;
|
|
194
|
+
const r = this.containerWH.height / 2;
|
|
192
195
|
(l = this.waveFromIns) == null || l.attr({
|
|
193
196
|
shape: {
|
|
194
197
|
points: e.map((h, u) => [
|
|
195
198
|
u * this.currentStep + this.drawWaveFromX,
|
|
196
|
-
-h +
|
|
199
|
+
-h + r
|
|
197
200
|
])
|
|
198
201
|
}
|
|
199
202
|
}), (d = this.waveFromIns) == null || d.show();
|
|
@@ -203,7 +206,7 @@ let s = class extends y {
|
|
|
203
206
|
let t = [];
|
|
204
207
|
return this.enlargeWaveMode === c.CompoundWave ? t = (this.complexData[e || 0] || []).slice(this.DisplayLeadInfo.startPos, this.DisplayLeadInfo.endPos + 1) : t = (this.normalData[e || 0] || []).slice(this.DisplayLeadInfo.startPos, this.DisplayLeadInfo.endPos + 1), {
|
|
205
208
|
originData: t,
|
|
206
|
-
beatData: t.map((
|
|
209
|
+
beatData: t.map((n) => S(this.sensitivity, n, this.currentSens)),
|
|
207
210
|
startPos: this.DisplayLeadInfo.startPos
|
|
208
211
|
};
|
|
209
212
|
}
|
|
@@ -216,8 +219,8 @@ let s = class extends y {
|
|
|
216
219
|
}
|
|
217
220
|
toggleSpeeds(e) {
|
|
218
221
|
const t = () => {
|
|
219
|
-
const
|
|
220
|
-
this.currentStep =
|
|
222
|
+
const n = F(this.currentSpeedValue, this.gridConfig.cellMg, this.sampleRate);
|
|
223
|
+
this.currentStep = n * this.magnification;
|
|
221
224
|
};
|
|
222
225
|
if (e) {
|
|
223
226
|
this.currentSpeedIdx < this.enlargeSpeeds.length - 1 && (this.currentSpeedIdx += 1, this.currentSpeedValue = this.enlargeSpeeds[this.currentSpeedIdx].value, t(), this.toggleRender());
|
|
@@ -234,7 +237,7 @@ let s = class extends y {
|
|
|
234
237
|
}
|
|
235
238
|
};
|
|
236
239
|
i([
|
|
237
|
-
|
|
240
|
+
a({
|
|
238
241
|
default: () => ({
|
|
239
242
|
startPos: 200,
|
|
240
243
|
endPos: 899
|
|
@@ -242,86 +245,86 @@ i([
|
|
|
242
245
|
})
|
|
243
246
|
], s.prototype, "DisplayLeadInfo", 2);
|
|
244
247
|
i([
|
|
245
|
-
|
|
246
|
-
default: () =>
|
|
248
|
+
a({
|
|
249
|
+
default: () => C
|
|
247
250
|
})
|
|
248
251
|
], s.prototype, "LeadNameTextsPorps", 2);
|
|
249
252
|
i([
|
|
250
|
-
|
|
253
|
+
a({
|
|
251
254
|
default: () => ""
|
|
252
255
|
})
|
|
253
256
|
], s.prototype, "prefixId", 2);
|
|
254
257
|
i([
|
|
255
|
-
|
|
258
|
+
a({ default: () => "" })
|
|
256
259
|
], s.prototype, "className", 2);
|
|
257
260
|
i([
|
|
258
|
-
|
|
261
|
+
a({
|
|
259
262
|
required: !0,
|
|
260
263
|
type: Number,
|
|
261
264
|
validator: (e) => typeof e == "number"
|
|
262
265
|
})
|
|
263
266
|
], s.prototype, "width", 2);
|
|
264
267
|
i([
|
|
265
|
-
|
|
268
|
+
a({
|
|
266
269
|
required: !0,
|
|
267
270
|
type: Number,
|
|
268
271
|
validator: (e) => typeof e == "number"
|
|
269
272
|
})
|
|
270
273
|
], s.prototype, "height", 2);
|
|
271
274
|
i([
|
|
272
|
-
|
|
275
|
+
a({
|
|
273
276
|
required: !0
|
|
274
277
|
})
|
|
275
278
|
], s.prototype, "gridConfig", 2);
|
|
276
279
|
i([
|
|
277
|
-
|
|
280
|
+
a({
|
|
278
281
|
required: !0
|
|
279
282
|
})
|
|
280
283
|
], s.prototype, "speedValue", 2);
|
|
281
284
|
i([
|
|
282
|
-
|
|
285
|
+
a({
|
|
283
286
|
default: 1
|
|
284
287
|
})
|
|
285
288
|
], s.prototype, "sens", 2);
|
|
286
289
|
i([
|
|
287
|
-
|
|
290
|
+
a({
|
|
288
291
|
default: 1
|
|
289
292
|
})
|
|
290
293
|
], s.prototype, "step", 2);
|
|
291
294
|
i([
|
|
292
|
-
|
|
295
|
+
a({
|
|
293
296
|
required: !0
|
|
294
297
|
})
|
|
295
298
|
], s.prototype, "sampleRate", 2);
|
|
296
299
|
i([
|
|
297
|
-
|
|
300
|
+
a({
|
|
298
301
|
required: !0
|
|
299
302
|
})
|
|
300
303
|
], s.prototype, "sensitivity", 2);
|
|
301
304
|
i([
|
|
302
|
-
|
|
305
|
+
a({
|
|
303
306
|
required: !0,
|
|
304
307
|
default: () => []
|
|
305
308
|
})
|
|
306
309
|
], s.prototype, "complexData", 2);
|
|
307
310
|
i([
|
|
308
|
-
|
|
311
|
+
a({
|
|
309
312
|
required: !0,
|
|
310
313
|
default: () => []
|
|
311
314
|
})
|
|
312
315
|
], s.prototype, "normalData", 2);
|
|
313
316
|
i([
|
|
314
|
-
|
|
317
|
+
a({
|
|
315
318
|
default: null
|
|
316
319
|
})
|
|
317
320
|
], s.prototype, "outLeadNames", 2);
|
|
318
321
|
i([
|
|
319
|
-
|
|
322
|
+
a({
|
|
320
323
|
default: !1
|
|
321
324
|
})
|
|
322
325
|
], s.prototype, "isShowEnlargeWave", 2);
|
|
323
326
|
i([
|
|
324
|
-
|
|
327
|
+
a({
|
|
325
328
|
default: () => ({
|
|
326
329
|
leadHedeWidth: 20,
|
|
327
330
|
leadHedeColor: "#000",
|
|
@@ -330,7 +333,7 @@ i([
|
|
|
330
333
|
})
|
|
331
334
|
], s.prototype, "leadHeadConfig", 2);
|
|
332
335
|
i([
|
|
333
|
-
|
|
336
|
+
a({
|
|
334
337
|
default: () => ({
|
|
335
338
|
lineColor: "#000",
|
|
336
339
|
lineWidth: 1,
|
|
@@ -340,47 +343,47 @@ i([
|
|
|
340
343
|
})
|
|
341
344
|
], s.prototype, "leadConfig", 2);
|
|
342
345
|
i([
|
|
343
|
-
|
|
346
|
+
a({
|
|
344
347
|
default: 5
|
|
345
348
|
})
|
|
346
349
|
], s.prototype, "magnification", 2);
|
|
347
350
|
i([
|
|
348
|
-
|
|
351
|
+
a({
|
|
349
352
|
default: () => []
|
|
350
353
|
})
|
|
351
354
|
], s.prototype, "leadNameList", 2);
|
|
352
355
|
i([
|
|
353
|
-
|
|
356
|
+
a({
|
|
354
357
|
required: !0
|
|
355
358
|
})
|
|
356
359
|
], s.prototype, "activeLeadIdx", 2);
|
|
357
360
|
i([
|
|
358
|
-
|
|
361
|
+
a({
|
|
359
362
|
required: !0
|
|
360
363
|
})
|
|
361
364
|
], s.prototype, "activeLeadAnalyseValue", 2);
|
|
362
365
|
i([
|
|
363
|
-
|
|
366
|
+
a({
|
|
364
367
|
default: "ECG"
|
|
365
368
|
})
|
|
366
369
|
], s.prototype, "typeClass", 2);
|
|
367
370
|
i([
|
|
368
|
-
|
|
371
|
+
a({
|
|
369
372
|
default: () => ["black", "red", "orange", "yellow", "green", "#4B0082", "blue", "purple", "#FFB6C1", "#EE82EE", "#6A5ACD", "#00FFFF"]
|
|
370
373
|
})
|
|
371
374
|
], s.prototype, "leadColors", 2);
|
|
372
375
|
i([
|
|
373
|
-
|
|
376
|
+
a({
|
|
374
377
|
default: c.CompoundWave
|
|
375
378
|
})
|
|
376
379
|
], s.prototype, "enlargeWaveMode", 2);
|
|
377
380
|
i([
|
|
378
|
-
|
|
381
|
+
a({
|
|
379
382
|
default: () => []
|
|
380
383
|
})
|
|
381
384
|
], s.prototype, "enlargeGains", 2);
|
|
382
385
|
i([
|
|
383
|
-
|
|
386
|
+
a({
|
|
384
387
|
default: () => []
|
|
385
388
|
})
|
|
386
389
|
], s.prototype, "enlargeSpeeds", 2);
|
|
@@ -391,7 +394,7 @@ i([
|
|
|
391
394
|
v("leadNameList", { deep: !0, immediate: !0 })
|
|
392
395
|
], s.prototype, "watchLeadNameList", 1);
|
|
393
396
|
s = i([
|
|
394
|
-
|
|
397
|
+
w({
|
|
395
398
|
name: "Methods"
|
|
396
399
|
})
|
|
397
400
|
], s);
|
|
@@ -4,12 +4,12 @@ import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-componen
|
|
|
4
4
|
import { Prop as n } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
|
|
5
5
|
import { getPointIdxForPx as u, LeadNameTexts as y } from "@costy-plus/utils";
|
|
6
6
|
import { Polyline as p, Text as W } from "zrender";
|
|
7
|
-
var D = Object.defineProperty, L = Object.getOwnPropertyDescriptor, s = (e,
|
|
8
|
-
for (var r = o > 1 ? void 0 : o ? L(
|
|
9
|
-
(l = e[h]) && (r = (o ? l(
|
|
10
|
-
return o && r && D(
|
|
7
|
+
var D = Object.defineProperty, L = Object.getOwnPropertyDescriptor, s = (e, a, d, o) => {
|
|
8
|
+
for (var r = o > 1 ? void 0 : o ? L(a, d) : a, h = e.length - 1, l; h >= 0; h--)
|
|
9
|
+
(l = e[h]) && (r = (o ? l(a, d, r) : l(r)) || r);
|
|
10
|
+
return o && r && D(a, d, r), r;
|
|
11
11
|
};
|
|
12
|
-
let
|
|
12
|
+
let i = class extends v {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments), this.sceneIns = Object.freeze(null), this.AssistCtx = Object.freeze(null), this.leadNameIns = Object.freeze(null), this.waveFromIns = Object.freeze(null), this.leadHeadIns = Object.freeze(null), this.drawPoints = Object.freeze(0), this.magnifierWave = Object.freeze(null), this.centerX = Object.freeze(0), this.fuzzyDistance = Object.freeze(15), this.isLeft = !0, this.currentLead = null;
|
|
15
15
|
}
|
|
@@ -27,11 +27,11 @@ let a = class extends v {
|
|
|
27
27
|
this.centerX = this.containerWH.width / 2;
|
|
28
28
|
}
|
|
29
29
|
waveBoxAddToEventListener() {
|
|
30
|
-
var e,
|
|
30
|
+
var e, a;
|
|
31
31
|
(e = this.magnifierWave) == null || e.addEventListener(
|
|
32
32
|
"mousemove",
|
|
33
33
|
this.waveBoxMousemove
|
|
34
|
-
), (
|
|
34
|
+
), (a = this.magnifierWave) == null || a.addEventListener(
|
|
35
35
|
"touchmove",
|
|
36
36
|
this.waveBoxMousemove
|
|
37
37
|
), this.$once("hook:beforeDestroy", () => {
|
|
@@ -50,35 +50,35 @@ let a = class extends v {
|
|
|
50
50
|
}
|
|
51
51
|
createLeadHead() {
|
|
52
52
|
var o, r, h, l;
|
|
53
|
-
const
|
|
54
|
-
this.leadHeadIns && ((o = this.sceneIns) == null || o.remove(this.leadHeadIns)), this.leadHeadIns = new p({
|
|
53
|
+
const a = this.containerWH.height / 2, d = this.leadHeadConfig.leadHedeWidth / 4;
|
|
54
|
+
this.leadHeadConfig.isShowLeadCalibration !== !1 && (this.leadHeadIns && ((o = this.sceneIns) == null || o.remove(this.leadHeadIns)), this.leadHeadIns = new p({
|
|
55
55
|
cursor: "",
|
|
56
56
|
name: "lead_head",
|
|
57
57
|
shape: {
|
|
58
58
|
points: [
|
|
59
59
|
[
|
|
60
60
|
0 + 0,
|
|
61
|
-
0 +
|
|
61
|
+
0 + a
|
|
62
62
|
],
|
|
63
63
|
[
|
|
64
64
|
d + 0,
|
|
65
|
-
0 +
|
|
65
|
+
0 + a
|
|
66
66
|
],
|
|
67
67
|
[
|
|
68
68
|
d + 0,
|
|
69
|
-
-(((r = this.currentLead) == null ? void 0 : r.sens) || this.sens) * this.magnification +
|
|
69
|
+
-(((r = this.currentLead) == null ? void 0 : r.sens) || this.sens) * this.magnification + a
|
|
70
70
|
],
|
|
71
71
|
[
|
|
72
72
|
3 * d + 0,
|
|
73
|
-
-(((h = this.currentLead) == null ? void 0 : h.sens) || this.sens) * this.magnification +
|
|
73
|
+
-(((h = this.currentLead) == null ? void 0 : h.sens) || this.sens) * this.magnification + a
|
|
74
74
|
],
|
|
75
75
|
[
|
|
76
76
|
3 * d + 0,
|
|
77
|
-
0 +
|
|
77
|
+
0 + a
|
|
78
78
|
],
|
|
79
79
|
[
|
|
80
80
|
4 * d + 0,
|
|
81
|
-
0 +
|
|
81
|
+
0 + a
|
|
82
82
|
]
|
|
83
83
|
]
|
|
84
84
|
},
|
|
@@ -86,20 +86,21 @@ let a = class extends v {
|
|
|
86
86
|
stroke: this.leadHeadConfig.leadHedeColor,
|
|
87
87
|
lineWidth: this.leadHeadConfig.leadHedeLineWidth
|
|
88
88
|
}
|
|
89
|
-
}), (l = this.sceneIns) == null || l.add(this.leadHeadIns);
|
|
89
|
+
}), (l = this.sceneIns) == null || l.add(this.leadHeadIns));
|
|
90
90
|
}
|
|
91
91
|
createLeadName() {
|
|
92
|
-
var
|
|
93
|
-
|
|
92
|
+
var a;
|
|
93
|
+
let e = this.leadHeadConfig.leadHedeWidth;
|
|
94
|
+
this.leadHeadConfig.isShowLeadCalibration === !1 && (e = 5), this.leadNameIns = new W({
|
|
94
95
|
style: {
|
|
95
|
-
x:
|
|
96
|
+
x: e,
|
|
96
97
|
y: this.containerWH.height / 2 - this.leadConfig.fontSize,
|
|
97
98
|
text: "",
|
|
98
99
|
fontSize: this.leadConfig.fontSize,
|
|
99
100
|
fill: this.leadConfig.lineColor,
|
|
100
101
|
fontFamily: this.leadConfig.fontFamily
|
|
101
102
|
}
|
|
102
|
-
}), (
|
|
103
|
+
}), (a = this.sceneIns) == null || a.add(this.leadNameIns);
|
|
103
104
|
}
|
|
104
105
|
createWaveFrom() {
|
|
105
106
|
var e;
|
|
@@ -114,7 +115,7 @@ let a = class extends v {
|
|
|
114
115
|
}
|
|
115
116
|
}), (e = this.sceneIns) == null || e.add(this.waveFromIns);
|
|
116
117
|
}
|
|
117
|
-
findTheCurrentLead(e,
|
|
118
|
+
findTheCurrentLead(e, a) {
|
|
118
119
|
var r, h, l;
|
|
119
120
|
let d = 0;
|
|
120
121
|
this.currentLead = null;
|
|
@@ -122,7 +123,7 @@ let a = class extends v {
|
|
|
122
123
|
if (!this.currentLead && this.singleWaveData.length) {
|
|
123
124
|
d = this.singleWaveData[0].data[this.singleWaveData[0].data.length - 1][0] + this.singleWaveData[0].pos[0];
|
|
124
125
|
for (let t = 0; t < this.singleWaveData.length; t++)
|
|
125
|
-
if (!(
|
|
126
|
+
if (!(a < this.singleWaveData[t].pos[1] - (this.singleWaveData[t].sens || this.sens) - this.fuzzyDistance || a > this.singleWaveData[t].pos[1] + this.fuzzyDistance) && !(e < this.leadHeadConfig.leadHedeWidth || e > d)) {
|
|
126
127
|
o = this.LeadNameTextsPorps[this.heartFight.defaultSelect], this.currentLead = this.singleWaveData[t];
|
|
127
128
|
break;
|
|
128
129
|
}
|
|
@@ -130,7 +131,7 @@ let a = class extends v {
|
|
|
130
131
|
if (!this.currentLead && this.addWaveData.length) {
|
|
131
132
|
d = this.addWaveData[0].data[this.addWaveData[0].data.length - 1][0] + this.addWaveData[0].pos[0];
|
|
132
133
|
for (let t = 0; t < this.addWaveData.length; t++)
|
|
133
|
-
if (!(
|
|
134
|
+
if (!(a < this.addWaveData[t].pos[1] - (this.addWaveData[t].sens || this.sens) - this.fuzzyDistance || a > this.addWaveData[t].pos[1] + this.fuzzyDistance) && !(e < this.leadHeadConfig.leadHedeWidth || e > d)) {
|
|
134
135
|
o = this.leadNames ? this.leadNames[this.longLeadConfig[t]] : this.LeadNameTextsPorps[this.longLeadConfig[t]], this.currentLead = this.addWaveData[t];
|
|
135
136
|
break;
|
|
136
137
|
}
|
|
@@ -138,7 +139,7 @@ let a = class extends v {
|
|
|
138
139
|
if (!this.currentLead && this.waveData.length) {
|
|
139
140
|
d = this.waveData[0].data[this.waveData[0].data.length - 1][0] + this.waveData[0].pos[0] - this.leadHeadConfig.leadHedeWidth;
|
|
140
141
|
for (let t = 0; t < this.waveData.length; t++)
|
|
141
|
-
if (!(
|
|
142
|
+
if (!(a < this.waveData[t].pos[1] - (this.waveData[t].sens || this.sens) - this.fuzzyDistance || a > this.waveData[t].pos[1] + this.fuzzyDistance) && !(e < this.waveData[t].pos[0] || e > this.waveData[t].pos[0] + d)) {
|
|
142
143
|
o = this.leadNames ? this.leadNames[this.normalLeadNames[t]] : this.LeadNameTextsPorps[this.normalLeadNames[t]] || "", this.currentLead = this.waveData[t];
|
|
143
144
|
break;
|
|
144
145
|
}
|
|
@@ -167,64 +168,64 @@ s([
|
|
|
167
168
|
n({
|
|
168
169
|
default: () => y
|
|
169
170
|
})
|
|
170
|
-
],
|
|
171
|
+
], i.prototype, "LeadNameTextsPorps", 2);
|
|
171
172
|
s([
|
|
172
173
|
n({
|
|
173
174
|
default: () => ""
|
|
174
175
|
})
|
|
175
|
-
],
|
|
176
|
+
], i.prototype, "prefixId", 2);
|
|
176
177
|
s([
|
|
177
178
|
n({ default: () => "" })
|
|
178
|
-
],
|
|
179
|
+
], i.prototype, "className", 2);
|
|
179
180
|
s([
|
|
180
181
|
n({
|
|
181
182
|
required: !0,
|
|
182
183
|
type: Number,
|
|
183
184
|
validator: (e) => typeof e == "number"
|
|
184
185
|
})
|
|
185
|
-
],
|
|
186
|
+
], i.prototype, "width", 2);
|
|
186
187
|
s([
|
|
187
188
|
n({
|
|
188
189
|
required: !0,
|
|
189
190
|
type: Number,
|
|
190
191
|
validator: (e) => typeof e == "number"
|
|
191
192
|
})
|
|
192
|
-
],
|
|
193
|
+
], i.prototype, "height", 2);
|
|
193
194
|
s([
|
|
194
195
|
n({
|
|
195
196
|
required: !0
|
|
196
197
|
})
|
|
197
|
-
],
|
|
198
|
+
], i.prototype, "gridConfig", 2);
|
|
198
199
|
s([
|
|
199
200
|
n({
|
|
200
201
|
default: () => [1, 6, 10]
|
|
201
202
|
})
|
|
202
|
-
],
|
|
203
|
+
], i.prototype, "longLeadConfig", 2);
|
|
203
204
|
s([
|
|
204
205
|
n({
|
|
205
206
|
default: 0
|
|
206
207
|
})
|
|
207
|
-
],
|
|
208
|
+
], i.prototype, "splitBlockHeight", 2);
|
|
208
209
|
s([
|
|
209
210
|
n({
|
|
210
211
|
default: 0
|
|
211
212
|
})
|
|
212
|
-
],
|
|
213
|
+
], i.prototype, "splitPoint", 2);
|
|
213
214
|
s([
|
|
214
215
|
n({
|
|
215
216
|
required: !0
|
|
216
217
|
})
|
|
217
|
-
],
|
|
218
|
+
], i.prototype, "speedValue", 2);
|
|
218
219
|
s([
|
|
219
220
|
n({
|
|
220
221
|
default: 1
|
|
221
222
|
})
|
|
222
|
-
],
|
|
223
|
+
], i.prototype, "sens", 2);
|
|
223
224
|
s([
|
|
224
225
|
n({
|
|
225
226
|
default: 1
|
|
226
227
|
})
|
|
227
|
-
],
|
|
228
|
+
], i.prototype, "step", 2);
|
|
228
229
|
s([
|
|
229
230
|
n({
|
|
230
231
|
default: () => ({
|
|
@@ -237,7 +238,7 @@ s([
|
|
|
237
238
|
telectricalaxis: !1
|
|
238
239
|
})
|
|
239
240
|
})
|
|
240
|
-
],
|
|
241
|
+
], i.prototype, "heartFight", 2);
|
|
241
242
|
s([
|
|
242
243
|
n({
|
|
243
244
|
default: () => ({
|
|
@@ -246,22 +247,22 @@ s([
|
|
|
246
247
|
leadHedeLineWidth: 2
|
|
247
248
|
})
|
|
248
249
|
})
|
|
249
|
-
],
|
|
250
|
+
], i.prototype, "leadHeadConfig", 2);
|
|
250
251
|
s([
|
|
251
252
|
n({
|
|
252
253
|
default: () => []
|
|
253
254
|
})
|
|
254
|
-
],
|
|
255
|
+
], i.prototype, "waveData", 2);
|
|
255
256
|
s([
|
|
256
257
|
n({
|
|
257
258
|
default: () => []
|
|
258
259
|
})
|
|
259
|
-
],
|
|
260
|
+
], i.prototype, "addWaveData", 2);
|
|
260
261
|
s([
|
|
261
262
|
n({
|
|
262
263
|
default: () => []
|
|
263
264
|
})
|
|
264
|
-
],
|
|
265
|
+
], i.prototype, "singleWaveData", 2);
|
|
265
266
|
s([
|
|
266
267
|
n({
|
|
267
268
|
default: () => ({
|
|
@@ -271,27 +272,27 @@ s([
|
|
|
271
272
|
fontSize: 15
|
|
272
273
|
})
|
|
273
274
|
})
|
|
274
|
-
],
|
|
275
|
+
], i.prototype, "leadConfig", 2);
|
|
275
276
|
s([
|
|
276
277
|
n({
|
|
277
278
|
required: !0
|
|
278
279
|
})
|
|
279
|
-
],
|
|
280
|
+
], i.prototype, "normalLeadNames", 2);
|
|
280
281
|
s([
|
|
281
282
|
n({
|
|
282
283
|
default: null
|
|
283
284
|
})
|
|
284
|
-
],
|
|
285
|
+
], i.prototype, "leadNames", 2);
|
|
285
286
|
s([
|
|
286
287
|
n({
|
|
287
288
|
default: 5
|
|
288
289
|
})
|
|
289
|
-
],
|
|
290
|
-
|
|
290
|
+
], i.prototype, "magnification", 2);
|
|
291
|
+
i = s([
|
|
291
292
|
g({
|
|
292
293
|
name: "Methods"
|
|
293
294
|
})
|
|
294
|
-
],
|
|
295
|
+
], i);
|
|
295
296
|
export {
|
|
296
|
-
|
|
297
|
+
i as default
|
|
297
298
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var O=Object.defineProperty,B=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var G=(e,t,i)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,I=(e,t)=>{for(var i in t||(t={}))R.call(t,i)&&G(e,i,t[i]);if(D)for(var i of D(t))k.call(t,i)&&G(e,i,t[i]);return e},F=(e,t)=>B(e,N(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("vue"),T=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),x=require("lodash"),u=require("@costy-plus/utils"),g=require("zrender"),z=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function _(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const $=z(j),X=_(g);var V=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,c=(e,t,i,s)=>{for(var a=s>1?void 0:s?Y(t,i):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(a=(s?n(t,i,a):n(a))||a);return s&&a&&V(t,i,a),a};exports.default=class extends $.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(55),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.timersCopy=Object.freeze(0),this.range=Object.freeze(5e3),this.heartBeatPosition=[],this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({maxPoints:0,minPoints:0}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=Object.freeze(-1),this.publicStep=Object.freeze(0),this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0)}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}destroyed(){var e,t,i,s,a,o,n,r,f,l,d;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(a=this.splitLineGroup)==null||a.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(r=this.rulerGroup)==null||r.removeAll(),(f=this.arrowGroup)==null||f.removeAll(),(l=this.heardBeatLineGroup)==null||l.removeAll(),(d=this.sceneIns)==null||d.dispose()}initCreatedConfig(){this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height,this.initConfig()}init(){this.calcHeartBeatPositions(),this.initWaveFormPeer(),this.combinationDrawing(),this.registPostStart()}registPostStart(){this.posStart!==void 0&&this.posStart!==null&&(this.scrollConfig.isShow?this.$nextTick(()=>{var e;this.scrollConfig.isNativeScroll?(e=this.$refs[this.prefixId+"nativeScroll"])==null||e.scrollBy({left:(this.posStart||0)*(this.publicStep||1),top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:(this.posStart||0)*(this.publicStep||1)})}):(this.scrollWaveFrom(this.posStart),this.scrollRuler(this.posStart),this.scrollArrow(this.posStart)))}resetScroll(e=0){this.scrollConfig.isShow?this.$nextTick(()=>{var t;this.scrollConfig.isNativeScroll?(t=this.$refs[this.prefixId+"nativeScroll"])==null||t.scrollBy({left:e,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:e})}):(this.scrollWaveFrom(e),this.scrollRuler(e),this.scrollArrow(e))}combinationDrawing(){this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}calcHeartBeatPositions(){let e=[];for(let t=0;t<this.analyseValues.length;t++){for(let i=1;i<this.analyseValues[t].length;i++)t!==1&&this.analyseValues[t][i].KeyPosByBeat.Rpoint===0||e.push({index:this.analyseValues[t][i].BeatID,position:this.analyseValues[t][i].KeyPosByBeat.Rpoint,heartrate:this.analyseValues[t][i].AnabyBeat.VentricularRate,interval:Math.round(60/this.analyseValues[t][i].AnabyBeat.VentricularRate*1e3),telectricalaxis:this.analyseValues[t][i].AnabyBeat.TAxis===9999?this.range:this.analyseValues[t][i].AnabyBeat.TAxis,qrstCompany:(this.analyseValues[t][i].AnabyBeat.QRS_T===9999?this.range:this.analyseValues[t][i].AnabyBeat.QRS_T)+"\xB0"});this.heartBeatPosition.push(e)}e=null}initSlidingWindowInfo(){const e=this.publicStep||0,t=Math.ceil(this.splitPoint/e);if(this.slidingWindowInfo={points:this.slidingWindowInfo.points<=t||this.leadModel.isSingleMode?t:this.slidingWindowInfo.points,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd<=t||this.leadModel.isSingleMode?t:this.slidingWindowInfo.endInd},this.scrollConfig.isShow&&!this.leadModel.isSingleMode){const s=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),a=this.dataTotalLength*s;this.vuescrollWH.width=this.canvasContainer.width+(a||0)-this.splitPoint}const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points<=i||this.leadModel.isSingleMode?i:this.addSlidingWindowInfo.points,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd<=i||this.leadModel.isSingleMode?i:this.addSlidingWindowInfo.endInd}}calcHighestAndLowestPoint(){const e=x.flattenDeep(this.waveLists);return{maxPoints:x.max(e)||0,minPoints:x.min(e)||0}}isLeadOff(e){return!!this.waveConfigs[e].isLeadOff}isLeadDel(e){return!!this.waveConfigs[e].isLeadDelete}initConfig(){var t;this.rowAndColwaveFromGroup=new g.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new g.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new g.Group({name:"addwaveFrom"}),this.leadHeadGroup=new g.Group({name:"leadHead"}),this.splitLineGroup=new g.Group({name:"splitLine"}),this.leadHeadNameGroup=new g.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new g.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new g.Group({name:"ruler"}),this.arrowGroup=new g.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new g.Group({name:"heardBeatLine"});let e=this.canvasContainer.width;if(this.leadModel.ecgareawidth===1){const i=u.getPrintLengthToPx(((t=this.waveConfigs[0])==null?void 0:t.sampleRate)||0)+this.leadHeadConfig.leadHedeWidth;i<=e&&(e=i)}else if(this.leadModel.isContinuous){const i=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),s=this.dataTotalLength*i;!this.leadModel.isSingleMode&&(s||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(s||0)+this.leadHeadConfig.leadHedeWidth)}this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:this.slidingWindowInfo.points||0,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd||0},this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points||0,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=this.leadNames.map((i,s)=>s)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=this.calcHighestAndLowestPoint(),this.leadModel.isSingleMode?(this.splitBlockHeight=Math.abs(this.highestAndLowestPoint.maxPoints)+Math.abs(this.highestAndLowestPoint.minPoints)+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6)):this.splitBlockHeight=this.drawArea.height/this.totalRows,this.publicStep=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),this.rulerStep=(this.publicStep||1)*(this.leadModel.publicSampleRate||1)/(this.gridConfig.cellMg*2+2)}initWaveFormPeer(){var i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById(`${this.prefixId}wave-from-box`);this.sceneIns=X.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById(`${this.prefixId}MXGrid`);this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp)}sceneInsMousemove(e){var t;this.sceneIsMouseDown&&(this.scrollConfig.isNativeScroll?(t=this.$refs[`${this.prefixId}nativeScroll`])==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs[`${this.prefixId}vueScroll`].scrollBy({dx:e.offsetX-this.sceneIsMouseDownX}))}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}sceneInsEventOff(){var e,t,i;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp)}drawLeadHead(){var o,n,r,f,l;(o=this.leadHeadGroup)==null||o.removeAll(),(n=this.sceneIns)==null||n.remove(this.leadHeadGroup);let e="",t=!1,i=0,s=0;for(let d=0;d<=this.leadModel.column;d++){s=d*this.leadModel.line;e:for(let h=1;h<=this.leadModel.line;h++){if(!(this.waveConfigs||[])[h-1+s])break e;!this.waveConfigs[h-1+s].isShowLeadHead||(t=!1,e=(this.leadNames||[])[h-1+s]||"",this.waveConfigs[h-1+s].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=this.waveConfigs[h-1+s].posX?this.waveConfigs[h-1+s].posX-this.leadHeadConfig.leadHedeWidth:0,(r=this.leadHeadGroup)==null||r.add(this.createLeadHead(i,this.waveConfigs[h-1+s].posY||h*this.splitBlockHeight,u.getSens(this.waveConfigs[h-1+s].gain,this.gridConfig.cellMg),t)))}}let a=null;for(let d=0;d<this.leadModel.add;d++)!this.waveConfigs[this.longLeadConfig.leadIdxs[d]]||(a=this.waveConfigs[this.longLeadConfig.leadIdxs[d]],e=this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[d]]],t=!1,a.gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=a.posX?a.posX-this.leadHeadConfig.leadHedeWidth:0,(f=this.leadHeadGroup)==null||f.add(this.createLeadHead(i,a.posY||(d+1+this.leadModel.line)*this.splitBlockHeight,u.getSens(a.gain,this.gridConfig.cellMg),t)));a=null,(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}createLeadHead(e,t,i,s){const a=this.leadHeadConfig.leadHedeWidth/4;return i=s?i/2:i,new g.Polyline({cursor:"",shape:{points:[[0+e,0+t],[a+e,0+t],[a+e,-i+t],[3*a+e,-i+t],[3*a+e,0+t],[4*a+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawColSplitLine(){var o,n,r,f,l;(o=this.splitLineGroup)==null||o.removeAll(),(n=this.sceneIns)==null||n.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/(this.leadModel.column||1);if(this.splitPoint=e,this.leadModel.isSingleMode){const d=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),h=u.getDataLenTimes(Math.ceil(this.splitPoint/(d||1))||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),m=parseInt(`${h/1e3%60}`,10);this.splitPoint=m*(this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0)*(d||0)}let t=0,i=0,s=0,a=0;for(let d=1;d<=this.leadModel.column-1;d++){t=d*e+this.leadHeadConfig.leadHedeWidth,i=d*this.leadModel.line;e:for(let h=1;h<=this.leadModel.line;h++){if(!(this.waveConfigs||[])[h-1+i])break e;if((this.waveConfigs||[])[h-1+i].isShowLeadHead)continue e;if((this.waveConfigs||[])[h-1+i].posX!==void 0&&(t=(this.waveConfigs||[])[h-1+i].posX),s=(this.waveConfigs||[])[h-1+i].leadIdx,s===void 0)break;a=u.getSens((this.waveConfigs||[])[h-1+i].gain,this.gridConfig.cellMg),(this.waveConfigs||[])[h-1+i].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.leadNames[s])?(r=this.splitLineGroup)==null||r.add(this.creatSplitLine(t,((this.waveConfigs||[])[h-1+i].posY||h*this.splitBlockHeight)-(a||0)/2*.5,a,!0)):(f=this.splitLineGroup)==null||f.add(this.creatSplitLine(t,((this.waveConfigs||[])[h-1+i].posY||h*this.splitBlockHeight)-(a||0)*.5,a))}}(l=this.sceneIns)==null||l.add(this.splitLineGroup)}creatSplitLine(e,t,i,s){return new g.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(s?(i||0)/2:i||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawRulerNotes(){var s,a;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new g.Text({cursor:"",style:I({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new g.Text({style:I({text:`${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(s=this.sceneIns)==null||s.add(i),(a=this.sceneIns)==null||a.add(t)}drawRuler(e=0){var n,r,f;if(this.timersCopy=e,!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,a=t;const o=u.getStepForSpeed(this.rulerConfig.speed,this.gridConfig.cellMg,this.rulerConfig.sampleRate);if(this.leadModel.isContinuous)a=t*5;else if(!this.leadModel.add&&o){const l=u.getPointIdxForPx(this.splitPoint,o),d=u.getDataLenTimes(l,this.rulerConfig.sampleRate||0)/1e3;a=e+d}for(let l=e;l<=a;l=+(l+.1).toFixed(1))l!==e&&(i+=this.rulerStep),l%1===0?(s=this.canvasContainer.height-10,(n=this.rulerGroup)==null||n.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:l+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new g.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(f=this.sceneIns)==null||f.add(this.rulerGroup)}drawWaveFrom(){var e,t,i;this.leadModel.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(e=this.sceneIns)==null||e.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(t=this.sceneIns)==null||t.add(this.rowAndColwaveFromGroup),(i=this.sceneIns)==null||i.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(this.timersCopy),this.drawLoopArrow()}getRednerSinglePoints(){let e=0,t=0;const i=this.waveLists[this.singleModeConfig.defaultSelect]||[];let s=this.slidingWindowInfo.startInd||0,a=this.slidingWindowInfo.endInd||0;const o=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),n=u.getSens(this.waveConfigs[this.singleModeConfig.defaultSelect].gain,this.gridConfig.cellMg),r=[],f=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let d=1;d<=f;d++)t=d*this.splitBlockHeight,d>1&&(t*=.8,s=a,a=s+(this.slidingWindowInfo.points||0)),d===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:s,endInd:a,step:o,sens:n,data:i.slice(s,a).map((h,m)=>this.waveConfigs[this.singleModeConfig.defaultSelect].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName)?u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,h,n/2):u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,h,n)).map((h,m)=>[m*(o||0),-h])})}return r}createSingleWaveFrom(){var n,r,f;(n=this.singleWaveFromGroup)==null||n.removeAll();let e=this.getRednerSinglePoints(),t=u.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0);const i=t;let s=0,a=0,o=0;for(let l=0;l<e.length&&!(e[l].pos[1]>this.drawArea.height+this.bottomAreaHeight);l++)this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx)||(s=parseInt(`${t/1e3/60}`,10),a=parseInt(`${t/1e3%60}`,10),s=a===60?s+=1:s,s=s===0?"00":s<10?`0${s}`:s,a=a===0||a===60?"00":a<10?`0${a}`:a,(r=this.singleWaveFromGroup)==null||r.add(new g.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+l,shape:{points:e[l].data.map(([d,h],m)=>isNaN(h)?(o===0&&(o=m-1,o=o<0?0:o),[e[l].data[o][0]+e[l].pos[0],e[l].data[o][1]+e[l].pos[1]]):(o=0,[d+e[l].pos[0],h+e[l].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:d=>{this.onDbClickWaveFrom(d,"single")}})),t/1e3<this.dataTotalTimes&&((f=this.singleWaveFromGroup)==null||f.add(new g.Text({cursor:"",style:{x:e[l].pos[0],y:e[l].pos[1]-(e[l].sens||0)/2,text:l===0?"00:00 \u5FC3\u7387":`${s}:${a} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}}))),l>0&&(t+=i)),this.createLeadName(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-10,e[0].pos[1]+10),this.createLeadOffAndDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-5,e[0].pos[1]-(e[l].sens||0)/2-15);this.singleWaveDataCopy=e,e=null}drawLoopArrow(e=0){var f,l,d,h,m,C,v,M,L,H,P,A;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect]||null,this.drawHeardBeatLine());let t=0,i=0;if(this.leadModel.add){const y=u.getSens(this.waveConfigs[this.longLeadConfig.leadIdxs[0]].gain,this.gridConfig.cellMg);i=this.loopArrowY.add-(y||0)-this.splitBlockHeight/3.5}else i=20;let s=0,a=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily},n=u.getStepForSpeed(this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,this.waveConfigs[this.heartFight.showIdxPai].sampleRate);let r=0;for(let y=0;y<(this.heartBeatPosition[this.heartFight.showIdxPai]||[]).length;y++){const p=this.heartBeatPosition[this.heartFight.showIdxPai][y];if(r=((p==null?void 0:p.position)||0)-e,!(e>((p==null?void 0:p.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&r>(this.slidingWindowInfo.points||0))&&!(this.leadModel.isSingleMode&&r>(this.slidingWindowInfo.points||0))){if(((p==null?void 0:p.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=r*(n||0)+this.leadHeadConfig.leadHedeWidth-9.5,a=0,(d=this.arrowGroup)==null||d.add(new g.Polygon({name:"arrow_box",shape:{points:[[4+t,0+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((l=(f=this.currentHeardBeat)==null?void 0:f.heardBeat)==null?void 0:l.index)===(p==null?void 0:p.index)?"blue":"#ccc"},onclick:W=>{var b;!this.heartFight.mode||(W.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(S=>S.name==="arrow_box").forEach(S=>{S.id!==W.target.id&&S.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(p,W.target))}})),this.heartFight.heartrate&&(s=((h=this.AssistCtx)==null?void 0:h.measureText(`${(p==null?void 0:p.heartrate)||""}`).width)||0,(m=this.arrowGroup)==null||m.add(new g.Text({cursor:"",style:I({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.heartrate)||""}`},o)})),a+=12),this.heartFight.interval&&(s=((C=this.AssistCtx)==null?void 0:C.measureText(`${(p==null?void 0:p.interval)||""}`).width)||0,(v=this.arrowGroup)==null||v.add(new g.Text({cursor:"",style:I({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.interval)||""}`},o)})),a+=12),this.heartFight.qrstCompany&&(s=((M=this.AssistCtx)==null?void 0:M.measureText(`${(p==null?void 0:p.qrstCompany)||""}`).width)||0,(L=this.arrowGroup)==null||L.add(new g.Text({cursor:"",style:I({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.qrstCompany)||""}`},o)})),a+=12),this.heartFight.telectricalaxis&&(s=((H=this.AssistCtx)==null?void 0:H.measureText(`${(p==null?void 0:p.telectricalaxis)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new g.Text({cursor:"",style:I({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.telectricalaxis)||""}`},o)})))}}(A=this.sceneIns)==null||A.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",g.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,r,f,l,d,h,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(r=this.sceneIns)==null||r.remove(this.heardBeatLineGroup);let t={},i=0,s=this.getRednerPoints(),a=this.getAddRednerPoints(),o;e:for(let C=0;C<s.length;C++){t=((f=this.analyseValues[C])==null?void 0:f[this.currentHeardBeat.heardBeat.index].KeyPosByBeat)||{};for(const v in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(v)&&Object.prototype.hasOwnProperty.call(t,v)){if(i=(t[v]-this.slidingWindowInfo.startInd)*(s[C].step||0),this.isLeadOff(C)||this.isLeadDel(C))continue;if(e>t[v]||!this.leadModel.isContinuous&&t[v]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=s[C],this.leadModel.isContinuous&&C>this.leadModel.line-1))break e;(l=this.heardBeatLineGroup)==null||l.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}e:for(let C=0;C<a.length;C++){t=((d=this.analyseValues[C])==null?void 0:d[this.currentHeardBeat.heardBeat.index].KeyPosByBeat)||{};for(const v in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(v)){if(i=(t[v]-this.slidingWindowInfo.startInd)*(a[C].step||0),this.isLeadOff(this.longLeadConfig.leadIdxs[C])&&this.isLeadDel(this.longLeadConfig.leadIdxs[C]))continue;if(e>t[v])break e;o=a[C],(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}(m=this.sceneIns)==null||m.add(this.heardBeatLineGroup),t=null,s=null,a=null}createHeardBeatLine(e,t){return new g.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}getAddRednerPoints(){const e=[];let t=this.leadHeadConfig.leadHedeWidth,i=0,s=0,a=[],o=0,n=0;for(let r=0;r<this.leadModel.add;r++)s=this.longLeadConfig.leadIdxs[r],this.waveConfigs[s]&&(t=this.waveConfigs[s].addPosX||t,o=u.getStepForSpeed(this.waveConfigs[s].speed,this.gridConfig.cellMg,this.waveConfigs[s].sampleRate),n=u.getSens(this.waveConfigs[s].gain,this.gridConfig.cellMg),i=this.waveConfigs[s].addPosY||(r+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveLists[s]||[],r===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:a.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((f,l)=>this.waveConfigs[s].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?u.getActualY(this.waveConfigs[s].sensitivity,f,n/2):u.getActualY(this.waveConfigs[s].sensitivity,f,n)).map((f,l)=>[l*(o||0),-f]),sens:n,step:o}));return e}createAddWaveFrom(){var i;let e=this.getAddRednerPoints(),t=0;for(let s=0;s<e.length;s++)this.isLeadDel(this.longLeadConfig.leadIdxs[s])||((i=this.addwaveFromGroup)==null||i.add(new g.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[s]+"_"+s,shape:{points:e[s].data.map(([a,o],n)=>isNaN(o)?(t===0&&(t=n-1,t=t<0?0:t),[e[s].data[t][0]+e[s].pos[0],e[s].data[t][1]+e[s].pos[1]]):(t=0,[a+e[s].pos[0],o+e[s].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:a=>{this.onDbClickWaveFrom(a,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[s],e[s].pos[0],e[s].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[s],e[s].pos[0]-5,e[s].pos[1]-(e[s].sens||0)/2-15));this.addWaveDataCopy=e,e=null}getRednerPoints(){let e=0,t=0,i=0,s=[],a=0,o=0,n=this.slidingWindowInfo.startInd||0,r=this.slidingWindowInfo.endInd||0;const f=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(n=r,r=n+(this.slidingWindowInfo.points||0));for(let d=1;d<=this.leadModel.line&&(t=d*this.splitBlockHeight,!(i>(this.waveLists||[]).length-1));d++)e=this.waveConfigs[i].posX||e,t=this.waveConfigs[i].posY||t,a=u.getStepForSpeed(this.waveConfigs[i].speed,this.gridConfig.cellMg,this.waveConfigs[i].sampleRate),o=u.getSens(this.waveConfigs[i].gain,this.gridConfig.cellMg),s=this.waveLists[i]||[],this.waveConfigs[i]&&(d===1&&(this.loopArrowY.rowAndCol=t),f.push({pos:[e,t],startInd:n,endInd:r,sens:o,step:a,data:s.slice(n,r).map((h,m)=>this.waveConfigs[i].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[i].leadName)?u.getActualY(this.waveConfigs[i].sensitivity,h,o/2):u.getActualY(this.waveConfigs[i].sensitivity,h,o)).map((h,m)=>[m*(a||0),-h])}),i++)}return f}createRowAndColWaveFrom(){var s,a;(s=this.rowAndColwaveFromGroup)==null||s.removeAll();let e=this.getRednerPoints(),t=0,i=0;for(let o=0;o<e.length;o++)t=this.waveConfigs[o].leadIdx||0,this.isLeadDel(t)||(a=this.rowAndColwaveFromGroup)==null||a.add(new g.Polyline({cursor:"",name:o+"_"+o,shape:{points:e[o].data.map(([n,r],f)=>isNaN(r)?(i===0&&(i=f-1,i=i<0?0:i),[e[o].data[i][0]+e[o].pos[0],e[o].data[i][1]+e[o].pos[1]]):(i=0,[n+e[o].pos[0],r+e[o].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:n=>{this.onDbClickWaveFrom(n,"rowAndCol")}})),o<this.leadModel.line?(this.createLeadName(t,e[o].pos[0],e[o].pos[1]-15),this.createLeadOffAndDel(t,e[o].pos[0]-5,e[o].pos[1]-(e[o].sens||0)/2-15)):(this.createLeadName(t,e[o].pos[0]+5,e[o].pos[1]-(e[o].sens||0)/2),this.createLeadOffAndDel(t,e[o].pos[0]-5,e[o].pos[1]-(e[o].sens||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var a;(a=this.leadHeadNameGroup)==null||a.add(new g.Text({style:{x:t,y:i,text:this.leadNames[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:F(I({},o),{name:this.leadNames[e],idx:e}),isAdd:s})},onclick:o=>{this.$emit("notiifyLeadName",{event:F(I({},o),{name:this.leadNames[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new g.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const i=Date.now(),s=()=>{const a=e.target.name.split("_");this.activeLeadIdx=+a[0];const o=+a[1];let n=0,r=0,f=0,l=0,d=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],r=this.singleWaveDataCopy[o].startInd,f=u.getPointIdxForPx(n,this.singleWaveDataCopy[o].step||1),l=this.singleWaveDataCopy[o].sens,d=this.singleWaveDataCopy[o].step):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],r=this.waveDataCopy[o].startInd||0,f=u.getPointIdxForPx(n,this.waveDataCopy[o].step||1),l=this.waveDataCopy[o].sens,d=this.waveDataCopy[o].step):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],r=this.addWaveDataCopy[o].startInd||0,f=u.getPointIdxForPx(n,this.addWaveDataCopy[o].step||1),l=this.addWaveDataCopy[o].sens,d=this.addWaveDataCopy[o].step),f+=r,this.$emit("notifyActiveEnlargr",{sens:l,step:d,activeLeadIdx:this.activeLeadIdx,pointIdx:f})};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):this.dbClickWaveFromTime=i}nativeScrollFunc(e){console.log("event",e,e.target.scrollLeft),this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){const t=u.getPointIdxForPx(e,this.publicStep||1);this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",{slidIdxs:t,scrollLeft:e})}scrollWaveFrom(e){var s,a;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,(s=this.rowAndColwaveFromGroup)==null||s.eachChild((o,n)=>{n=n||0,!(!t[n]||!t[n].data)&&o.attr({shape:{points:t[n].data.map(([r,f])=>[r+t[n].pos[0],f+t[n].pos[1]])}})}),(a=this.addwaveFromGroup)==null||a.eachChild((o,n)=>{n=n||0,!(!i[n]||!i[n].data)&&o.attr({shape:{points:i[n].data.map(([r,f])=>[r+i[n].pos[0],f+i[n].pos[1]])}})}),t=null,i=null}scrollRuler(e){var i,s;(i=this.rulerGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.rulerGroup);const t=u.getDataLenTimes(this.leadModel.isSingleMode?0:e,this.leadModel.publicSampleRate||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"waveConfigs",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"waveLists",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"leadNames",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"analyseValues",2);c([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([w.Prop({default:()=>({isShow:!1,gainName:"",speedName:""})})],exports.default.prototype,"rulerConfig",2);c([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([w.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,heartRate:60,speed:0,sens:0})})],exports.default.prototype,"paralleRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,speed:0})})],exports.default.prototype,"magnifierRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1,showIdxPai:0})})],exports.default.prototype,"heartFight",2);c([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeConfig",2);c([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);c([w.Prop({default:()=>0})],exports.default.prototype,"dataTotalTimes",2);c([w.Prop({default:()=>0})],exports.default.prototype,"dataTotalLength",2);c([w.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);c([w.Prop({default:()=>0})],exports.default.prototype,"posStart",2);c([u.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);c([u.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([T.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";var O=Object.defineProperty,B=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var G=(e,t,i)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,I=(e,t)=>{for(var i in t||(t={}))R.call(t,i)&&G(e,i,t[i]);if(D)for(var i of D(t))k.call(t,i)&&G(e,i,t[i]);return e},x=(e,t)=>B(e,N(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("vue"),T=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),F=require("lodash"),u=require("@costy-plus/utils"),g=require("zrender"),z=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function _(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const $=z(j),X=_(g);var V=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,c=(e,t,i,s)=>{for(var a=s>1?void 0:s?Y(t,i):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(a=(s?n(t,i,a):n(a))||a);return s&&a&&V(t,i,a),a};exports.default=class extends $.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(55),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.timersCopy=Object.freeze(0),this.range=Object.freeze(5e3),this.heartBeatPosition=[],this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({maxPoints:0,minPoints:0}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=Object.freeze(-1),this.publicStep=Object.freeze(0),this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0)}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}destroyed(){var e,t,i,s,a,o,n,r,f,l,d;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(a=this.splitLineGroup)==null||a.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(r=this.rulerGroup)==null||r.removeAll(),(f=this.arrowGroup)==null||f.removeAll(),(l=this.heardBeatLineGroup)==null||l.removeAll(),(d=this.sceneIns)==null||d.dispose()}initCreatedConfig(){this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height,this.initConfig()}init(){this.calcHeartBeatPositions(),this.initWaveFormPeer(),this.combinationDrawing(),this.registPostStart()}registPostStart(){this.posStart!==void 0&&this.posStart!==null&&(this.scrollConfig.isShow?this.$nextTick(()=>{var e;this.scrollConfig.isNativeScroll?(e=this.$refs[this.prefixId+"nativeScroll"])==null||e.scrollBy({left:(this.posStart||0)*(this.publicStep||1),top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:(this.posStart||0)*(this.publicStep||1)})}):(this.scrollWaveFrom(this.posStart),this.scrollRuler(this.posStart),this.scrollArrow(this.posStart)))}resetScroll(e=0){this.scrollConfig.isShow?this.$nextTick(()=>{var t;this.scrollConfig.isNativeScroll?(t=this.$refs[this.prefixId+"nativeScroll"])==null||t.scrollBy({left:e,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:e})}):(this.scrollWaveFrom(e),this.scrollRuler(e),this.scrollArrow(e))}combinationDrawing(){this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}calcHeartBeatPositions(){let e=[];for(let t=0;t<this.analyseValues.length;t++){for(let i=1;i<this.analyseValues[t].length;i++)t!==1&&this.analyseValues[t][i].KeyPosByBeat.Rpoint===0||e.push({index:this.analyseValues[t][i].BeatID,position:this.analyseValues[t][i].KeyPosByBeat.Rpoint,heartrate:this.analyseValues[t][i].AnabyBeat.VentricularRate,interval:Math.round(60/this.analyseValues[t][i].AnabyBeat.VentricularRate*1e3),telectricalaxis:this.analyseValues[t][i].AnabyBeat.TAxis===9999?this.range:this.analyseValues[t][i].AnabyBeat.TAxis,qrstCompany:(this.analyseValues[t][i].AnabyBeat.QRS_T===9999?this.range:this.analyseValues[t][i].AnabyBeat.QRS_T)+"\xB0"});this.heartBeatPosition.push(e)}e=null}initSlidingWindowInfo(){const e=this.publicStep||0,t=Math.ceil(this.splitPoint/e);if(this.slidingWindowInfo={points:this.slidingWindowInfo.points<=t||this.leadModel.isSingleMode?t:this.slidingWindowInfo.points,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd<=t||this.leadModel.isSingleMode?t:this.slidingWindowInfo.endInd},this.scrollConfig.isShow&&!this.leadModel.isSingleMode){const s=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),a=this.dataTotalLength*s;this.vuescrollWH.width=this.canvasContainer.width+(a||0)-this.splitPoint}const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points<=i||this.leadModel.isSingleMode?i:this.addSlidingWindowInfo.points,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd<=i||this.leadModel.isSingleMode?i:this.addSlidingWindowInfo.endInd}}calcHighestAndLowestPoint(){const e=F.flattenDeep(this.waveLists);return{maxPoints:F.max(e)||0,minPoints:F.min(e)||0}}isLeadOff(e){return!!this.waveConfigs[e].isLeadOff}isLeadDel(e){return!!this.waveConfigs[e].isLeadDelete}initConfig(){var t;this.rowAndColwaveFromGroup=new g.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new g.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new g.Group({name:"addwaveFrom"}),this.leadHeadGroup=new g.Group({name:"leadHead"}),this.splitLineGroup=new g.Group({name:"splitLine"}),this.leadHeadNameGroup=new g.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new g.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new g.Group({name:"ruler"}),this.arrowGroup=new g.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new g.Group({name:"heardBeatLine"});let e=this.canvasContainer.width;if(this.leadModel.ecgareawidth===1){const i=u.getPrintLengthToPx(((t=this.waveConfigs[0])==null?void 0:t.sampleRate)||0)+this.leadHeadConfig.leadHedeWidth;i<=e&&(e=i)}else if(this.leadModel.isContinuous){const i=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),s=this.dataTotalLength*i;!this.leadModel.isSingleMode&&(s||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(s||0)+this.leadHeadConfig.leadHedeWidth)}this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:this.slidingWindowInfo.points||0,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd||0},this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points||0,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=this.leadNames.map((i,s)=>s)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=this.calcHighestAndLowestPoint(),this.leadModel.isSingleMode?(this.splitBlockHeight=Math.abs(this.highestAndLowestPoint.maxPoints)+Math.abs(this.highestAndLowestPoint.minPoints)+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6)):this.splitBlockHeight=this.drawArea.height/this.totalRows,this.publicStep=u.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),this.rulerStep=(this.publicStep||1)*(this.leadModel.publicSampleRate||1)/(this.gridConfig.cellMg*2+2)}initWaveFormPeer(){var i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById(`${this.prefixId}wave-from-box`);this.sceneIns=X.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById(`${this.prefixId}MXGrid`);this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp)}sceneInsMousemove(e){var t;this.sceneIsMouseDown&&(this.scrollConfig.isNativeScroll?(t=this.$refs[`${this.prefixId}nativeScroll`])==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs[`${this.prefixId}vueScroll`].scrollBy({dx:e.offsetX-this.sceneIsMouseDownX}))}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}sceneInsEventOff(){var e,t,i;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp)}drawLeadHead(){var o,n,r,f,l;(o=this.leadHeadGroup)==null||o.removeAll(),(n=this.sceneIns)==null||n.remove(this.leadHeadGroup);let e="",t=!1,i=0,s=0;for(let d=0;d<=this.leadModel.column;d++){s=d*this.leadModel.line;e:for(let h=1;h<=this.leadModel.line;h++){if(!(this.waveConfigs||[])[h-1+s])break e;!this.waveConfigs[h-1+s].isShowLeadHead||(t=!1,e=(this.leadNames||[])[h-1+s]||"",this.waveConfigs[h-1+s].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=this.waveConfigs[h-1+s].posX?this.waveConfigs[h-1+s].posX-this.leadHeadConfig.leadHedeWidth:0,this.leadHeadConfig.isShowLeadCalibration!==!1&&((r=this.leadHeadGroup)==null||r.add(this.createLeadHead(i,this.waveConfigs[h-1+s].posY||h*this.splitBlockHeight,u.getSens(this.waveConfigs[h-1+s].gain,this.gridConfig.cellMg),t))))}}let a=null;for(let d=0;d<this.leadModel.add;d++)!this.waveConfigs[this.longLeadConfig.leadIdxs[d]]||(a=this.waveConfigs[this.longLeadConfig.leadIdxs[d]],e=this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[d]]],t=!1,a.gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=a.posX?a.posX-this.leadHeadConfig.leadHedeWidth:0,this.leadHeadConfig.isShowLeadCalibration!==!1&&((f=this.leadHeadGroup)==null||f.add(this.createLeadHead(i,a.posY||(d+1+this.leadModel.line)*this.splitBlockHeight,u.getSens(a.gain,this.gridConfig.cellMg),t))));a=null,(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}createLeadHead(e,t,i,s){const a=this.leadHeadConfig.leadHedeWidth/4;return i=s?i/2:i,new g.Polyline({cursor:"",shape:{points:[[0+e,0+t],[a+e,0+t],[a+e,-i+t],[3*a+e,-i+t],[3*a+e,0+t],[4*a+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawColSplitLine(){var o,n,r,f,l;(o=this.splitLineGroup)==null||o.removeAll(),(n=this.sceneIns)==null||n.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/(this.leadModel.column||1);if(this.splitPoint=e,this.leadModel.isSingleMode){const d=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),h=u.getDataLenTimes(Math.ceil(this.splitPoint/(d||1))||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),m=parseInt(`${h/1e3%60}`,10);this.splitPoint=m*(this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0)*(d||0)}let t=0,i=0,s=0,a=0;for(let d=1;d<=this.leadModel.column-1;d++){t=d*e+this.leadHeadConfig.leadHedeWidth,i=d*this.leadModel.line;e:for(let h=1;h<=this.leadModel.line;h++){if(!(this.waveConfigs||[])[h-1+i])break e;if((this.waveConfigs||[])[h-1+i].isShowLeadHead)continue e;if((this.waveConfigs||[])[h-1+i].posX!==void 0&&(t=(this.waveConfigs||[])[h-1+i].posX),s=(this.waveConfigs||[])[h-1+i].leadIdx,s===void 0)break;a=u.getSens((this.waveConfigs||[])[h-1+i].gain,this.gridConfig.cellMg),(this.waveConfigs||[])[h-1+i].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.leadNames[s])?(r=this.splitLineGroup)==null||r.add(this.creatSplitLine(t,((this.waveConfigs||[])[h-1+i].posY||h*this.splitBlockHeight)-(a||0)/2*.5,a,!0)):(f=this.splitLineGroup)==null||f.add(this.creatSplitLine(t,((this.waveConfigs||[])[h-1+i].posY||h*this.splitBlockHeight)-(a||0)*.5,a))}}(l=this.sceneIns)==null||l.add(this.splitLineGroup)}creatSplitLine(e,t,i,s){return new g.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(s?(i||0)/2:i||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawRulerNotes(){var s,a;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new g.Text({cursor:"",style:I({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new g.Text({style:I({text:this.rulerConfig.renderText||`${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(s=this.sceneIns)==null||s.add(i),(a=this.sceneIns)==null||a.add(t)}drawRuler(e=0){var n,r,f;if(this.timersCopy=e,!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,a=t;const o=u.getStepForSpeed(this.rulerConfig.speed,this.gridConfig.cellMg,this.rulerConfig.sampleRate);if(this.leadModel.isContinuous)a=t*5;else if(!this.leadModel.add&&o){const l=u.getPointIdxForPx(this.splitPoint,o),d=u.getDataLenTimes(l,this.rulerConfig.sampleRate||0)/1e3;a=e+d}for(let l=e;l<=a;l=+(l+.1).toFixed(1))l!==e&&(i+=this.rulerStep),l%1===0?(s=this.canvasContainer.height-10,(n=this.rulerGroup)==null||n.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:l+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new g.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(f=this.sceneIns)==null||f.add(this.rulerGroup)}drawWaveFrom(){var e,t,i;this.leadModel.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(e=this.sceneIns)==null||e.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(t=this.sceneIns)==null||t.add(this.rowAndColwaveFromGroup),(i=this.sceneIns)==null||i.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(this.timersCopy),this.drawLoopArrow()}getRednerSinglePoints(){let e=0,t=0;const i=this.waveLists[this.singleModeConfig.defaultSelect]||[];let s=this.slidingWindowInfo.startInd||0,a=this.slidingWindowInfo.endInd||0;const o=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),n=u.getSens(this.waveConfigs[this.singleModeConfig.defaultSelect].gain,this.gridConfig.cellMg),r=[],f=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let d=1;d<=f;d++)t=d*this.splitBlockHeight,d>1&&(t*=.8,s=a,a=s+(this.slidingWindowInfo.points||0)),d===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:s,endInd:a,step:o,sens:n,data:i.slice(s,a).map((h,m)=>this.waveConfigs[this.singleModeConfig.defaultSelect].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName)?u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,h,n/2):u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,h,n)).map((h,m)=>[m*(o||0),-h])})}return r}createSingleWaveFrom(){var n,r,f;(n=this.singleWaveFromGroup)==null||n.removeAll();let e=this.getRednerSinglePoints(),t=u.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0);const i=t;let s=0,a=0,o=0;for(let l=0;l<e.length&&!(e[l].pos[1]>this.drawArea.height+this.bottomAreaHeight);l++)this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx)||(s=parseInt(`${t/1e3/60}`,10),a=parseInt(`${t/1e3%60}`,10),s=a===60?s+=1:s,s=s===0?"00":s<10?`0${s}`:s,a=a===0||a===60?"00":a<10?`0${a}`:a,(r=this.singleWaveFromGroup)==null||r.add(new g.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+l,shape:{points:e[l].data.map(([d,h],m)=>isNaN(h)?(o===0&&(o=m-1,o=o<0?0:o),[e[l].data[o][0]+e[l].pos[0],e[l].data[o][1]+e[l].pos[1]]):(o=0,[d+e[l].pos[0],h+e[l].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:d=>{this.onDbClickWaveFrom(d,"single")}})),t/1e3<this.dataTotalTimes&&((f=this.singleWaveFromGroup)==null||f.add(new g.Text({cursor:"",style:{x:e[l].pos[0],y:e[l].pos[1]-(e[l].sens||0)/2,text:l===0?"00:00 \u5FC3\u7387":`${s}:${a} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}}))),l>0&&(t+=i)),this.createLeadName(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-10,e[0].pos[1]+10),this.createLeadOffAndDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-5,e[0].pos[1]-(e[l].sens||0)/2-15);this.singleWaveDataCopy=e,e=null}drawLoopArrow(e=0){var f,l,d,h,m,C,v,L,H,M,P,A;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect]||null,this.drawHeardBeatLine());let t=0,i=0;if(this.leadModel.add){const S=u.getSens(this.waveConfigs[this.longLeadConfig.leadIdxs[0]].gain,this.gridConfig.cellMg);i=this.loopArrowY.add-(S||0)-this.splitBlockHeight/3.5}else i=20;let s=0,a=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily},n=u.getStepForSpeed(this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,this.waveConfigs[this.heartFight.showIdxPai].sampleRate);let r=0;for(let S=0;S<(this.heartBeatPosition[this.heartFight.showIdxPai]||[]).length;S++){const p=this.heartBeatPosition[this.heartFight.showIdxPai][S];if(r=((p==null?void 0:p.position)||0)-e,!(e>((p==null?void 0:p.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&r>(this.slidingWindowInfo.points||0))&&!(this.leadModel.isSingleMode&&r>(this.slidingWindowInfo.points||0))){if(((p==null?void 0:p.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=r*(n||0)+this.leadHeadConfig.leadHedeWidth-9.5,a=0,(d=this.arrowGroup)==null||d.add(new g.Polygon({name:"arrow_box",shape:{points:[[4+t,0+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((l=(f=this.currentHeardBeat)==null?void 0:f.heardBeat)==null?void 0:l.index)===(p==null?void 0:p.index)?"blue":"#ccc"},onclick:W=>{var b;!this.heartFight.mode||(W.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(y=>y.name==="arrow_box").forEach(y=>{y.id!==W.target.id&&y.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(p,W.target))}})),this.heartFight.heartrate&&(s=((h=this.AssistCtx)==null?void 0:h.measureText(`${(p==null?void 0:p.heartrate)||""}`).width)||0,(m=this.arrowGroup)==null||m.add(new g.Text({cursor:"",style:I({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.heartrate)||""}`},o)})),a+=12),this.heartFight.interval&&(s=((C=this.AssistCtx)==null?void 0:C.measureText(`${(p==null?void 0:p.interval)||""}`).width)||0,(v=this.arrowGroup)==null||v.add(new g.Text({cursor:"",style:I({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.interval)||""}`},o)})),a+=12),this.heartFight.qrstCompany&&(s=((L=this.AssistCtx)==null?void 0:L.measureText(`${(p==null?void 0:p.qrstCompany)||""}`).width)||0,(H=this.arrowGroup)==null||H.add(new g.Text({cursor:"",style:I({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.qrstCompany)||""}`},o)})),a+=12),this.heartFight.telectricalaxis&&(s=((M=this.AssistCtx)==null?void 0:M.measureText(`${(p==null?void 0:p.telectricalaxis)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new g.Text({cursor:"",style:I({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.telectricalaxis)||""}`},o)})))}}(A=this.sceneIns)==null||A.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",g.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,r,f,l,d,h,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(r=this.sceneIns)==null||r.remove(this.heardBeatLineGroup);let t={},i=0,s=this.getRednerPoints(),a=this.getAddRednerPoints(),o;e:for(let C=0;C<s.length;C++){t=((f=this.analyseValues[C])==null?void 0:f[this.currentHeardBeat.heardBeat.index].KeyPosByBeat)||{};for(const v in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(v)&&Object.prototype.hasOwnProperty.call(t,v)){if(i=(t[v]-this.slidingWindowInfo.startInd)*(s[C].step||0),this.isLeadOff(C)||this.isLeadDel(C))continue;if(e>t[v]||!this.leadModel.isContinuous&&t[v]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=s[C],this.leadModel.isContinuous&&C>this.leadModel.line-1))break e;(l=this.heardBeatLineGroup)==null||l.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}e:for(let C=0;C<a.length;C++){t=((d=this.analyseValues[C])==null?void 0:d[this.currentHeardBeat.heardBeat.index].KeyPosByBeat)||{};for(const v in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(v)){if(i=(t[v]-this.slidingWindowInfo.startInd)*(a[C].step||0),this.isLeadOff(this.longLeadConfig.leadIdxs[C])&&this.isLeadDel(this.longLeadConfig.leadIdxs[C]))continue;if(e>t[v])break e;o=a[C],(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}(m=this.sceneIns)==null||m.add(this.heardBeatLineGroup),t=null,s=null,a=null}createHeardBeatLine(e,t){return new g.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}getAddRednerPoints(){const e=[];let t=this.leadHeadConfig.leadHedeWidth,i=0,s=0,a=[],o=0,n=0;for(let r=0;r<this.leadModel.add;r++)s=this.longLeadConfig.leadIdxs[r],this.waveConfigs[s]&&(t=this.waveConfigs[s].addPosX||t,o=u.getStepForSpeed(this.waveConfigs[s].speed,this.gridConfig.cellMg,this.waveConfigs[s].sampleRate),n=u.getSens(this.waveConfigs[s].gain,this.gridConfig.cellMg),i=this.waveConfigs[s].addPosY||(r+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveLists[s]||[],r===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:a.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((f,l)=>this.waveConfigs[s].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?u.getActualY(this.waveConfigs[s].sensitivity,f,n/2):u.getActualY(this.waveConfigs[s].sensitivity,f,n)).map((f,l)=>[l*(o||0),-f]),sens:n,step:o}));return e}createAddWaveFrom(){var i;let e=this.getAddRednerPoints(),t=0;for(let s=0;s<e.length;s++)this.isLeadDel(this.longLeadConfig.leadIdxs[s])||((i=this.addwaveFromGroup)==null||i.add(new g.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[s]+"_"+s,shape:{points:e[s].data.map(([a,o],n)=>isNaN(o)?(t===0&&(t=n-1,t=t<0?0:t),[e[s].data[t][0]+e[s].pos[0],e[s].data[t][1]+e[s].pos[1]]):(t=0,[a+e[s].pos[0],o+e[s].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:a=>{this.onDbClickWaveFrom(a,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[s],e[s].pos[0],e[s].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[s],e[s].pos[0]-5,e[s].pos[1]-(e[s].sens||0)/2-15));this.addWaveDataCopy=e,e=null}getRednerPoints(){let e=0,t=0,i=0,s=[],a=0,o=0,n=this.slidingWindowInfo.startInd||0,r=this.slidingWindowInfo.endInd||0;const f=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(n=r,r=n+(this.slidingWindowInfo.points||0));for(let d=1;d<=this.leadModel.line&&(t=d*this.splitBlockHeight,!(i>(this.waveLists||[]).length-1));d++)e=this.waveConfigs[i].posX||e,t=this.waveConfigs[i].posY||t,a=u.getStepForSpeed(this.waveConfigs[i].speed,this.gridConfig.cellMg,this.waveConfigs[i].sampleRate),o=u.getSens(this.waveConfigs[i].gain,this.gridConfig.cellMg),s=this.waveLists[i]||[],this.waveConfigs[i]&&(d===1&&(this.loopArrowY.rowAndCol=t),f.push({pos:[e,t],startInd:n,endInd:r,sens:o,step:a,data:s.slice(n,r).map((h,m)=>this.waveConfigs[i].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[i].leadName)?u.getActualY(this.waveConfigs[i].sensitivity,h,o/2):u.getActualY(this.waveConfigs[i].sensitivity,h,o)).map((h,m)=>[m*(a||0),-h])}),i++)}return f}createRowAndColWaveFrom(){var s,a;(s=this.rowAndColwaveFromGroup)==null||s.removeAll();let e=this.getRednerPoints(),t=0,i=0;for(let o=0;o<e.length;o++)t=this.waveConfigs[o].leadIdx||0,this.isLeadDel(t)||(a=this.rowAndColwaveFromGroup)==null||a.add(new g.Polyline({cursor:"",name:o+"_"+o,shape:{points:e[o].data.map(([n,r],f)=>isNaN(r)?(i===0&&(i=f-1,i=i<0?0:i),[e[o].data[i][0]+e[o].pos[0],e[o].data[i][1]+e[o].pos[1]]):(i=0,[n+e[o].pos[0],r+e[o].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:n=>{this.onDbClickWaveFrom(n,"rowAndCol")}})),o<this.leadModel.line?(this.createLeadName(t,e[o].pos[0],e[o].pos[1]-15),this.createLeadOffAndDel(t,e[o].pos[0]-5,e[o].pos[1]-(e[o].sens||0)/2-15)):(this.createLeadName(t,e[o].pos[0]+5,e[o].pos[1]-(e[o].sens||0)/2),this.createLeadOffAndDel(t,e[o].pos[0]-5,e[o].pos[1]-(e[o].sens||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var o;let a=t;this.leadHeadConfig.isShowLeadCalibration===!1&&(a=t-this.leadHeadConfig.leadHedeWidth+5),(o=this.leadHeadNameGroup)==null||o.add(new g.Text({style:{x:a,y:i,text:this.leadNames[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:n=>{n.event.preventDefault(),this.$emit("notiifyLeadName",{event:x(I({},n),{name:this.leadNames[e],idx:e}),isAdd:s})},onclick:n=>{this.$emit("notiifyLeadName",{event:x(I({},n),{name:this.leadNames[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new g.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const i=Date.now(),s=()=>{const a=e.target.name.split("_");this.activeLeadIdx=+a[0];const o=+a[1];let n=0,r=0,f=0,l=0,d=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],r=this.singleWaveDataCopy[o].startInd,f=u.getPointIdxForPx(n,this.singleWaveDataCopy[o].step||1),l=this.singleWaveDataCopy[o].sens,d=this.singleWaveDataCopy[o].step):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],r=this.waveDataCopy[o].startInd||0,f=u.getPointIdxForPx(n,this.waveDataCopy[o].step||1),l=this.waveDataCopy[o].sens,d=this.waveDataCopy[o].step):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],r=this.addWaveDataCopy[o].startInd||0,f=u.getPointIdxForPx(n,this.addWaveDataCopy[o].step||1),l=this.addWaveDataCopy[o].sens,d=this.addWaveDataCopy[o].step),f+=r,this.$emit("notifyActiveEnlargr",{sens:l,step:d,activeLeadIdx:this.activeLeadIdx,pointIdx:f})};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):this.dbClickWaveFromTime=i}nativeScrollFunc(e){console.log("event",e,e.target.scrollLeft),this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){const t=u.getPointIdxForPx(e,this.publicStep||1);this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",{slidIdxs:t,scrollLeft:e})}scrollWaveFrom(e){var s,a;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,(s=this.rowAndColwaveFromGroup)==null||s.eachChild((o,n)=>{n=n||0,!(!t[n]||!t[n].data)&&o.attr({shape:{points:t[n].data.map(([r,f])=>[r+t[n].pos[0],f+t[n].pos[1]])}})}),(a=this.addwaveFromGroup)==null||a.eachChild((o,n)=>{n=n||0,!(!i[n]||!i[n].data)&&o.attr({shape:{points:i[n].data.map(([r,f])=>[r+i[n].pos[0],f+i[n].pos[1]])}})}),t=null,i=null}scrollRuler(e){var i,s;(i=this.rulerGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.rulerGroup);const t=u.getDataLenTimes(this.leadModel.isSingleMode?0:e,this.leadModel.publicSampleRate||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"waveConfigs",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"waveLists",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"leadNames",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"analyseValues",2);c([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([w.Prop({default:()=>({isShow:!1,gainName:"",speedName:""})})],exports.default.prototype,"rulerConfig",2);c([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([w.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,heartRate:60,speed:0,sens:0})})],exports.default.prototype,"paralleRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,speed:0})})],exports.default.prototype,"magnifierRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1,showIdxPai:0})})],exports.default.prototype,"heartFight",2);c([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeConfig",2);c([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);c([w.Prop({default:()=>0})],exports.default.prototype,"dataTotalTimes",2);c([w.Prop({default:()=>0})],exports.default.prototype,"dataTotalLength",2);c([w.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);c([w.Prop({default:()=>0})],exports.default.prototype,"posStart",2);c([u.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);c([u.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([T.default({name:"Methods"})],exports.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("vue"),g=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const i=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),f=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),d=require("@costy-plus/utils"),u=require("zrender"),y=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},P=y(v);var I=Object.defineProperty,w=Object.getOwnPropertyDescriptor,s=(e,t,a,r)=>{for(var o=r>1?void 0:r?w(t,a):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(o=(r?l(t,a,o):l(o))||o);return r&&o&&I(t,a,o),o};exports.default=class extends P.default{constructor(){super(...arguments),this.AnalysisMode=d.AnalysisMode,this.AnalyseParameterTable=d.AnalyseParameterTable,this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(a=>a.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,a)=>{var r;return this.activeLeadIdx===a&&((r=this.leadNameIns)==null||r.attr({style:{text:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t]}}),this.leadNameActive={name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}),{name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width,height:this.height-40-50}}destroyed(){var e,t,a,r,o,n,l,h,p,c,m;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(a=this.M1)==null||a.removeAll(),(r=this.M2)==null||r.removeAll(),(o=this.P1)==null||o.removeAll(),(n=this.P2)==null||n.removeAll(),(l=this.R1)==null||l.removeAll(),(h=this.R2)==null||h.removeAll(),(p=this.T1)==null||p.removeAll(),(c=this.T2)==null||c.removeAll();try{(m=this.sceneIns)==null||m.dispose()}catch(S){}}resetDefaultValue(){}created(){this.resetDefaultValue(),this.currentGainIdx=this.enlargeGains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.enlargeSpeeds.findIndex(e=>e.value===this.speedValue),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){}selectLeadName(e){var t;console.log("params",e),this.$emit("notifyChangeLeadName",e),this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var r,o;const t=this.containerWH.height/2,a=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((r=this.sceneIns)==null||r.remove(this.leadHeadIns)),this.leadHeadIns=new u.Polyline({cursor:"",shape:{points:[[0+0,0+t],[a+0,0+t],[a+0,-this.currentSens+t],[3*a+0,-this.currentSens+t],[3*a+0,0+t],[4*a+0,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(o=this.sceneIns)==null||o.add(this.leadHeadIns)}createLeadName(){var e;this.leadNameIns=new u.Text({style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(e=this.sceneIns)==null||e.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new u.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new u.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead()}drawAllLead(){var t,a;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new u.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let r=0;r<this.leadNames.length-1;r++){const{beatData:o,startPos:n}=this.getWaveFrom(this.leadNames[r].val);this.startPos=n,this.waveFromLenPX=o.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new u.Polyline({cursor:"",name:`${r}`,shape:{points:o.map((l,h)=>[h*this.currentStep+this.drawWaveFromX,-l+e])},style:{stroke:this.leadColors[r]||this.leadColors[r%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(a=this.sceneIns)==null||a.add(this.waveFromGroup)}drawSingleLead(){var o,n,l;this.waveFromGroup&&((o=this.sceneIns)==null||o.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=a;const r=this.containerWH.height/2;(n=this.waveFromIns)==null||n.attr({shape:{points:e.map((h,p)=>[p*this.currentStep+this.drawWaveFromX,-h+r])}}),(l=this.waveFromIns)==null||l.show()}getWaveFrom(e){e=e!==void 0?e:this.leadNameActive.val;let t=[];return this.enlargeWaveMode===d.AnalysisMode.CompoundWave?t=(this.complexData[e||0]||[]).slice(this.DisplayLeadInfo.startPos,this.DisplayLeadInfo.endPos+1):t=(this.normalData[e||0]||[]).slice(this.DisplayLeadInfo.startPos,this.DisplayLeadInfo.endPos+1),{originData:t,beatData:t.map(a=>d.getActualY(this.sensitivity,a,this.currentSens)),startPos:this.DisplayLeadInfo.startPos}}toggleGain(e){if(e){this.currentGainIdx<this.enlargeGains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender());return}this.currentGainIdx>0&&this.currentGainIdx<=this.enlargeGains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender())}toggleSpeeds(e){const t=()=>{const a=d.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification};if(e){this.currentSpeedIdx<this.enlargeSpeeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.enlargeSpeeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1)):this.dbClickTime=e}};s([i.Prop({default:()=>({startPos:200,endPos:899})})],exports.default.prototype,"DisplayLeadInfo",2);s([i.Prop({default:()=>d.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);s([i.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);s([i.Prop({default:()=>""})],exports.default.prototype,"className",2);s([i.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);s([i.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);s([i.Prop({required:!0})],exports.default.prototype,"gridConfig",2);s([i.Prop({required:!0})],exports.default.prototype,"speedValue",2);s([i.Prop({default:1})],exports.default.prototype,"sens",2);s([i.Prop({default:1})],exports.default.prototype,"step",2);s([i.Prop({required:!0})],exports.default.prototype,"sampleRate",2);s([i.Prop({required:!0})],exports.default.prototype,"sensitivity",2);s([i.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);s([i.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);s([i.Prop({default:null})],exports.default.prototype,"outLeadNames",2);s([i.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);s([i.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);s([i.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);s([i.Prop({default:5})],exports.default.prototype,"magnification",2);s([i.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);s([i.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);s([i.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);s([i.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);s([i.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);s([i.Prop({default:d.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);s([i.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);s([i.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);s([f.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);s([f.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);exports.default=s([g.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("vue"),g=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const s=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),m=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),d=require("@costy-plus/utils"),u=require("zrender"),y=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},P=y(v);var w=Object.defineProperty,S=Object.getOwnPropertyDescriptor,a=(e,t,r,i)=>{for(var o=i>1?void 0:i?S(t,r):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(o=(i?l(t,r,o):l(o))||o);return i&&o&&w(t,r,o),o};exports.default=class extends P.default{constructor(){super(...arguments),this.AnalysisMode=d.AnalysisMode,this.AnalyseParameterTable=d.AnalyseParameterTable,this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(r=>r.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,r)=>{var i;return this.activeLeadIdx===r&&((i=this.leadNameIns)==null||i.attr({style:{text:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t]}}),this.leadNameActive={name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:r}),{name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:r}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width,height:this.height-40-50}}destroyed(){var e,t,r,i,o,n,l,h,p,c,f;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(r=this.M1)==null||r.removeAll(),(i=this.M2)==null||i.removeAll(),(o=this.P1)==null||o.removeAll(),(n=this.P2)==null||n.removeAll(),(l=this.R1)==null||l.removeAll(),(h=this.R2)==null||h.removeAll(),(p=this.T1)==null||p.removeAll(),(c=this.T2)==null||c.removeAll();try{(f=this.sceneIns)==null||f.dispose()}catch(I){}}resetDefaultValue(){}created(){this.resetDefaultValue(),this.currentGainIdx=this.enlargeGains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.enlargeSpeeds.findIndex(e=>e.value===this.speedValue),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){}selectLeadName(e){var t;console.log("params",e),this.$emit("notifyChangeLeadName",e),this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var e,t;if(this.leadHeadConfig.isShowLeadCalibration!==!1){const i=this.containerWH.height/2,o=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((e=this.sceneIns)==null||e.remove(this.leadHeadIns)),this.leadHeadIns=new u.Polyline({cursor:"",shape:{points:[[0+0,0+i],[o+0,0+i],[o+0,-this.currentSens+i],[3*o+0,-this.currentSens+i],[3*o+0,0+i],[4*o+0,0+i]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(t=this.sceneIns)==null||t.add(this.leadHeadIns)}}createLeadName(){var t;let e=this.leadHeadConfig.leadHedeWidth;this.leadHeadConfig.isShowLeadCalibration===!1&&(e=5),this.leadNameIns=new u.Text({style:{x:e,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new u.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new u.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead()}drawAllLead(){var t,r;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new u.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let i=0;i<this.leadNames.length-1;i++){const{beatData:o,startPos:n}=this.getWaveFrom(this.leadNames[i].val);this.startPos=n,this.waveFromLenPX=o.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new u.Polyline({cursor:"",name:`${i}`,shape:{points:o.map((l,h)=>[h*this.currentStep+this.drawWaveFromX,-l+e])},style:{stroke:this.leadColors[i]||this.leadColors[i%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(r=this.sceneIns)==null||r.add(this.waveFromGroup)}drawSingleLead(){var o,n,l;this.waveFromGroup&&((o=this.sceneIns)==null||o.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:r}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=r;const i=this.containerWH.height/2;(n=this.waveFromIns)==null||n.attr({shape:{points:e.map((h,p)=>[p*this.currentStep+this.drawWaveFromX,-h+i])}}),(l=this.waveFromIns)==null||l.show()}getWaveFrom(e){e=e!==void 0?e:this.leadNameActive.val;let t=[];return this.enlargeWaveMode===d.AnalysisMode.CompoundWave?t=(this.complexData[e||0]||[]).slice(this.DisplayLeadInfo.startPos,this.DisplayLeadInfo.endPos+1):t=(this.normalData[e||0]||[]).slice(this.DisplayLeadInfo.startPos,this.DisplayLeadInfo.endPos+1),{originData:t,beatData:t.map(r=>d.getActualY(this.sensitivity,r,this.currentSens)),startPos:this.DisplayLeadInfo.startPos}}toggleGain(e){if(e){this.currentGainIdx<this.enlargeGains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender());return}this.currentGainIdx>0&&this.currentGainIdx<=this.enlargeGains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender())}toggleSpeeds(e){const t=()=>{const r=d.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=r*this.magnification};if(e){this.currentSpeedIdx<this.enlargeSpeeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.enlargeSpeeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1)):this.dbClickTime=e}};a([s.Prop({default:()=>({startPos:200,endPos:899})})],exports.default.prototype,"DisplayLeadInfo",2);a([s.Prop({default:()=>d.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);a([s.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);a([s.Prop({default:()=>""})],exports.default.prototype,"className",2);a([s.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);a([s.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);a([s.Prop({required:!0})],exports.default.prototype,"gridConfig",2);a([s.Prop({required:!0})],exports.default.prototype,"speedValue",2);a([s.Prop({default:1})],exports.default.prototype,"sens",2);a([s.Prop({default:1})],exports.default.prototype,"step",2);a([s.Prop({required:!0})],exports.default.prototype,"sampleRate",2);a([s.Prop({required:!0})],exports.default.prototype,"sensitivity",2);a([s.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);a([s.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);a([s.Prop({default:null})],exports.default.prototype,"outLeadNames",2);a([s.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);a([s.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);a([s.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);a([s.Prop({default:5})],exports.default.prototype,"magnification",2);a([s.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);a([s.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);a([s.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);a([s.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);a([s.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);a([s.Prop({default:d.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);a([s.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);a([s.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);a([m.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);a([m.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);exports.default=a([g.default({name:"Methods"})],exports.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("vue"),m=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const i=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),u=require("@costy-plus/utils"),h=require("zrender"),g=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},y=g(v);var W=Object.defineProperty,D=Object.getOwnPropertyDescriptor,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const v=require("vue"),m=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const i=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),u=require("@costy-plus/utils"),h=require("zrender"),g=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},y=g(v);var W=Object.defineProperty,D=Object.getOwnPropertyDescriptor,s=(e,a,o,d)=>{for(var r=d>1?void 0:d?D(a,o):a,n=e.length-1,l;n>=0;n--)(l=e[n])&&(r=(d?l(a,o,r):l(r))||r);return d&&r&&W(a,o,r),r};exports.default=class extends y.default{constructor(){super(...arguments),this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.drawPoints=Object.freeze(0),this.magnifierWave=Object.freeze(null),this.centerX=Object.freeze(0),this.fuzzyDistance=Object.freeze(15),this.isLeft=!0,this.currentLead=null}get containerWH(){return{width:this.width,height:this.height-2}}destroyed(){var e;(e=this.sceneIns)==null||e.dispose()}initConfig(){this.centerX=this.containerWH.width/2}waveBoxAddToEventListener(){var e,a;(e=this.magnifierWave)==null||e.addEventListener("mousemove",this.waveBoxMousemove),(a=this.magnifierWave)==null||a.addEventListener("touchmove",this.waveBoxMousemove),this.$once("hook:beforeDestroy",()=>{var o,d;(o=this.magnifierWave)==null||o.removeEventListener("mousemove",this.waveBoxMousemove),(d=this.magnifierWave)==null||d.removeEventListener("touchmove",this.waveBoxMousemove)})}waveBoxMousemove(e){e.preventDefault(),e.stopPropagation(),e.offsetX<this.centerX||e.layerX<this.centerX?this.isLeft=!1:this.isLeft=!0,this.findTheCurrentLead(e.offsetX||e.layerX,e.offsetY||e.layerY),this.createLeadHead()}createLeadHead(){var d,r,n,l;const a=this.containerWH.height/2,o=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadConfig.isShowLeadCalibration!==!1&&(this.leadHeadIns&&((d=this.sceneIns)==null||d.remove(this.leadHeadIns)),this.leadHeadIns=new h.Polyline({cursor:"",name:"lead_head",shape:{points:[[0+0,0+a],[o+0,0+a],[o+0,-(((r=this.currentLead)==null?void 0:r.sens)||this.sens)*this.magnification+a],[3*o+0,-(((n=this.currentLead)==null?void 0:n.sens)||this.sens)*this.magnification+a],[3*o+0,0+a],[4*o+0,0+a]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(l=this.sceneIns)==null||l.add(this.leadHeadIns))}createLeadName(){var a;let e=this.leadHeadConfig.leadHedeWidth;this.leadHeadConfig.isShowLeadCalibration===!1&&(e=5),this.leadNameIns=new h.Text({style:{x:e,y:this.containerWH.height/2-this.leadConfig.fontSize,text:"",fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(a=this.sceneIns)==null||a.add(this.leadNameIns)}createWaveFrom(){var e;this.waveFromIns=new h.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}findTheCurrentLead(e,a){var r,n,l;let o=0;this.currentLead=null;let d="";if(!this.currentLead&&this.singleWaveData.length){o=this.singleWaveData[0].data[this.singleWaveData[0].data.length-1][0]+this.singleWaveData[0].pos[0];for(let t=0;t<this.singleWaveData.length;t++)if(!(a<this.singleWaveData[t].pos[1]-(this.singleWaveData[t].sens||this.sens)-this.fuzzyDistance||a>this.singleWaveData[t].pos[1]+this.fuzzyDistance)&&!(e<this.leadHeadConfig.leadHedeWidth||e>o)){d=this.LeadNameTextsPorps[this.heartFight.defaultSelect],this.currentLead=this.singleWaveData[t];break}}if(!this.currentLead&&this.addWaveData.length){o=this.addWaveData[0].data[this.addWaveData[0].data.length-1][0]+this.addWaveData[0].pos[0];for(let t=0;t<this.addWaveData.length;t++)if(!(a<this.addWaveData[t].pos[1]-(this.addWaveData[t].sens||this.sens)-this.fuzzyDistance||a>this.addWaveData[t].pos[1]+this.fuzzyDistance)&&!(e<this.leadHeadConfig.leadHedeWidth||e>o)){d=this.leadNames?this.leadNames[this.longLeadConfig[t]]:this.LeadNameTextsPorps[this.longLeadConfig[t]],this.currentLead=this.addWaveData[t];break}}if(!this.currentLead&&this.waveData.length){o=this.waveData[0].data[this.waveData[0].data.length-1][0]+this.waveData[0].pos[0]-this.leadHeadConfig.leadHedeWidth;for(let t=0;t<this.waveData.length;t++)if(!(a<this.waveData[t].pos[1]-(this.waveData[t].sens||this.sens)-this.fuzzyDistance||a>this.waveData[t].pos[1]+this.fuzzyDistance)&&!(e<this.waveData[t].pos[0]||e>this.waveData[t].pos[0]+o)){d=this.leadNames?this.leadNames[this.normalLeadNames[t]]:this.LeadNameTextsPorps[this.normalLeadNames[t]]||"",this.currentLead=this.waveData[t];break}}if(d!==((r=this.leadNameIns)==null?void 0:r.style.text)&&d!==""&&((n=this.leadNameIns)==null||n.attr({style:{text:d}})),this.currentLead){const t=this.containerWH.height/2,f=u.getPointIdxForPx(e-this.currentLead.pos[0],this.currentLead.step||this.step);this.drawPoints=u.getPointIdxForPx(this.containerWH.width-this.leadHeadConfig.leadHedeWidth,(this.currentLead.step||this.step)*this.magnification),(l=this.waveFromIns)==null||l.attr({shape:{points:this.currentLead.data.slice(f,f+this.drawPoints).map(([L,p],c)=>[c*(this.currentLead.step||this.step)*this.magnification+this.leadHeadConfig.leadHedeWidth,p*this.magnification+t])}})}}};s([i.Prop({default:()=>u.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);s([i.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);s([i.Prop({default:()=>""})],exports.default.prototype,"className",2);s([i.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);s([i.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);s([i.Prop({required:!0})],exports.default.prototype,"gridConfig",2);s([i.Prop({default:()=>[1,6,10]})],exports.default.prototype,"longLeadConfig",2);s([i.Prop({default:0})],exports.default.prototype,"splitBlockHeight",2);s([i.Prop({default:0})],exports.default.prototype,"splitPoint",2);s([i.Prop({required:!0})],exports.default.prototype,"speedValue",2);s([i.Prop({default:1})],exports.default.prototype,"sens",2);s([i.Prop({default:1})],exports.default.prototype,"step",2);s([i.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);s([i.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);s([i.Prop({default:()=>[]})],exports.default.prototype,"waveData",2);s([i.Prop({default:()=>[]})],exports.default.prototype,"addWaveData",2);s([i.Prop({default:()=>[]})],exports.default.prototype,"singleWaveData",2);s([i.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);s([i.Prop({required:!0})],exports.default.prototype,"normalLeadNames",2);s([i.Prop({default:null})],exports.default.prototype,"leadNames",2);s([i.Prop({default:5})],exports.default.prototype,"magnification",2);exports.default=s([m.default({name:"Methods"})],exports.default);
|