costy-plus 1.0.53-0 → 1.0.54-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.
|
@@ -19,9 +19,9 @@ import { throttling as $, getStepForSpeed as W, getPrintLengthToPx as Z, getSens
|
|
|
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) => {
|
|
22
|
-
for (var
|
|
23
|
-
(n = e[
|
|
24
|
-
return s &&
|
|
22
|
+
for (var a = s > 1 ? void 0 : s ? se(t, i) : t, o = e.length - 1, n; o >= 0; o--)
|
|
23
|
+
(n = e[o]) && (a = (s ? n(t, i, a) : n(a)) || a);
|
|
24
|
+
return s && a && ie(t, i, a), a;
|
|
25
25
|
};
|
|
26
26
|
let g = class extends E {
|
|
27
27
|
constructor() {
|
|
@@ -50,8 +50,8 @@ let g = class extends E {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
destroyed() {
|
|
53
|
-
var e, t, i, s,
|
|
54
|
-
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(), (
|
|
53
|
+
var e, t, i, s, a, o, n, d, l, f, r;
|
|
54
|
+
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(), (d = this.rulerGroup) == null || d.removeAll(), (l = this.arrowGroup) == null || l.removeAll(), (f = this.heardBeatLineGroup) == null || f.removeAll(), (r = this.sceneIns) == null || r.dispose();
|
|
55
55
|
}
|
|
56
56
|
initCreatedConfig() {
|
|
57
57
|
this.vuescrollWH.width = this.width, this.vuescrollWH.height = this.height, this.initConfig();
|
|
@@ -94,18 +94,18 @@ let g = class extends E {
|
|
|
94
94
|
initSlidingWindowInfo() {
|
|
95
95
|
const e = this.publicStep || 0, t = Math.ceil(this.splitPoint / e);
|
|
96
96
|
if (this.slidingWindowInfo = {
|
|
97
|
-
points: t,
|
|
98
|
-
startInd: 0,
|
|
99
|
-
endInd: t
|
|
97
|
+
points: this.slidingWindowInfo.points || t,
|
|
98
|
+
startInd: this.slidingWindowInfo.startInd || 0,
|
|
99
|
+
endInd: this.slidingWindowInfo.endInd || t
|
|
100
100
|
}, this.scrollConfig.isShow && !this.leadModel.isSingleMode) {
|
|
101
|
-
const s = W(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate),
|
|
102
|
-
this.vuescrollWH.width = this.canvasContainer.width + (
|
|
101
|
+
const s = W(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), a = this.dataTotalLength * s;
|
|
102
|
+
this.vuescrollWH.width = this.canvasContainer.width + (a || 0) - this.splitPoint;
|
|
103
103
|
}
|
|
104
104
|
const i = Math.ceil((this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / e);
|
|
105
105
|
this.addSlidingWindowInfo = {
|
|
106
|
-
points: i,
|
|
107
|
-
startInd: 0,
|
|
108
|
-
endInd: i
|
|
106
|
+
points: this.addSlidingWindowInfo.points || i,
|
|
107
|
+
startInd: this.addSlidingWindowInfo.startInd || 0,
|
|
108
|
+
endInd: this.addSlidingWindowInfo.endInd || i
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
calcHighestAndLowestPoint() {
|
|
@@ -156,13 +156,13 @@ let g = class extends E {
|
|
|
156
156
|
width: e,
|
|
157
157
|
height: this.canvasContainer.height - this.bottomAreaHeight
|
|
158
158
|
}, this.slidingWindowInfo = {
|
|
159
|
-
points: 0,
|
|
160
|
-
startInd: 0,
|
|
161
|
-
endInd: 0
|
|
159
|
+
points: this.slidingWindowInfo.points || 0,
|
|
160
|
+
startInd: this.slidingWindowInfo.startInd || 0,
|
|
161
|
+
endInd: this.slidingWindowInfo.endInd || 0
|
|
162
162
|
}, this.addSlidingWindowInfo = {
|
|
163
|
-
points: 0,
|
|
164
|
-
startInd: 0,
|
|
165
|
-
endInd: 0
|
|
163
|
+
points: this.addSlidingWindowInfo.points || 0,
|
|
164
|
+
startInd: this.addSlidingWindowInfo.startInd || 0,
|
|
165
|
+
endInd: this.addSlidingWindowInfo.endInd || 0
|
|
166
166
|
}, this.loopArrowY = {
|
|
167
167
|
add: 0,
|
|
168
168
|
rowAndCol: 0
|
|
@@ -203,8 +203,8 @@ let g = class extends E {
|
|
|
203
203
|
(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);
|
|
204
204
|
}
|
|
205
205
|
drawLeadHead() {
|
|
206
|
-
var
|
|
207
|
-
(
|
|
206
|
+
var o, n, d, l, f;
|
|
207
|
+
(o = this.leadHeadGroup) == null || o.removeAll(), (n = this.sceneIns) == null || n.remove(this.leadHeadGroup), console.log("this.waveConfigs", this.waveConfigs);
|
|
208
208
|
let e = "", t = !1, i = 0, s = 0;
|
|
209
209
|
for (let r = 0; r <= this.leadModel.column; r++) {
|
|
210
210
|
s = r * this.leadModel.line;
|
|
@@ -222,20 +222,20 @@ let g = class extends E {
|
|
|
222
222
|
));
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
let
|
|
225
|
+
let a = null;
|
|
226
226
|
for (let r = 0; r < this.leadModel.add; r++)
|
|
227
|
-
!this.waveConfigs[this.longLeadConfig.leadIdxs[r]] || (
|
|
227
|
+
!this.waveConfigs[this.longLeadConfig.leadIdxs[r]] || (a = this.waveConfigs[this.longLeadConfig.leadIdxs[r]], e = this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[r]]], t = !1, a.gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(e) && (t = !0), i = a.posX ? a.posX - this.leadHeadConfig.leadHedeWidth : 0, (l = this.leadHeadGroup) == null || l.add(
|
|
228
228
|
this.createLeadHead(
|
|
229
229
|
i,
|
|
230
|
-
|
|
231
|
-
S(
|
|
230
|
+
a.posY || (r + 1 + this.leadModel.line) * this.splitBlockHeight,
|
|
231
|
+
S(a.gain, this.gridConfig.cellMg),
|
|
232
232
|
t
|
|
233
233
|
)
|
|
234
234
|
));
|
|
235
|
-
|
|
235
|
+
a = null, (f = this.sceneIns) == null || f.add(this.leadHeadGroup);
|
|
236
236
|
}
|
|
237
237
|
createLeadHead(e, t, i, s) {
|
|
238
|
-
const
|
|
238
|
+
const a = this.leadHeadConfig.leadHedeWidth / 4;
|
|
239
239
|
return i = s ? i / 2 : i, new x({
|
|
240
240
|
cursor: "",
|
|
241
241
|
shape: {
|
|
@@ -245,23 +245,23 @@ let g = class extends E {
|
|
|
245
245
|
0 + t
|
|
246
246
|
],
|
|
247
247
|
[
|
|
248
|
-
|
|
248
|
+
a + e,
|
|
249
249
|
0 + t
|
|
250
250
|
],
|
|
251
251
|
[
|
|
252
|
-
|
|
252
|
+
a + e,
|
|
253
253
|
-i + t
|
|
254
254
|
],
|
|
255
255
|
[
|
|
256
|
-
3 *
|
|
256
|
+
3 * a + e,
|
|
257
257
|
-i + t
|
|
258
258
|
],
|
|
259
259
|
[
|
|
260
|
-
3 *
|
|
260
|
+
3 * a + e,
|
|
261
261
|
0 + t
|
|
262
262
|
],
|
|
263
263
|
[
|
|
264
|
-
4 *
|
|
264
|
+
4 * a + e,
|
|
265
265
|
0 + t
|
|
266
266
|
]
|
|
267
267
|
]
|
|
@@ -273,8 +273,8 @@ let g = class extends E {
|
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
drawColSplitLine() {
|
|
276
|
-
var
|
|
277
|
-
(
|
|
276
|
+
var o, n, d, l, f;
|
|
277
|
+
(o = this.splitLineGroup) == null || o.removeAll(), (n = this.sceneIns) == null || n.remove(this.splitLineGroup);
|
|
278
278
|
const e = (this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / (this.leadModel.column || 1);
|
|
279
279
|
if (this.splitPoint = e, this.leadModel.isSingleMode) {
|
|
280
280
|
const r = W(
|
|
@@ -287,7 +287,7 @@ let g = class extends E {
|
|
|
287
287
|
), C = parseInt(`${h / 1e3 % 60}`, 10);
|
|
288
288
|
this.splitPoint = C * (this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0) * (r || 0);
|
|
289
289
|
}
|
|
290
|
-
let t = 0, i = 0, s = 0,
|
|
290
|
+
let t = 0, i = 0, s = 0, a = 0;
|
|
291
291
|
for (let r = 1; r <= this.leadModel.column - 1; r++) {
|
|
292
292
|
t = r * e + this.leadHeadConfig.leadHedeWidth, i = r * this.leadModel.line;
|
|
293
293
|
e:
|
|
@@ -298,18 +298,18 @@ let g = class extends E {
|
|
|
298
298
|
continue e;
|
|
299
299
|
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)
|
|
300
300
|
break;
|
|
301
|
-
|
|
301
|
+
a = S((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]) ? (d = this.splitLineGroup) == null || d.add(
|
|
302
302
|
this.creatSplitLine(
|
|
303
303
|
t,
|
|
304
|
-
((this.waveConfigs || [])[h - 1 + i].posY || h * this.splitBlockHeight) - (
|
|
305
|
-
|
|
304
|
+
((this.waveConfigs || [])[h - 1 + i].posY || h * this.splitBlockHeight) - (a || 0) / 2 * 0.5,
|
|
305
|
+
a,
|
|
306
306
|
!0
|
|
307
307
|
)
|
|
308
308
|
) : (l = this.splitLineGroup) == null || l.add(
|
|
309
309
|
this.creatSplitLine(
|
|
310
310
|
t,
|
|
311
|
-
((this.waveConfigs || [])[h - 1 + i].posY || h * this.splitBlockHeight) - (
|
|
312
|
-
|
|
311
|
+
((this.waveConfigs || [])[h - 1 + i].posY || h * this.splitBlockHeight) - (a || 0) * 0.5,
|
|
312
|
+
a
|
|
313
313
|
)
|
|
314
314
|
);
|
|
315
315
|
}
|
|
@@ -332,7 +332,7 @@ let g = class extends E {
|
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
334
|
drawRulerNotes() {
|
|
335
|
-
var s,
|
|
335
|
+
var s, a;
|
|
336
336
|
if (!this.rulerConfig.isShow)
|
|
337
337
|
return;
|
|
338
338
|
const e = {
|
|
@@ -353,22 +353,22 @@ let g = class extends E {
|
|
|
353
353
|
y: this.canvasContainer.height - this.ruleH
|
|
354
354
|
}, e)
|
|
355
355
|
});
|
|
356
|
-
(s = this.sceneIns) == null || s.add(i), (
|
|
356
|
+
(s = this.sceneIns) == null || s.add(i), (a = this.sceneIns) == null || a.add(t);
|
|
357
357
|
}
|
|
358
358
|
drawRuler(e = 0) {
|
|
359
359
|
var n, d, l;
|
|
360
360
|
if (this.timersCopy = e, !this.rulerConfig.isShow)
|
|
361
361
|
return;
|
|
362
362
|
const t = this.dataTotalTimes / 1e3;
|
|
363
|
-
let i = this.leadHeadConfig.leadHedeWidth, s = 0,
|
|
364
|
-
const
|
|
363
|
+
let i = this.leadHeadConfig.leadHedeWidth, s = 0, a = t;
|
|
364
|
+
const o = W(this.rulerConfig.speed, this.gridConfig.cellMg, this.rulerConfig.sampleRate);
|
|
365
365
|
if (this.leadModel.isContinuous)
|
|
366
|
-
|
|
367
|
-
else if (!this.leadModel.add &&
|
|
368
|
-
const f = F(this.splitPoint,
|
|
369
|
-
|
|
366
|
+
a = t * 5;
|
|
367
|
+
else if (!this.leadModel.add && o) {
|
|
368
|
+
const f = F(this.splitPoint, o), r = A(f, this.rulerConfig.sampleRate || 0) / 1e3;
|
|
369
|
+
a = e + r;
|
|
370
370
|
}
|
|
371
|
-
for (let f = e; f <=
|
|
371
|
+
for (let f = e; f <= a; f = +(f + 0.1).toFixed(1))
|
|
372
372
|
f !== e && (i += this.rulerStep), f % 1 === 0 ? (s = this.canvasContainer.height - 10, (n = this.rulerGroup) == null || n.add(new I({
|
|
373
373
|
cursor: "",
|
|
374
374
|
style: {
|
|
@@ -401,8 +401,8 @@ let g = class extends E {
|
|
|
401
401
|
getRednerSinglePoints() {
|
|
402
402
|
let e = 0, t = 0;
|
|
403
403
|
const i = this.waveLists[this.singleModeConfig.defaultSelect] || [];
|
|
404
|
-
let s = this.slidingWindowInfo.startInd || 0,
|
|
405
|
-
const
|
|
404
|
+
let s = this.slidingWindowInfo.startInd || 0, a = this.slidingWindowInfo.endInd || 0;
|
|
405
|
+
const o = W(
|
|
406
406
|
this.waveConfigs[this.singleModeConfig.defaultSelect].speed,
|
|
407
407
|
this.gridConfig.cellMg,
|
|
408
408
|
this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate
|
|
@@ -410,30 +410,30 @@ let g = class extends E {
|
|
|
410
410
|
for (let f = 0; f < 1; f++) {
|
|
411
411
|
e = f * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0;
|
|
412
412
|
for (let r = 1; r <= l; r++)
|
|
413
|
-
t = r * this.splitBlockHeight, r > 1 && (t *= 0.8, s =
|
|
413
|
+
t = r * this.splitBlockHeight, r > 1 && (t *= 0.8, s = a, a = s + (this.slidingWindowInfo.points || 0)), r === 1 && (this.loopArrowY.rowAndCol = t), d.push({
|
|
414
414
|
pos: [e, t],
|
|
415
415
|
startInd: s,
|
|
416
|
-
endInd:
|
|
417
|
-
step:
|
|
416
|
+
endInd: a,
|
|
417
|
+
step: o,
|
|
418
418
|
sens: n,
|
|
419
|
-
data: i.slice(s,
|
|
419
|
+
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])
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
422
|
return d;
|
|
423
423
|
}
|
|
424
424
|
createSingleWaveFrom() {
|
|
425
|
-
var
|
|
426
|
-
(
|
|
427
|
-
let e = this.getRednerSinglePoints(), t = A(this.slidingWindowInfo.points || 0, this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0), i = 0, s = 0,
|
|
425
|
+
var o, n, d;
|
|
426
|
+
(o = this.singleWaveFromGroup) == null || o.removeAll();
|
|
427
|
+
let e = this.getRednerSinglePoints(), t = A(this.slidingWindowInfo.points || 0, this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0), i = 0, s = 0, a = 0;
|
|
428
428
|
for (let l = 0; l < e.length && !(e[l].pos[1] > this.drawArea.height + this.bottomAreaHeight); l++)
|
|
429
429
|
this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx) || (i = parseInt(`${t / 1e3 / 60}`, 10), s = parseInt(`${t / 1e3 % 60}`, 10), i = s === 60 ? i += 1 : i, i = i === 0 ? "00" : i < 10 ? `0${i}` : i, s = s === 0 || s === 60 ? "00" : s < 10 ? `0${s}` : s, (n = this.singleWaveFromGroup) == null || n.add(new x({
|
|
430
430
|
cursor: "",
|
|
431
431
|
name: this.singleModeConfig.defaultSelect + "_" + l,
|
|
432
432
|
shape: {
|
|
433
|
-
points: e[l].data.map(([f, r], h) => isNaN(r) ? (
|
|
434
|
-
e[l].data[
|
|
435
|
-
e[l].data[
|
|
436
|
-
]) : (
|
|
433
|
+
points: e[l].data.map(([f, r], h) => isNaN(r) ? (a === 0 && (a = h - 1, a = a < 0 ? 0 : a), [
|
|
434
|
+
e[l].data[a][0] + e[l].pos[0],
|
|
435
|
+
e[l].data[a][1] + e[l].pos[1]
|
|
436
|
+
]) : (a = 0, [
|
|
437
437
|
f + e[l].pos[0],
|
|
438
438
|
r + e[l].pos[1]
|
|
439
439
|
]))
|
|
@@ -464,7 +464,7 @@ let g = class extends E {
|
|
|
464
464
|
this.singleWaveDataCopy = e, e = null;
|
|
465
465
|
}
|
|
466
466
|
drawLoopArrow(e = 0) {
|
|
467
|
-
var l, f, r, h, C, w, m, G, B, O,
|
|
467
|
+
var l, f, r, h, C, w, m, G, B, O, N, R;
|
|
468
468
|
if (this.drawLoopArrowStartPosIdx = e, !this.heartFight.isShow)
|
|
469
469
|
return;
|
|
470
470
|
this.heartFight.mode && this.currentHeardBeat.heardBeat === null && (this.currentHeardBeat.heardBeat = this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect] || null, this.drawHeardBeatLine());
|
|
@@ -474,8 +474,8 @@ let g = class extends E {
|
|
|
474
474
|
i = this.loopArrowY.add - (L || 0) - this.splitBlockHeight / 3.5;
|
|
475
475
|
} else
|
|
476
476
|
i = 20;
|
|
477
|
-
let s = 0,
|
|
478
|
-
const
|
|
477
|
+
let s = 0, a = 0;
|
|
478
|
+
const o = {
|
|
479
479
|
fontSize: 12,
|
|
480
480
|
fill: "red",
|
|
481
481
|
fontFamily: this.fontFamily
|
|
@@ -490,7 +490,7 @@ let g = class extends E {
|
|
|
490
490
|
if (d = ((p == null ? void 0 : p.position) || 0) - e, !(e > ((p == null ? void 0 : p.position) || 0)) && !(!this.leadModel.isContinuous && !this.leadModel.add && d > (this.slidingWindowInfo.points || 0)) && !(this.leadModel.isSingleMode && d > (this.slidingWindowInfo.points || 0))) {
|
|
491
491
|
if (((p == null ? void 0 : p.position) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))
|
|
492
492
|
break;
|
|
493
|
-
t = d * (n || 0) + this.leadHeadConfig.leadHedeWidth - 9.5,
|
|
493
|
+
t = d * (n || 0) + this.leadHeadConfig.leadHedeWidth - 9.5, a = 0, (r = this.arrowGroup) == null || r.add(new ee({
|
|
494
494
|
name: "arrow_box",
|
|
495
495
|
shape: {
|
|
496
496
|
points: [
|
|
@@ -521,34 +521,34 @@ let g = class extends E {
|
|
|
521
521
|
cursor: "",
|
|
522
522
|
style: y({
|
|
523
523
|
x: 4 + t - s * 1.5,
|
|
524
|
-
y:
|
|
524
|
+
y: a + i,
|
|
525
525
|
text: `${(p == null ? void 0 : p.heartrate) || ""}`
|
|
526
|
-
},
|
|
527
|
-
})),
|
|
526
|
+
}, o)
|
|
527
|
+
})), a += 12), this.heartFight.interval && (s = ((w = this.AssistCtx) == null ? void 0 : w.measureText(`${(p == null ? void 0 : p.interval) || ""}`).width) || 0, (m = this.arrowGroup) == null || m.add(new I({
|
|
528
528
|
cursor: "",
|
|
529
529
|
style: y({
|
|
530
530
|
x: 4 + t - s * 1.5,
|
|
531
|
-
y:
|
|
531
|
+
y: a + i,
|
|
532
532
|
text: `${(p == null ? void 0 : p.interval) || ""}`
|
|
533
|
-
},
|
|
534
|
-
})),
|
|
533
|
+
}, o)
|
|
534
|
+
})), a += 12), this.heartFight.qrstCompany && (s = ((G = this.AssistCtx) == null ? void 0 : G.measureText(`${(p == null ? void 0 : p.qrstCompany) || ""}`).width) || 0, (B = this.arrowGroup) == null || B.add(new I({
|
|
535
535
|
cursor: "",
|
|
536
536
|
style: y({
|
|
537
537
|
x: 4 + t - s * 1.5,
|
|
538
|
-
y:
|
|
538
|
+
y: a + i,
|
|
539
539
|
text: `${(p == null ? void 0 : p.qrstCompany) || ""}`
|
|
540
|
-
},
|
|
541
|
-
})),
|
|
540
|
+
}, o)
|
|
541
|
+
})), a += 12), this.heartFight.telectricalaxis && (s = ((O = this.AssistCtx) == null ? void 0 : O.measureText(`${(p == null ? void 0 : p.telectricalaxis) || ""}`).width) || 0, (N = this.arrowGroup) == null || N.add(new I({
|
|
542
542
|
cursor: "",
|
|
543
543
|
style: y({
|
|
544
544
|
x: 4 + t - s * 1.5,
|
|
545
|
-
y:
|
|
545
|
+
y: a + i,
|
|
546
546
|
text: `${(p == null ? void 0 : p.telectricalaxis) || ""}`
|
|
547
|
-
},
|
|
547
|
+
}, o)
|
|
548
548
|
})));
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
(
|
|
551
|
+
(R = this.sceneIns) == null || R.add(this.arrowGroup);
|
|
552
552
|
}
|
|
553
553
|
arrowLoopClick(e, t) {
|
|
554
554
|
this.$emit("notifyHeardBeat", te.clone(e)), this.currentHeardBeat.heardBeat = e, this.currentHeardBeat.ele = t, this.drawHeardBeatLine();
|
|
@@ -558,7 +558,7 @@ let g = class extends E {
|
|
|
558
558
|
if (!this.currentHeardBeat.heardBeat)
|
|
559
559
|
return;
|
|
560
560
|
(n = this.heardBeatLineGroup) == null || n.removeAll(), (d = this.sceneIns) == null || d.remove(this.heardBeatLineGroup);
|
|
561
|
-
let t = {}, i = 0, s = this.getRednerPoints(),
|
|
561
|
+
let t = {}, i = 0, s = this.getRednerPoints(), a = this.getAddRednerPoints(), o;
|
|
562
562
|
e:
|
|
563
563
|
for (let w = 0; w < s.length; w++) {
|
|
564
564
|
t = ((l = this.analyseValues[w]) == null ? void 0 : l[this.currentHeardBeat.heardBeat.index].KeyPosByBeat) || {};
|
|
@@ -566,24 +566,24 @@ let g = class extends E {
|
|
|
566
566
|
if (["Pstart", "Pend", "QRSstart", "QRSend", "Tstart", "Tend"].includes(m) && Object.prototype.hasOwnProperty.call(t, m)) {
|
|
567
567
|
if (i = (t[m] - this.slidingWindowInfo.startInd) * (s[w].step || 0), this.isLeadOff(w) || this.isLeadDel(w))
|
|
568
568
|
continue;
|
|
569
|
-
if (e > t[m] || !this.leadModel.isContinuous && t[m] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0) || (
|
|
569
|
+
if (e > t[m] || !this.leadModel.isContinuous && t[m] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0) || (o = s[w], this.leadModel.isContinuous && w > this.leadModel.line - 1))
|
|
570
570
|
break e;
|
|
571
|
-
(f = this.heardBeatLineGroup) == null || f.add(this.createHeardBeatLine(
|
|
571
|
+
(f = this.heardBeatLineGroup) == null || f.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
e:
|
|
575
|
-
for (let w = 0; w <
|
|
575
|
+
for (let w = 0; w < a.length; w++) {
|
|
576
576
|
t = ((r = this.analyseValues[w]) == null ? void 0 : r[this.currentHeardBeat.heardBeat.index].KeyPosByBeat) || {};
|
|
577
577
|
for (const m in t)
|
|
578
578
|
if (["Pstart", "Pend", "QRSstart", "QRSend", "Tstart", "Tend"].includes(m)) {
|
|
579
|
-
if (i = (t[m] - this.slidingWindowInfo.startInd) * (
|
|
579
|
+
if (i = (t[m] - this.slidingWindowInfo.startInd) * (a[w].step || 0), this.isLeadOff(this.longLeadConfig.leadIdxs[w]) && this.isLeadDel(this.longLeadConfig.leadIdxs[w]))
|
|
580
580
|
continue;
|
|
581
581
|
if (e > t[m])
|
|
582
582
|
break e;
|
|
583
|
-
|
|
583
|
+
o = a[w], (h = this.heardBeatLineGroup) == null || h.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
(C = this.sceneIns) == null || C.add(this.heardBeatLineGroup), t = null, s = null,
|
|
586
|
+
(C = this.sceneIns) == null || C.add(this.heardBeatLineGroup), t = null, s = null, a = null;
|
|
587
587
|
}
|
|
588
588
|
createHeardBeatLine(e, t) {
|
|
589
589
|
return new P({
|
|
@@ -606,15 +606,15 @@ let g = class extends E {
|
|
|
606
606
|
}
|
|
607
607
|
getAddRednerPoints() {
|
|
608
608
|
const e = [];
|
|
609
|
-
let t = this.leadHeadConfig.leadHedeWidth, i = 0, s = 0,
|
|
609
|
+
let t = this.leadHeadConfig.leadHedeWidth, i = 0, s = 0, a = [], o = 0, n = 0;
|
|
610
610
|
for (let d = 0; d < this.leadModel.add; d++)
|
|
611
|
-
s = this.longLeadConfig.leadIdxs[d], this.waveConfigs[s] && (t = this.waveConfigs[s].addPosX || t,
|
|
611
|
+
s = this.longLeadConfig.leadIdxs[d], this.waveConfigs[s] && (t = this.waveConfigs[s].addPosX || t, o = W(this.waveConfigs[s].speed, this.gridConfig.cellMg, this.waveConfigs[s].sampleRate), n = S(this.waveConfigs[s].gain, this.gridConfig.cellMg), i = this.waveConfigs[s].addPosY || (d + this.leadModel.line + 1) * this.splitBlockHeight, a = this.waveLists[s] || [], d === 0 && (this.loopArrowY.add = i), e.push({
|
|
612
612
|
pos: [t, i],
|
|
613
613
|
startInd: this.addSlidingWindowInfo.startInd || 0,
|
|
614
614
|
endInd: this.addSlidingWindowInfo.endInd || 0,
|
|
615
|
-
data:
|
|
615
|
+
data: a.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((l, f) => this.waveConfigs[s].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[s].leadName) ? H(this.waveConfigs[s].sensitivity, l, n / 2) : H(this.waveConfigs[s].sensitivity, l, n)).map((l, f) => [f * (o || 0), -l]),
|
|
616
616
|
sens: n,
|
|
617
|
-
step:
|
|
617
|
+
step: o
|
|
618
618
|
}));
|
|
619
619
|
return e;
|
|
620
620
|
}
|
|
@@ -626,56 +626,56 @@ let g = class extends E {
|
|
|
626
626
|
cursor: "",
|
|
627
627
|
name: this.longLeadConfig.leadIdxs[s] + "_" + s,
|
|
628
628
|
shape: {
|
|
629
|
-
points: e[s].data.map(([
|
|
629
|
+
points: e[s].data.map(([a, o], n) => isNaN(o) ? (t === 0 && (t = n - 1, t = t < 0 ? 0 : t), [
|
|
630
630
|
e[s].data[t][0] + e[s].pos[0],
|
|
631
631
|
e[s].data[t][1] + e[s].pos[1]
|
|
632
632
|
]) : (t = 0, [
|
|
633
|
-
|
|
634
|
-
|
|
633
|
+
a + e[s].pos[0],
|
|
634
|
+
o + e[s].pos[1]
|
|
635
635
|
]))
|
|
636
636
|
},
|
|
637
637
|
style: {
|
|
638
638
|
stroke: this.leadConfig.lineColor,
|
|
639
639
|
lineWidth: this.leadConfig.lineWidth
|
|
640
640
|
},
|
|
641
|
-
onclick: (
|
|
642
|
-
this.onDbClickWaveFrom(
|
|
641
|
+
onclick: (a) => {
|
|
642
|
+
this.onDbClickWaveFrom(a, "add");
|
|
643
643
|
}
|
|
644
644
|
})), 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));
|
|
645
645
|
this.addWaveDataCopy = e, e = null;
|
|
646
646
|
}
|
|
647
647
|
getRednerPoints() {
|
|
648
|
-
let e = 0, t = 0, i = 0, s = [],
|
|
648
|
+
let e = 0, t = 0, i = 0, s = [], a = 0, o = 0, n = this.slidingWindowInfo.startInd || 0, d = this.slidingWindowInfo.endInd || 0;
|
|
649
649
|
const l = [];
|
|
650
650
|
for (let f = 0; f < this.leadModel.column; f++) {
|
|
651
651
|
e = f * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0, this.leadModel.isContinuous && f > 0 && (n = d, d = n + (this.slidingWindowInfo.points || 0));
|
|
652
652
|
for (let r = 1; r <= this.leadModel.line && (t = r * this.splitBlockHeight, !(i > (this.waveLists || []).length - 1)); r++)
|
|
653
|
-
e = this.waveConfigs[i].posX || e, t = this.waveConfigs[i].posY || t,
|
|
653
|
+
e = this.waveConfigs[i].posX || e, t = this.waveConfigs[i].posY || t, a = W(this.waveConfigs[i].speed, this.gridConfig.cellMg, this.waveConfigs[i].sampleRate), o = S(this.waveConfigs[i].gain, this.gridConfig.cellMg), s = this.waveLists[i] || [], this.waveConfigs[i] && (r === 1 && (this.loopArrowY.rowAndCol = t), l.push({
|
|
654
654
|
pos: [e, t],
|
|
655
655
|
startInd: n,
|
|
656
656
|
endInd: d,
|
|
657
|
-
sens:
|
|
658
|
-
step:
|
|
659
|
-
data: s.slice(n, d).map((h, C) => this.waveConfigs[i].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[i].leadName) ? H(this.waveConfigs[i].sensitivity, h,
|
|
657
|
+
sens: o,
|
|
658
|
+
step: a,
|
|
659
|
+
data: s.slice(n, d).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])
|
|
660
660
|
}), i++);
|
|
661
661
|
}
|
|
662
662
|
return l;
|
|
663
663
|
}
|
|
664
664
|
createRowAndColWaveFrom() {
|
|
665
|
-
var s,
|
|
666
|
-
|
|
665
|
+
var s, a;
|
|
666
|
+
(s = this.rowAndColwaveFromGroup) == null || s.removeAll();
|
|
667
667
|
let e = this.getRednerPoints(), t = 0, i = 0;
|
|
668
|
-
for (let
|
|
669
|
-
t = this.waveConfigs[
|
|
668
|
+
for (let o = 0; o < e.length; o++)
|
|
669
|
+
t = this.waveConfigs[o].leadIdx || 0, this.isLeadDel(t) || (a = this.rowAndColwaveFromGroup) == null || a.add(new x({
|
|
670
670
|
cursor: "",
|
|
671
|
-
name:
|
|
671
|
+
name: o + "_" + o,
|
|
672
672
|
shape: {
|
|
673
|
-
points: e[
|
|
674
|
-
e[
|
|
675
|
-
e[
|
|
673
|
+
points: e[o].data.map(([n, d], l) => isNaN(d) ? (i === 0 && (i = l - 1, i = i < 0 ? 0 : i), [
|
|
674
|
+
e[o].data[i][0] + e[o].pos[0],
|
|
675
|
+
e[o].data[i][1] + e[o].pos[1]
|
|
676
676
|
]) : (i = 0, [
|
|
677
|
-
n + e[
|
|
678
|
-
d + e[
|
|
677
|
+
n + e[o].pos[0],
|
|
678
|
+
d + e[o].pos[1]
|
|
679
679
|
]))
|
|
680
680
|
},
|
|
681
681
|
style: {
|
|
@@ -685,12 +685,12 @@ let g = class extends E {
|
|
|
685
685
|
onclick: (n) => {
|
|
686
686
|
this.onDbClickWaveFrom(n, "rowAndCol");
|
|
687
687
|
}
|
|
688
|
-
})),
|
|
688
|
+
})), 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));
|
|
689
689
|
this.waveDataCopy = e, e = null;
|
|
690
690
|
}
|
|
691
691
|
createLeadName(e, t, i, s = !1) {
|
|
692
|
-
var
|
|
693
|
-
(
|
|
692
|
+
var a;
|
|
693
|
+
(a = this.leadHeadNameGroup) == null || a.add(new I({
|
|
694
694
|
style: {
|
|
695
695
|
x: t,
|
|
696
696
|
y: i,
|
|
@@ -699,18 +699,18 @@ let g = class extends E {
|
|
|
699
699
|
fill: this.leadConfig.lineColor,
|
|
700
700
|
fontFamily: this.leadConfig.fontFamily
|
|
701
701
|
},
|
|
702
|
-
oncontextmenu: (
|
|
703
|
-
|
|
704
|
-
event: D(y({},
|
|
702
|
+
oncontextmenu: (o) => {
|
|
703
|
+
o.event.preventDefault(), this.$emit("notiifyLeadName", {
|
|
704
|
+
event: D(y({}, o), {
|
|
705
705
|
name: this.leadNames[e],
|
|
706
706
|
idx: e
|
|
707
707
|
}),
|
|
708
708
|
isAdd: s
|
|
709
709
|
});
|
|
710
710
|
},
|
|
711
|
-
onclick: (
|
|
711
|
+
onclick: (o) => {
|
|
712
712
|
this.$emit("notiifyLeadName", {
|
|
713
|
-
event: D(y({},
|
|
713
|
+
event: D(y({}, o), {
|
|
714
714
|
name: this.leadNames[e],
|
|
715
715
|
idx: e
|
|
716
716
|
}),
|
|
@@ -737,11 +737,11 @@ let g = class extends E {
|
|
|
737
737
|
onDbClickWaveFrom(e, t) {
|
|
738
738
|
console.log("onDbClickWaveFrom", e);
|
|
739
739
|
const i = Date.now(), s = () => {
|
|
740
|
-
const
|
|
741
|
-
this.activeLeadIdx = +
|
|
742
|
-
const
|
|
740
|
+
const a = e.target.name.split("_");
|
|
741
|
+
this.activeLeadIdx = +a[0];
|
|
742
|
+
const o = +a[1];
|
|
743
743
|
let n = 0, d = 0, l = 0, f = 0, r = 0;
|
|
744
|
-
t === "single" ? (n = e.offsetX - this.singleWaveDataCopy[
|
|
744
|
+
t === "single" ? (n = e.offsetX - this.singleWaveDataCopy[o].pos[0], d = this.singleWaveDataCopy[o].startInd, l = F(n, this.singleWaveDataCopy[o].step || 1), f = this.singleWaveDataCopy[o].sens, r = this.singleWaveDataCopy[o].step) : t === "rowAndCol" ? (n = e.offsetX - this.waveDataCopy[o].pos[0], d = this.waveDataCopy[o].startInd || 0, l = F(n, this.waveDataCopy[o].step || 1), f = this.waveDataCopy[o].sens, r = this.waveDataCopy[o].step) : t === "add" && (n = e.offsetX - this.addWaveDataCopy[o].pos[0], d = this.addWaveDataCopy[o].startInd || 0, l = F(n, this.addWaveDataCopy[o].step || 1), f = this.addWaveDataCopy[o].sens, r = this.addWaveDataCopy[o].step), l += d, this.$emit("notifyActiveEnlargr", {
|
|
745
745
|
sens: f,
|
|
746
746
|
step: r,
|
|
747
747
|
activeLeadIdx: this.activeLeadIdx,
|
|
@@ -764,11 +764,11 @@ let g = class extends E {
|
|
|
764
764
|
});
|
|
765
765
|
}
|
|
766
766
|
scrollWaveFrom(e) {
|
|
767
|
-
var s,
|
|
767
|
+
var s, a;
|
|
768
768
|
this.slidingWindowInfo.startInd = e, this.slidingWindowInfo.endInd = e + (this.slidingWindowInfo.points || 0), this.addSlidingWindowInfo.startInd = e, this.addSlidingWindowInfo.endInd = e + (this.addSlidingWindowInfo.points || 0);
|
|
769
769
|
let t = this.getRednerPoints(), i = this.getAddRednerPoints();
|
|
770
|
-
this.waveDataCopy = t, this.addWaveDataCopy = i, (s = this.rowAndColwaveFromGroup) == null || s.eachChild((
|
|
771
|
-
n = n || 0,
|
|
770
|
+
this.waveDataCopy = t, this.addWaveDataCopy = i, (s = this.rowAndColwaveFromGroup) == null || s.eachChild((o, n) => {
|
|
771
|
+
n = n || 0, o.attr({
|
|
772
772
|
shape: {
|
|
773
773
|
points: t[n].data.map(([d, l]) => [
|
|
774
774
|
d + t[n].pos[0],
|
|
@@ -776,8 +776,8 @@ let g = class extends E {
|
|
|
776
776
|
])
|
|
777
777
|
}
|
|
778
778
|
});
|
|
779
|
-
}), (
|
|
780
|
-
n = n || 0,
|
|
779
|
+
}), (a = this.addwaveFromGroup) == null || a.eachChild((o, n) => {
|
|
780
|
+
n = n || 0, o.attr({
|
|
781
781
|
shape: {
|
|
782
782
|
points: i[n].data.map(([d, l]) => [
|
|
783
783
|
d + i[n].pos[0],
|
|
@@ -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,y=(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"),z=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"),L=require("lodash"),u=require("@costy-plus/utils"),g=require("zrender"),T=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 $=T(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,d,l,f,r;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(),(d=this.rulerGroup)==null||d.removeAll(),(l=this.arrowGroup)==null||l.removeAll(),(f=this.heardBeatLineGroup)==null||f.removeAll(),(r=this.sceneIns)==null||r.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&&(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"].scrollBy({dx:(this.posStart||0)*(this.publicStep||1)})}):(this.scrollWaveFrom(this.posStart),this.scrollRuler(this.posStart),this.scrollArrow(this.posStart)))}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:t,startInd:0,endInd:t},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:i,startInd:0,endInd:i}}calcHighestAndLowestPoint(){const e=L.flattenDeep(this.waveLists);return{maxPoints:L.max(e)||0,minPoints:L.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:0,startInd:0,endInd:0},this.addSlidingWindowInfo={points:0,startInd:0,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,d,l,f;(o=this.leadHeadGroup)==null||o.removeAll(),(n=this.sceneIns)==null||n.remove(this.leadHeadGroup),console.log("this.waveConfigs",this.waveConfigs);let e="",t=!1,i=0,s=0;for(let r=0;r<=this.leadModel.column;r++){s=r*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,(d=this.leadHeadGroup)==null||d.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 r=0;r<this.leadModel.add;r++)!this.waveConfigs[this.longLeadConfig.leadIdxs[r]]||(a=this.waveConfigs[this.longLeadConfig.leadIdxs[r]],e=this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[r]]],t=!1,a.gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=a.posX?a.posX-this.leadHeadConfig.leadHedeWidth:0,(l=this.leadHeadGroup)==null||l.add(this.createLeadHead(i,a.posY||(r+1+this.leadModel.line)*this.splitBlockHeight,u.getSens(a.gain,this.gridConfig.cellMg),t)));a=null,(f=this.sceneIns)==null||f.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,d,l,f;(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 r=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),h=u.getDataLenTimes(Math.ceil(this.splitPoint/(r||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)*(r||0)}let t=0,i=0,s=0,a=0;for(let r=1;r<=this.leadModel.column-1;r++){t=r*e+this.leadHeadConfig.leadHedeWidth,i=r*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])?(d=this.splitLineGroup)==null||d.add(this.creatSplitLine(t,((this.waveConfigs||[])[h-1+i].posY||h*this.splitBlockHeight)-(a||0)/2*.5,a,!0)):(l=this.splitLineGroup)==null||l.add(this.creatSplitLine(t,((this.waveConfigs||[])[h-1+i].posY||h*this.splitBlockHeight)-(a||0)*.5,a))}}(f=this.sceneIns)==null||f.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:y({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new g.Text({style:y({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,d,l;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 f=u.getPointIdxForPx(this.splitPoint,o),r=u.getDataLenTimes(f,this.rulerConfig.sampleRate||0)/1e3;a=e+r}for(let f=e;f<=a;f=+(f+.1).toFixed(1))f!==e&&(i+=this.rulerStep),f%1===0?(s=this.canvasContainer.height-10,(n=this.rulerGroup)==null||n.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:f+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(d=this.rulerGroup)==null||d.add(new g.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(l=this.sceneIns)==null||l.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),d=[],l=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let f=0;f<1;f++){e=f*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let r=1;r<=l;r++)t=r*this.splitBlockHeight,r>1&&(t*=.8,s=a,a=s+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=t),d.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 d}createSingleWaveFrom(){var o,n,d;(o=this.singleWaveFromGroup)==null||o.removeAll();let e=this.getRednerSinglePoints(),t=u.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),i=0,s=0,a=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)||(i=parseInt(`${t/1e3/60}`,10),s=parseInt(`${t/1e3%60}`,10),i=s===60?i+=1:i,i=i===0?"00":i<10?`0${i}`:i,s=s===0||s===60?"00":s<10?`0${s}`:s,(n=this.singleWaveFromGroup)==null||n.add(new g.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+l,shape:{points:e[l].data.map(([f,r],h)=>isNaN(r)?(a===0&&(a=h-1,a=a<0?0:a),[e[l].data[a][0]+e[l].pos[0],e[l].data[a][1]+e[l].pos[1]]):(a=0,[f+e[l].pos[0],r+e[l].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:f=>{this.onDbClickWaveFrom(f,"single")}})),(d=this.singleWaveFromGroup)==null||d.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":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),l>0&&(t+=t)),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 l,f,r,h,m,C,v,x,H,P,A,M;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 I=u.getSens(this.waveConfigs[this.longLeadConfig.leadIdxs[0]].gain,this.gridConfig.cellMg);i=this.loopArrowY.add-(I||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 d=0;for(let I=0;I<(this.heartBeatPosition[this.heartFight.showIdxPai]||[]).length;I++){const p=this.heartBeatPosition[this.heartFight.showIdxPai][I];if(d=((p==null?void 0:p.position)||0)-e,!(e>((p==null?void 0:p.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&d>(this.slidingWindowInfo.points||0))&&!(this.leadModel.isSingleMode&&d>(this.slidingWindowInfo.points||0))){if(((p==null?void 0:p.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=d*(n||0)+this.leadHeadConfig.leadHedeWidth-9.5,a=0,(r=this.arrowGroup)==null||r.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:((f=(l=this.currentHeardBeat)==null?void 0:l.heardBeat)==null?void 0:f.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:y({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:y({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.interval)||""}`},o)})),a+=12),this.heartFight.qrstCompany&&(s=((x=this.AssistCtx)==null?void 0:x.measureText(`${(p==null?void 0:p.qrstCompany)||""}`).width)||0,(H=this.arrowGroup)==null||H.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.qrstCompany)||""}`},o)})),a+=12),this.heartFight.telectricalaxis&&(s=((P=this.AssistCtx)==null?void 0:P.measureText(`${(p==null?void 0:p.telectricalaxis)||""}`).width)||0,(A=this.arrowGroup)==null||A.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.telectricalaxis)||""}`},o)})))}}(M=this.sceneIns)==null||M.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,d,l,f,r,h,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(d=this.sceneIns)==null||d.remove(this.heardBeatLineGroup);let t={},i=0,s=this.getRednerPoints(),a=this.getAddRednerPoints(),o;e:for(let C=0;C<s.length;C++){t=((l=this.analyseValues[C])==null?void 0:l[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;(f=this.heardBeatLineGroup)==null||f.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}e:for(let C=0;C<a.length;C++){t=((r=this.analyseValues[C])==null?void 0:r[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 d=0;d<this.leadModel.add;d++)s=this.longLeadConfig.leadIdxs[d],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||(d+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveLists[s]||[],d===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((l,f)=>this.waveConfigs[s].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?u.getActualY(this.waveConfigs[s].sensitivity,l,n/2):u.getActualY(this.waveConfigs[s].sensitivity,l,n)).map((l,f)=>[f*(o||0),-l]),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,d=this.slidingWindowInfo.endInd||0;const l=[];for(let f=0;f<this.leadModel.column;f++){e=f*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&f>0&&(n=d,d=n+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(t=r*this.splitBlockHeight,!(i>(this.waveLists||[]).length-1));r++)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]&&(r===1&&(this.loopArrowY.rowAndCol=t),l.push({pos:[e,t],startInd:n,endInd:d,sens:o,step:a,data:s.slice(n,d).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 l}createRowAndColWaveFrom(){var s,a;console.time("createRowAndColWaveFrom"),(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,d],l)=>isNaN(d)?(i===0&&(i=l-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],d+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(y({},o),{name:this.leadNames[e],idx:e}),isAdd:s})},onclick:o=>{this.$emit("notiifyLeadName",{event:F(y({},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,d=0,l=0,f=0,r=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],d=this.singleWaveDataCopy[o].startInd,l=u.getPointIdxForPx(n,this.singleWaveDataCopy[o].step||1),f=this.singleWaveDataCopy[o].sens,r=this.singleWaveDataCopy[o].step):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],d=this.waveDataCopy[o].startInd||0,l=u.getPointIdxForPx(n,this.waveDataCopy[o].step||1),f=this.waveDataCopy[o].sens,r=this.waveDataCopy[o].step):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],d=this.addWaveDataCopy[o].startInd||0,l=u.getPointIdxForPx(n,this.addWaveDataCopy[o].step||1),f=this.addWaveDataCopy[o].sens,r=this.addWaveDataCopy[o].step),l+=d,this.$emit("notifyActiveEnlargr",{sens:f,step:r,activeLeadIdx:this.activeLeadIdx,pointIdx:l})};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,o.attr({shape:{points:t[n].data.map(([d,l])=>[d+t[n].pos[0],l+t[n].pos[1]])}})}),(a=this.addwaveFromGroup)==null||a.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:i[n].data.map(([d,l])=>[d+i[n].pos[0],l+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([z.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},F=(e,t)=>B(e,N(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("vue"),z=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"),L=require("lodash"),u=require("@costy-plus/utils"),g=require("zrender"),T=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 $=T(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,d,l,f,r;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(),(d=this.rulerGroup)==null||d.removeAll(),(l=this.arrowGroup)==null||l.removeAll(),(f=this.heardBeatLineGroup)==null||f.removeAll(),(r=this.sceneIns)==null||r.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&&(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"].scrollBy({dx:(this.posStart||0)*(this.publicStep||1)})}):(this.scrollWaveFrom(this.posStart),this.scrollRuler(this.posStart),this.scrollArrow(this.posStart)))}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,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd||t},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,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||i}}calcHighestAndLowestPoint(){const e=L.flattenDeep(this.waveLists);return{maxPoints:L.max(e)||0,minPoints:L.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,d,l,f;(o=this.leadHeadGroup)==null||o.removeAll(),(n=this.sceneIns)==null||n.remove(this.leadHeadGroup),console.log("this.waveConfigs",this.waveConfigs);let e="",t=!1,i=0,s=0;for(let r=0;r<=this.leadModel.column;r++){s=r*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,(d=this.leadHeadGroup)==null||d.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 r=0;r<this.leadModel.add;r++)!this.waveConfigs[this.longLeadConfig.leadIdxs[r]]||(a=this.waveConfigs[this.longLeadConfig.leadIdxs[r]],e=this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[r]]],t=!1,a.gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=a.posX?a.posX-this.leadHeadConfig.leadHedeWidth:0,(l=this.leadHeadGroup)==null||l.add(this.createLeadHead(i,a.posY||(r+1+this.leadModel.line)*this.splitBlockHeight,u.getSens(a.gain,this.gridConfig.cellMg),t)));a=null,(f=this.sceneIns)==null||f.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,d,l,f;(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 r=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),h=u.getDataLenTimes(Math.ceil(this.splitPoint/(r||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)*(r||0)}let t=0,i=0,s=0,a=0;for(let r=1;r<=this.leadModel.column-1;r++){t=r*e+this.leadHeadConfig.leadHedeWidth,i=r*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])?(d=this.splitLineGroup)==null||d.add(this.creatSplitLine(t,((this.waveConfigs||[])[h-1+i].posY||h*this.splitBlockHeight)-(a||0)/2*.5,a,!0)):(l=this.splitLineGroup)==null||l.add(this.creatSplitLine(t,((this.waveConfigs||[])[h-1+i].posY||h*this.splitBlockHeight)-(a||0)*.5,a))}}(f=this.sceneIns)==null||f.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,d,l;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 f=u.getPointIdxForPx(this.splitPoint,o),r=u.getDataLenTimes(f,this.rulerConfig.sampleRate||0)/1e3;a=e+r}for(let f=e;f<=a;f=+(f+.1).toFixed(1))f!==e&&(i+=this.rulerStep),f%1===0?(s=this.canvasContainer.height-10,(n=this.rulerGroup)==null||n.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:f+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(d=this.rulerGroup)==null||d.add(new g.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(l=this.sceneIns)==null||l.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),d=[],l=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let f=0;f<1;f++){e=f*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let r=1;r<=l;r++)t=r*this.splitBlockHeight,r>1&&(t*=.8,s=a,a=s+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=t),d.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 d}createSingleWaveFrom(){var o,n,d;(o=this.singleWaveFromGroup)==null||o.removeAll();let e=this.getRednerSinglePoints(),t=u.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),i=0,s=0,a=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)||(i=parseInt(`${t/1e3/60}`,10),s=parseInt(`${t/1e3%60}`,10),i=s===60?i+=1:i,i=i===0?"00":i<10?`0${i}`:i,s=s===0||s===60?"00":s<10?`0${s}`:s,(n=this.singleWaveFromGroup)==null||n.add(new g.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+l,shape:{points:e[l].data.map(([f,r],h)=>isNaN(r)?(a===0&&(a=h-1,a=a<0?0:a),[e[l].data[a][0]+e[l].pos[0],e[l].data[a][1]+e[l].pos[1]]):(a=0,[f+e[l].pos[0],r+e[l].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:f=>{this.onDbClickWaveFrom(f,"single")}})),(d=this.singleWaveFromGroup)==null||d.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":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),l>0&&(t+=t)),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 l,f,r,h,m,C,v,x,H,P,M,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 d=0;for(let y=0;y<(this.heartBeatPosition[this.heartFight.showIdxPai]||[]).length;y++){const p=this.heartBeatPosition[this.heartFight.showIdxPai][y];if(d=((p==null?void 0:p.position)||0)-e,!(e>((p==null?void 0:p.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&d>(this.slidingWindowInfo.points||0))&&!(this.leadModel.isSingleMode&&d>(this.slidingWindowInfo.points||0))){if(((p==null?void 0:p.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=d*(n||0)+this.leadHeadConfig.leadHedeWidth-9.5,a=0,(r=this.arrowGroup)==null||r.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:((f=(l=this.currentHeardBeat)==null?void 0:l.heardBeat)==null?void 0:f.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=((x=this.AssistCtx)==null?void 0:x.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=((P=this.AssistCtx)==null?void 0:P.measureText(`${(p==null?void 0:p.telectricalaxis)||""}`).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.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,d,l,f,r,h,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(d=this.sceneIns)==null||d.remove(this.heardBeatLineGroup);let t={},i=0,s=this.getRednerPoints(),a=this.getAddRednerPoints(),o;e:for(let C=0;C<s.length;C++){t=((l=this.analyseValues[C])==null?void 0:l[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;(f=this.heardBeatLineGroup)==null||f.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}e:for(let C=0;C<a.length;C++){t=((r=this.analyseValues[C])==null?void 0:r[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 d=0;d<this.leadModel.add;d++)s=this.longLeadConfig.leadIdxs[d],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||(d+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveLists[s]||[],d===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((l,f)=>this.waveConfigs[s].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?u.getActualY(this.waveConfigs[s].sensitivity,l,n/2):u.getActualY(this.waveConfigs[s].sensitivity,l,n)).map((l,f)=>[f*(o||0),-l]),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,d=this.slidingWindowInfo.endInd||0;const l=[];for(let f=0;f<this.leadModel.column;f++){e=f*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&f>0&&(n=d,d=n+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(t=r*this.splitBlockHeight,!(i>(this.waveLists||[]).length-1));r++)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]&&(r===1&&(this.loopArrowY.rowAndCol=t),l.push({pos:[e,t],startInd:n,endInd:d,sens:o,step:a,data:s.slice(n,d).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 l}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,d],l)=>isNaN(d)?(i===0&&(i=l-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],d+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,d=0,l=0,f=0,r=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],d=this.singleWaveDataCopy[o].startInd,l=u.getPointIdxForPx(n,this.singleWaveDataCopy[o].step||1),f=this.singleWaveDataCopy[o].sens,r=this.singleWaveDataCopy[o].step):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],d=this.waveDataCopy[o].startInd||0,l=u.getPointIdxForPx(n,this.waveDataCopy[o].step||1),f=this.waveDataCopy[o].sens,r=this.waveDataCopy[o].step):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],d=this.addWaveDataCopy[o].startInd||0,l=u.getPointIdxForPx(n,this.addWaveDataCopy[o].step||1),f=this.addWaveDataCopy[o].sens,r=this.addWaveDataCopy[o].step),l+=d,this.$emit("notifyActiveEnlargr",{sens:f,step:r,activeLeadIdx:this.activeLeadIdx,pointIdx:l})};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,o.attr({shape:{points:t[n].data.map(([d,l])=>[d+t[n].pos[0],l+t[n].pos[1]])}})}),(a=this.addwaveFromGroup)==null||a.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:i[n].data.map(([d,l])=>[d+i[n].pos[0],l+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([z.default({name:"Methods"})],exports.default);
|