costy-plus 1.0.28-0 → 1.0.30-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/src/EcgWave/index.vue_vue_type_template_lang.js +7 -7
- package/dist/es/src/EcgWave/method.js +8 -8
- package/dist/es/src/EnlargeWave/medthod.d.ts +2 -2
- package/dist/es/src/EnlargeWave/medthod.js +35 -36
- package/dist/lib/src/EcgWave/index.vue_vue_type_template_lang.js +1 -1
- package/dist/lib/src/EcgWave/method.js +1 -1
- package/dist/lib/src/EnlargeWave/medthod.d.ts +2 -2
- package/dist/lib/src/EnlargeWave/medthod.js +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var p = function() {
|
|
2
|
-
var t, i, o,
|
|
2
|
+
var t, i, l, o, r, s, n, g, d, v, c, h, a = this, f = a.$createElement, e = a._self._c || f;
|
|
3
3
|
return e("div", {
|
|
4
4
|
style: {
|
|
5
5
|
width: `${a.width}px`,
|
|
@@ -40,9 +40,9 @@ var p = function() {
|
|
|
40
40
|
width: a.canvasContainer.width,
|
|
41
41
|
height: a.canvasContainer.height,
|
|
42
42
|
"grid-config": a.gridConfig,
|
|
43
|
-
"speed-value": ((
|
|
43
|
+
"speed-value": ((l = a.formatEcgData) === null || l === void 0 ? void 0 : l.speed) || 0,
|
|
44
44
|
sens: a.formatEcgData.sens,
|
|
45
|
-
step: ((
|
|
45
|
+
step: ((o = a.formatEcgData) === null || o === void 0 ? void 0 : o.step) || 0,
|
|
46
46
|
"lead-head-config": a.leadHeadConfig,
|
|
47
47
|
"wave-data": a.waveDataCopy,
|
|
48
48
|
"add-wave-data": a.addWaveDataCopy,
|
|
@@ -52,7 +52,7 @@ var p = function() {
|
|
|
52
52
|
"split-point": a.splitPoint,
|
|
53
53
|
"lead-config": a.leadConfig,
|
|
54
54
|
"heart-fight": a.heartFight,
|
|
55
|
-
"normal-lead-names": ((
|
|
55
|
+
"normal-lead-names": ((r = a.formatEcgData) === null || r === void 0 ? void 0 : r.processedData.otherParams.LeadName) || []
|
|
56
56
|
}
|
|
57
57
|
}) : a._e(), a.isShowEnlargeWave ? e("MXEnlargeWave", a._g({
|
|
58
58
|
staticClass: "enlarge-wave",
|
|
@@ -61,7 +61,7 @@ var p = function() {
|
|
|
61
61
|
width: a.MXEnlargeWaveWH.width,
|
|
62
62
|
height: a.MXEnlargeWaveWH.height,
|
|
63
63
|
"grid-config": a.gridConfig,
|
|
64
|
-
"speed-value": ((
|
|
64
|
+
"speed-value": ((s = a.formatEcgData) === null || s === void 0 ? void 0 : s.speed) || 0,
|
|
65
65
|
sens: a.formatEcgData.sens,
|
|
66
66
|
step: ((n = a.formatEcgData) === null || n === void 0 ? void 0 : n.step) || 0,
|
|
67
67
|
"sample-rate": ((g = a.formatEcgData) === null || g === void 0 ? void 0 : g.processedData.otherParams.SampleRate) || 0,
|
|
@@ -76,8 +76,8 @@ var p = function() {
|
|
|
76
76
|
"enlarge-wave-mode": a.enlargeWaveMode,
|
|
77
77
|
"conventional-e-c-g-config": a.conventionalECGConfig,
|
|
78
78
|
"is-sync-analyse-value-check": a.isSyncAnalyseValueCheck,
|
|
79
|
-
gains: a.
|
|
80
|
-
speeds: a.
|
|
79
|
+
"enlarge-gains": a.enlargeGains,
|
|
80
|
+
"enlarge-speeds": a.enlargeSpeeds
|
|
81
81
|
},
|
|
82
82
|
on: {
|
|
83
83
|
"update:isShowEnlargeWave": function(m) {
|
|
@@ -564,8 +564,8 @@ let p = class extends K {
|
|
|
564
564
|
fontFamily: this.fontFamily
|
|
565
565
|
};
|
|
566
566
|
let n = 0;
|
|
567
|
-
for (let
|
|
568
|
-
const f = (d = this.formatEcgData) == null ? void 0 : d.heartBeatPosition[
|
|
567
|
+
for (let G = 0; G < (((h = this.formatEcgData) == null ? void 0 : h.heartBeatPosition) || []).length; G++) {
|
|
568
|
+
const f = (d = this.formatEcgData) == null ? void 0 : d.heartBeatPosition[G];
|
|
569
569
|
if (n = ((f == null ? void 0 : f.position) || 0) - e, !(e > ((f == null ? void 0 : f.position) || 0)) && !(!this.leadModel.isContinuous && !this.leadModel.add && n > (this.slidingWindowInfo.points || 0)) && !(this.isSingleMode && this.singleModeInfo && n > (this.slidingWindowInfo.points || 0))) {
|
|
570
570
|
if (((f == null ? void 0 : f.position) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))
|
|
571
571
|
break;
|
|
@@ -586,15 +586,15 @@ let p = class extends K {
|
|
|
586
586
|
style: {
|
|
587
587
|
fill: ((g = (c = this.currentHeardBeat) == null ? void 0 : c.heardBeat) == null ? void 0 : g.index) === (f == null ? void 0 : f.index) ? "blue" : "#ccc"
|
|
588
588
|
},
|
|
589
|
-
onclick: (
|
|
589
|
+
onclick: (b) => {
|
|
590
590
|
var j;
|
|
591
|
-
!this.heartFight.mode || (
|
|
591
|
+
!this.heartFight.mode || (b.target.attr({
|
|
592
592
|
style: { fill: "blue" }
|
|
593
593
|
}), (j = this.arrowGroup) == null || j.children().filter((P) => P.name === "arrow_box").forEach((P) => {
|
|
594
|
-
P.id !==
|
|
594
|
+
P.id !== b.target.id && P.attr({
|
|
595
595
|
style: { fill: "#ccc" }
|
|
596
596
|
});
|
|
597
|
-
}), this.arrowLoopClick(f,
|
|
597
|
+
}), this.arrowLoopClick(f, b.target));
|
|
598
598
|
}
|
|
599
599
|
})), this.heartFight.heartrate && (a = ((D = this.AssistCtx) == null ? void 0 : D.measureText(`${(f == null ? void 0 : f.heartrate) || ""}`).width) || 0, (H = this.arrowGroup) == null || H.add(new y({
|
|
600
600
|
cursor: "",
|
|
@@ -865,12 +865,12 @@ u([
|
|
|
865
865
|
w({
|
|
866
866
|
default: () => []
|
|
867
867
|
})
|
|
868
|
-
], p.prototype, "
|
|
868
|
+
], p.prototype, "enlargeGains", 2);
|
|
869
869
|
u([
|
|
870
870
|
w({
|
|
871
871
|
default: () => []
|
|
872
872
|
})
|
|
873
|
-
], p.prototype, "
|
|
873
|
+
], p.prototype, "enlargeSpeeds", 2);
|
|
874
874
|
u([
|
|
875
875
|
w({
|
|
876
876
|
default: () => ({
|
|
@@ -49,12 +49,12 @@ export default class Methods extends Vue {
|
|
|
49
49
|
/** 心电相关配置 */
|
|
50
50
|
protected conventionalECGConfig: MXConventionalECGConfig | null;
|
|
51
51
|
/** 所有增益配置 */
|
|
52
|
-
protected
|
|
52
|
+
protected enlargeGains: {
|
|
53
53
|
name: string;
|
|
54
54
|
value: number;
|
|
55
55
|
}[];
|
|
56
56
|
/** 所有走纸速度 */
|
|
57
|
-
protected
|
|
57
|
+
protected enlargeSpeeds: {
|
|
58
58
|
name: string;
|
|
59
59
|
value: number;
|
|
60
60
|
}[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var T = Object.defineProperty, b = Object.defineProperties;
|
|
2
2
|
var Q = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var M = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
4
|
+
var G = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var D = (e, t, a) => t in e ? T(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, c = (e, t) => {
|
|
6
6
|
for (var a in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
G.call(t, a) && D(e, a, t[a]);
|
|
8
8
|
if (M)
|
|
9
9
|
for (var a of M(t))
|
|
10
|
-
|
|
10
|
+
W.call(t, a) && D(e, a, t[a]);
|
|
11
11
|
return e;
|
|
12
12
|
}, y = (e, t) => b(e, Q(t));
|
|
13
13
|
import K from "vue";
|
|
@@ -17,7 +17,7 @@ import { Prop as h } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2
|
|
|
17
17
|
import { Watch as w } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Watch.js";
|
|
18
18
|
import { AnalysisMode as F, AnalyseParameterTable as O, LeadNameTexts as S, getLeadpoint as z, getActualY as H, calcDistance as X, calcPRInterval as j, calcPD as E, calcQRSD as _, calcQTAndQTCAndQTD as k, caclTD as q, calcTA as $, toFixedFun as m, calcPstate as Y, calcPA as J, calcQRS as U, calcSTJA as Z, clacST as ee, calcIaddIIaddIII as te, calcRv5 as ae, calcSv1 as se, calcPelectricAxis as ie, calcQRSelectricAxis as ne, calcTelectricAxis as re, calcMs as le, getStepForSpeed as he } from "@costy-plus/utils";
|
|
19
19
|
import { throttleDecorator as oe } from "../utils/tool.js";
|
|
20
|
-
import { util as R, Polyline as P, Text as V, Group as x, Line as
|
|
20
|
+
import { util as R, Polyline as P, Text as V, Group as x, Line as ue, Circle as de } from "zrender";
|
|
21
21
|
var ce = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, r = (e, t, a, s) => {
|
|
22
22
|
for (var i = s > 1 ? void 0 : s ? ye(t, a) : t, l = e.length - 1, o; l >= 0; l--)
|
|
23
23
|
(o = e[l]) && (i = (s ? o(t, a, i) : o(i)) || i);
|
|
@@ -75,8 +75,8 @@ let n = class extends K {
|
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
destroyed() {
|
|
78
|
-
var e, t, a, s, i, l, o,
|
|
79
|
-
(e = this.waveFromGroup) == null || e.removeAll(), (t = this.measureGroup) == null || t.removeAll(), (a = this.M1) == null || a.removeAll(), (s = this.M2) == null || s.removeAll(), (i = this.P1) == null || i.removeAll(), (l = this.P2) == null || l.removeAll(), (o = this.R1) == null || o.removeAll(), (
|
|
78
|
+
var e, t, a, s, i, l, o, u, d, f, p;
|
|
79
|
+
(e = this.waveFromGroup) == null || e.removeAll(), (t = this.measureGroup) == null || t.removeAll(), (a = this.M1) == null || a.removeAll(), (s = this.M2) == null || s.removeAll(), (i = this.P1) == null || i.removeAll(), (l = this.P2) == null || l.removeAll(), (o = this.R1) == null || o.removeAll(), (u = this.R2) == null || u.removeAll(), (d = this.T1) == null || d.removeAll(), (f = this.T2) == null || f.removeAll();
|
|
80
80
|
try {
|
|
81
81
|
(p = this.sceneIns) == null || p.dispose();
|
|
82
82
|
} catch (A) {
|
|
@@ -91,7 +91,7 @@ let n = class extends K {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
created() {
|
|
94
|
-
this.modifyAnalysed = /* @__PURE__ */ new Map(), this.resetDefaultValue(), this.currentGainIdx = this.
|
|
94
|
+
this.modifyAnalysed = /* @__PURE__ */ new Map(), this.resetDefaultValue(), this.currentGainIdx = this.enlargeGains.findIndex((e) => e.value === this.sens / this.gridConfig.cellMg), this.currentSpeedIdx = this.enlargeSpeeds.findIndex((e) => e.value === this.speedValue), this.currentLeadAnalyseValueIdx = this.analyseValue.findIndex((e) => {
|
|
95
95
|
var t;
|
|
96
96
|
return e.BeatID === ((t = this.activeLeadAnalyseValue) == null ? void 0 : t.BeatID);
|
|
97
97
|
}), this.currentSens = this.sens * this.magnification, this.currentSpeedValue = this.speedValue, this.currentStep = this.step * this.magnification, this.currentLeadAnalyseValue = R.clone(this.activeLeadAnalyseValue), this.complexAnalysisvalue = R.clone(this.analyseValue[0]) || null, this.isSyncAnalyseValueCheck && (this.isSyncAnalyseValue = !0), this.processEnlargeAnalysisData();
|
|
@@ -206,9 +206,9 @@ let n = class extends K {
|
|
|
206
206
|
cursor: "",
|
|
207
207
|
name: `${i}`,
|
|
208
208
|
shape: {
|
|
209
|
-
points: l.map((
|
|
210
|
-
|
|
211
|
-
-
|
|
209
|
+
points: l.map((u, d) => [
|
|
210
|
+
d * this.currentStep + this.drawWaveFromX,
|
|
211
|
+
-u + e
|
|
212
212
|
])
|
|
213
213
|
},
|
|
214
214
|
style: {
|
|
@@ -227,9 +227,9 @@ let n = class extends K {
|
|
|
227
227
|
const s = this.containerWH.height / 2;
|
|
228
228
|
(l = this.waveFromIns) == null || l.attr({
|
|
229
229
|
shape: {
|
|
230
|
-
points: e.map((
|
|
231
|
-
|
|
232
|
-
-
|
|
230
|
+
points: e.map((u, d) => [
|
|
231
|
+
d * this.currentStep + this.drawWaveFromX,
|
|
232
|
+
-u + s
|
|
233
233
|
])
|
|
234
234
|
}
|
|
235
235
|
}), (o = this.waveFromIns) == null || o.show();
|
|
@@ -258,7 +258,7 @@ let n = class extends K {
|
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
260
|
drawMeasureLine() {
|
|
261
|
-
var a, s, i, l, o,
|
|
261
|
+
var a, s, i, l, o, u, d, f, p, A, L, v, g, I;
|
|
262
262
|
this.measureGroup ? (this.measureGroup.removeAll(), (a = this.sceneIns) == null || a.remove(this.measureGroup)) : this.measureGroup = new x({
|
|
263
263
|
name: "measureGroup"
|
|
264
264
|
});
|
|
@@ -276,7 +276,7 @@ let n = class extends K {
|
|
|
276
276
|
t
|
|
277
277
|
), this.R1 = this.createMeasureLineGroup(
|
|
278
278
|
"R1",
|
|
279
|
-
((((
|
|
279
|
+
((((d = (u = this.currentLeadAnalyseValue) == null ? void 0 : u.KeyPosByBeat) == null ? void 0 : d.QRSstart) || 0) - this.startPos) * this.currentStep + this.drawWaveFromX,
|
|
280
280
|
t
|
|
281
281
|
), this.R2 = this.createMeasureLineGroup(
|
|
282
282
|
"R2",
|
|
@@ -298,7 +298,7 @@ let n = class extends K {
|
|
|
298
298
|
draggable: "horizontal",
|
|
299
299
|
ondrag: this.measureLineDrag
|
|
300
300
|
}), i = this.containerWH.height - this.bottomSafeAreaH;
|
|
301
|
-
return s.add(new
|
|
301
|
+
return s.add(new ue({
|
|
302
302
|
cursor: "w-resize",
|
|
303
303
|
name: `Line_${e}`,
|
|
304
304
|
shape: {
|
|
@@ -308,7 +308,7 @@ let n = class extends K {
|
|
|
308
308
|
y2: i
|
|
309
309
|
},
|
|
310
310
|
style: a
|
|
311
|
-
})), s.add(new
|
|
311
|
+
})), s.add(new de({
|
|
312
312
|
name: "Circle",
|
|
313
313
|
x: t,
|
|
314
314
|
y: i,
|
|
@@ -420,7 +420,7 @@ let n = class extends K {
|
|
|
420
420
|
this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
|
|
421
421
|
this.sampleRate
|
|
422
422
|
))), this.measureLineMoveInfo.name === "" || this.measureLineMoveInfo.name === "R1" || this.measureLineMoveInfo.name === "T2") {
|
|
423
|
-
const { QT:
|
|
423
|
+
const { QT: u, QTC: d } = k(
|
|
424
424
|
this.currentLeadAnalyseValue.KeyPosByBeat.Tend,
|
|
425
425
|
this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
|
|
426
426
|
this.analyseValue,
|
|
@@ -428,7 +428,7 @@ let n = class extends K {
|
|
|
428
428
|
((s = this.currentLeadAnalyseValue) == null ? void 0 : s.BeatID) || 0,
|
|
429
429
|
this.sampleRate
|
|
430
430
|
);
|
|
431
|
-
this.enlargeAnalysisData.QT = Math.round(
|
|
431
|
+
this.enlargeAnalysisData.QT = Math.round(u), this.enlargeAnalysisData.QTc = Math.round(d || (Array.isArray(this.enlargeAnalysisData.QTc) ? this.enlargeAnalysisData.QTc[0] : this.enlargeAnalysisData.QTc));
|
|
432
432
|
}
|
|
433
433
|
if (this.measureLineMoveInfo.name === "" || this.measureLineMoveInfo.name === "T1" || this.measureLineMoveInfo.name === "T2") {
|
|
434
434
|
this.enlargeAnalysisData.Td = Math.round(q(
|
|
@@ -436,32 +436,32 @@ let n = class extends K {
|
|
|
436
436
|
this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,
|
|
437
437
|
this.sampleRate
|
|
438
438
|
));
|
|
439
|
-
const { TA:
|
|
439
|
+
const { TA: u } = $(y(c({}, e), {
|
|
440
440
|
Tstart: this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,
|
|
441
441
|
Tend: this.currentLeadAnalyseValue.KeyPosByBeat.Tend,
|
|
442
442
|
QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
|
|
443
443
|
TPpeak: this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak
|
|
444
444
|
}));
|
|
445
|
-
this.enlargeAnalysisData.TtypeA = m(
|
|
445
|
+
this.enlargeAnalysisData.TtypeA = m(u || 0, 2);
|
|
446
446
|
}
|
|
447
447
|
if (this.enlargeAnalysisData.Ptype = Y(y(c({}, e), {
|
|
448
448
|
Pstart: this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,
|
|
449
449
|
Pend: this.currentLeadAnalyseValue.KeyPosByBeat.Pend,
|
|
450
450
|
data: this.longdata
|
|
451
451
|
})) || "", this.measureLineMoveInfo.name === "" || this.measureLineMoveInfo.name === "P1" || this.measureLineMoveInfo.name === "P2") {
|
|
452
|
-
const { PA:
|
|
452
|
+
const { PA: u } = J(y(c({}, e), {
|
|
453
453
|
Pstart: this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,
|
|
454
454
|
Pend: this.currentLeadAnalyseValue.KeyPosByBeat.Pend,
|
|
455
455
|
PPpeak: this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak
|
|
456
456
|
}));
|
|
457
|
-
this.enlargeAnalysisData.PtypeA = m(
|
|
457
|
+
this.enlargeAnalysisData.PtypeA = m(u || 0, 2);
|
|
458
458
|
}
|
|
459
459
|
if (this.measureLineMoveInfo.name === "" || this.measureLineMoveInfo.name === "R1" || this.measureLineMoveInfo.name === "R2") {
|
|
460
|
-
const { qrs_morph_type:
|
|
460
|
+
const { qrs_morph_type: u, QA: d, QD: f, RA: p, RD: A, SD: L, RPD: v, SA: g, RPA: I } = U(y(c({}, e), {
|
|
461
461
|
QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
|
|
462
462
|
QRSend: this.currentLeadAnalyseValue.KeyPosByBeat.QRSend
|
|
463
463
|
}));
|
|
464
|
-
this.enlargeAnalysisData.QRStype =
|
|
464
|
+
this.enlargeAnalysisData.QRStype = u || "", this.enlargeAnalysisData.QtypeA = m(d || 0, 2), this.enlargeAnalysisData.QD = Math.round(f || 0), this.enlargeAnalysisData.RtypeA = m(p || 0, 2), this.enlargeAnalysisData.StypeA = m(g || 0, 2), this.enlargeAnalysisData.RPA = m(I || 0, 2), this.enlargeAnalysisData.RD = m(A || 0, 2), this.enlargeAnalysisData.SD = m(L || 0, 2), this.enlargeAnalysisData.RPD = m(v || 0, 2);
|
|
465
465
|
const B = Z(
|
|
466
466
|
e.start_pos,
|
|
467
467
|
this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
|
|
@@ -547,34 +547,33 @@ let n = class extends K {
|
|
|
547
547
|
this.difference.timeDifference = l;
|
|
548
548
|
const o = parseInt(
|
|
549
549
|
`${(a - this.drawWaveFromX) / this.currentStep}`
|
|
550
|
-
),
|
|
550
|
+
), u = parseInt(
|
|
551
551
|
`${(s - this.drawWaveFromX) / this.currentStep}`
|
|
552
552
|
);
|
|
553
|
-
let
|
|
554
|
-
if (this.leadNameActive.val === -1 ?
|
|
555
|
-
const g = (Math.abs(u
|
|
553
|
+
let d = [];
|
|
554
|
+
if (this.leadNameActive.val === -1 ? d = ((A = this.waveFromGroup) == null ? void 0 : A.childAt(this.waveFromGroup.childCount() - 1)).shape.points || [] : d = ((L = this.waveFromIns) == null ? void 0 : L.shape.points) || [], u > 0 && o > 0 && u <= d.length - 1 && o <= d.length - 1) {
|
|
555
|
+
const g = (Math.abs(d[u][1] - d[o][1]) / this.currentSens).toFixed(2);
|
|
556
556
|
this.difference.amplitudeDifference = g;
|
|
557
557
|
} else
|
|
558
558
|
this.difference.amplitudeDifference = "";
|
|
559
559
|
}
|
|
560
560
|
toggleGain(e) {
|
|
561
561
|
if (e) {
|
|
562
|
-
this.currentGainIdx < this.
|
|
562
|
+
this.currentGainIdx < this.enlargeGains.length - 1 && (this.currentGainIdx += 1, this.currentSens = this.enlargeGains[this.currentGainIdx].value * this.gridConfig.cellMg * this.magnification, this.toggleRender());
|
|
563
563
|
return;
|
|
564
564
|
}
|
|
565
|
-
this.currentGainIdx > 0 && this.currentGainIdx <= this.
|
|
565
|
+
this.currentGainIdx > 0 && this.currentGainIdx <= this.enlargeGains.length - 1 && (this.currentGainIdx -= 1, this.currentSens = this.enlargeGains[this.currentGainIdx].value * this.gridConfig.cellMg * this.magnification, this.toggleRender());
|
|
566
566
|
}
|
|
567
567
|
toggleSpeeds(e) {
|
|
568
|
-
console.log("toggleSpeed", this.speeds, this.currentSpeedIdx);
|
|
569
568
|
const t = () => {
|
|
570
569
|
const a = he(this.currentSpeedValue, this.gridConfig.cellMg, this.sampleRate);
|
|
571
570
|
this.currentStep = a * this.magnification;
|
|
572
571
|
};
|
|
573
572
|
if (e) {
|
|
574
|
-
this.currentSpeedIdx < this.
|
|
573
|
+
this.currentSpeedIdx < this.enlargeSpeeds.length - 1 && (this.currentSpeedIdx += 1, this.currentSpeedValue = this.enlargeSpeeds[this.currentSpeedIdx].value, t(), this.toggleRender());
|
|
575
574
|
return;
|
|
576
575
|
}
|
|
577
|
-
this.currentSpeedIdx > 0 && this.currentSpeedIdx <= this.
|
|
576
|
+
this.currentSpeedIdx > 0 && this.currentSpeedIdx <= this.enlargeSpeeds.length - 1 && (this.currentSpeedIdx -= 1, this.currentSpeedValue = this.enlargeSpeeds[this.currentSpeedIdx].value, t(), this.toggleRender());
|
|
578
577
|
}
|
|
579
578
|
toggleBeaadId(e) {
|
|
580
579
|
var t, a, s, i, l, o;
|
|
@@ -734,12 +733,12 @@ r([
|
|
|
734
733
|
h({
|
|
735
734
|
default: () => []
|
|
736
735
|
})
|
|
737
|
-
], n.prototype, "
|
|
736
|
+
], n.prototype, "enlargeGains", 2);
|
|
738
737
|
r([
|
|
739
738
|
h({
|
|
740
739
|
default: () => []
|
|
741
740
|
})
|
|
742
|
-
], n.prototype, "
|
|
741
|
+
], n.prototype, "enlargeSpeeds", 2);
|
|
743
742
|
r([
|
|
744
743
|
w("activeLeadIdx")
|
|
745
744
|
], n.prototype, "watchActiveLeadIdx", 1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var u=function(){var t,i,l,o,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var u=function(){var t,i,l,r,o,s,n,g,d,v,c,h,a=this,f=a.$createElement,e=a._self._c||f;return e("div",{style:{width:`${a.width}px`,height:`${a.height}px`},attrs:{id:"ecg-wave-form-main"}},[e("MXBackgroundGrid",{attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"grid-config":a.gridConfig,"layer-id":"MXGrid"}}),a.measurRulerConfig.isShow?e("MXMeasuringRuler",a._g({staticClass:"measuring-ruler",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"cell-mg":a.gridConfig.cellMg,"speed-value":((t=a.formatEcgData)===null||t===void 0?void 0:t.speed)||0,sens:a.formatEcgData.sens}},a.$listeners)):a._e(),a.paralleRulerConfig.isShow?e("MXParallelRuler",a._g({staticClass:"parallel-ruler",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"cell-mg":a.gridConfig.cellMg,"speed-value":((i=a.formatEcgData)===null||i===void 0?void 0:i.speed)||0,sens:a.formatEcgData.sens,"heart-rate":a.ventricularRate}},a.$listeners)):a._e(),a.magnifierRulerConfig.isShow?e("MXMagnifierWave",{staticClass:"magnifier-wave",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"grid-config":a.gridConfig,"speed-value":((l=a.formatEcgData)===null||l===void 0?void 0:l.speed)||0,sens:a.formatEcgData.sens,step:((r=a.formatEcgData)===null||r===void 0?void 0:r.step)||0,"lead-head-config":a.leadHeadConfig,"wave-data":a.waveDataCopy,"add-wave-data":a.addWaveDataCopy,"single-wave-data":a.singleWaveDataCopy,"long-lead-config":a.longLeadConfig,"split-block-height":a.splitBlockHeight,"split-point":a.splitPoint,"lead-config":a.leadConfig,"heart-fight":a.heartFight,"normal-lead-names":((o=a.formatEcgData)===null||o===void 0?void 0:o.processedData.otherParams.LeadName)||[]}}):a._e(),a.isShowEnlargeWave?e("MXEnlargeWave",a._g({staticClass:"enlarge-wave",attrs:{"is-show-enlarge-wave":a.isShowEnlargeWave,width:a.MXEnlargeWaveWH.width,height:a.MXEnlargeWaveWH.height,"grid-config":a.gridConfig,"speed-value":((s=a.formatEcgData)===null||s===void 0?void 0:s.speed)||0,sens:a.formatEcgData.sens,step:((n=a.formatEcgData)===null||n===void 0?void 0:n.step)||0,"sample-rate":((g=a.formatEcgData)===null||g===void 0?void 0:g.processedData.otherParams.SampleRate)||0,sensitivity:((d=a.formatEcgData)===null||d===void 0?void 0:d.processedData.otherParams.Sensitivity)||0,"normal-data":((v=a.formatEcgData)===null||v===void 0?void 0:v.processedData.originData.Data)||[],"complex-data":((c=a.formatEcgData)===null||c===void 0?void 0:c.processedData.originData.ComplexData)||[],"lead-name-list":a.leadNameList,"lead-head-config":a.leadHeadConfig,"active-lead-idx":a.activeLeadIdx,"active-lead-analyse-value":a.activeLeadAnalyseValue,"analyse-value":((h=a.formatEcgData)===null||h===void 0?void 0:h.processedData.otherParams.AnalyseValue)||[],"enlarge-wave-mode":a.enlargeWaveMode,"conventional-e-c-g-config":a.conventionalECGConfig,"is-sync-analyse-value-check":a.isSyncAnalyseValueCheck,"enlarge-gains":a.enlargeGains,"enlarge-speeds":a.enlargeSpeeds},on:{"update:isShowEnlargeWave":function(m){a.isShowEnlargeWave=m},"update:is-show-enlarge-wave":function(m){a.isShowEnlargeWave=m}}},a.$listeners)):a._e(),e("div",{attrs:{id:"wave-from-box"}}),e("div",{staticClass:"scroll-box",style:{width:`${a.width}px`,height:`${a.height}px`}},[e("vueScroll",{ref:"vueScroll",attrs:{ops:a.vuescrollConfig},on:{"handle-scroll":a.handleScroll}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})])],1)],1)},p=[];exports.render=u;exports.staticRenderFns=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var B=Object.defineProperty,R=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var k=(e,t,a)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,W=(e,t)=>{for(var a in t||(t={}))N.call(t,a)&&k(e,a,t[a]);if(O)for(var a of O(t))z.call(t,a)&&k(e,a,t[a]);return e},A=(e,t)=>R(e,T(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("vue"),_=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_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),v=require("@costy-plus/utils"),u=require("zrender"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},X=$(j);var q=Object.defineProperty,V=Object.getOwnPropertyDescriptor,c=(e,t,a,i)=>{for(var s=i>1?void 0:i?V(t,a):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,a,s):n(s))||s);return i&&s&&q(t,a,s),s};exports.default=class extends X.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(100),this.dataTotalTimes=Object.freeze(0),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({Data:{maxPoints:0,minPoints:0},ComplexData:{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=-1,this.activeLeadAnalyseValue=null,this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0),this.isShowEnlargeWave=!1}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.vuescrollConfig.isShow&&parseInt(`${(e=this.vuescrollConfig.bar)==null?void 0:e.size}`)||0)||0}}get waveFromData(){var e,t,a;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===v.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((a=this.formatEcgData)==null?void 0:a.processedData.handleData.Data)||[[]]}get isSingleMode(){return this.leadModel.column===1&&this.leadModel.line===1}get MXEnlargeWaveWH(){let e=this.width,t=this.height;return this.MXEnlargeWaveWidth&&(e=this.MXEnlargeWaveWidth),this.MXEnlargeWaveHeight&&(t=this.MXEnlargeWaveHeight),{width:e,height:t}}destroyed(){var e,t,a,i,s,o,n,l,r,h,d;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(a=this.addwaveFromGroup)==null||a.removeAll(),(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.sceneIns)==null||d.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.vuescrollConfig.isShow?this.$nextTick(()=>{var t,a;this.$refs.vueScroll.scrollBy({dx:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((a=this.formatEcgData)==null?void 0:a.step)||0)})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){var a;(a=this.sceneIns)==null||a.dispose(),this.AssistCtx=null;const e=document.getElementById("wave-from-box");this.sceneIns=u.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById("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)}sceneInsEventOff(){var e,t,a;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(a=this.sceneIns)==null||a.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,a,i,s,o,n,l,r,h,d,m;this.rowAndColwaveFromGroup=new u.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new u.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new u.Group({name:"addwaveFrom"}),this.leadHeadGroup=new u.Group({name:"leadHead"}),this.splitLineGroup=new u.Group({name:"splitLine"}),this.leadHeadNameGroup=new u.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new u.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new u.Group({name:"ruler"}),this.arrowGroup=new u.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new u.Group({name:"heardBeatLine"}),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.ecgareawidth)==="1"){const p=v.getPrintLengthToPx(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;p<=e&&(e=p)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||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=((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=(l=this.formatEcgData)==null?void 0:l.calcHighestAndLowestPoint(),this.isSingleMode?(this.splitBlockHeight=(((r=this.formatEcgData)==null?void 0:r.analysisValueMode)===v.AnalysisMode.CompoundWave?Math.abs(this.highestAndLowestPoint.ComplexData.maxPoints)+Math.abs(this.highestAndLowestPoint.ComplexData.minPoints):Math.abs(this.highestAndLowestPoint.Data.maxPoints)+Math.abs(this.highestAndLowestPoint.Data.minPoints))+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6)):this.splitBlockHeight=this.drawArea.height/this.totalRows,this.dataTotalTimes=v.getDataLenTimes(this.waveFromData[0].length||0,((h=this.formatEcgData)==null?void 0:h.processedData.otherParams.SampleRate)||0),this.rulerStep=(((d=this.formatEcgData)==null?void 0:d.step)||1)*(((m=this.formatEcgData)==null?void 0:m.processedData.otherParams.SampleRate)||1)/(this.gridConfig.cellMg*2+2)}isLeadOff(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadOff)||[]).includes(e)}isLeadDel(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadDelete)||[]).includes(e)}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const a=Date.now(),i=()=>{var m,p,g,C;const s=e.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let n=0,l=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let r=v.getPointIdxForPx(n,((m=this.formatEcgData)==null?void 0:m.step)||1);r+=l;const h=((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(r<=h[1].KeyPosByBeat.Tend+.1*(((g=this.formatEcgData)==null?void 0:g.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(r>h[D-1].KeyPosByBeat.Tend+1&&r<h[D].KeyPosByBeat.Tend+.1*(((C=this.formatEcgData)==null?void 0:C.processedData.otherParams.SampleRate)||0)){d=h[D];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=A(W({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};a-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,i()):this.dbClickWaveFromTime=a}sceneInsMousemove(e){this.sceneIsMouseDown&&this.$refs.vueScroll.scrollBy({dx:e.offsetX-this.sceneIsMouseDownX})}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}createLeadHead(e,t,a){var o;const i=this.leadHeadConfig.leadHedeWidth/4;let s=((o=this.formatEcgData)==null?void 0:o.sens)||0;return s=a?s/2:s,new u.Polyline({cursor:"",shape:{points:[[0+e,0+t],[i+e,0+t],[i+e,-s+t],[3*i+e,-s+t],[3*i+e,0+t],[4*i+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,a){var i,s;return new u.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(a?(((i=this.formatEcgData)==null?void 0:i.sens)||0)/2:((s=this.formatEcgData)==null?void 0:s.sens)||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var a,i,s,o,n,l;(a=this.leadHeadGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.leadHeadGroup);let e=0,t=!1;for(let r=1;r<=this.totalRows;r++)e=0,t=!1,r<=this.leadModel.line?e=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[r-1]||0:r>this.leadModel.line&&r-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[r-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[e])&&(t=!0),(n=this.leadHeadGroup)==null||n.add(this.createLeadHead(0,r*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var s,o,n,l,r,h,d,m,p,g,C,D,P;(s=this.splitLineGroup)==null||s.removeAll(),(o=this.sceneIns)==null||o.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;if(this.splitPoint=e,this.isSingleMode){const I=v.getDataLenTimes(Math.ceil(this.splitPoint/(((n=this.formatEcgData)==null?void 0:n.step)||1))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),y=parseInt(`${I/1e3%60}`,10);this.splitPoint=y*(((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)}let t=0,a=0,i=0;for(let I=1;I<=this.leadModel.column-1;I++){t=I*e+this.leadHeadConfig.leadHedeWidth,a=I*this.leadModel.line;for(let y=1;y<=this.leadModel.line&&(i=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[y-1+a],i!==void 0);y++)((m=this.formatEcgData)==null?void 0:m.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[i])?(g=this.splitLineGroup)==null||g.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((p=this.formatEcgData)==null?void 0:p.sens)||0)/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((C=this.formatEcgData)==null?void 0:C.sens)||0)*.5))}(P=this.sceneIns)==null||P.add(this.splitLineGroup)}initSlidingWindowInfo(){var i,s;const e=((i=this.formatEcgData)==null?void 0:i.step)||0,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.vuescrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint);const a=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:a,startInd:0,endInd:a}}getRednerSinglePoints(){let e=0,t=0;const a=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let i=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],n=Math.ceil(a.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let r=1;r<=n;r++)t=r*this.splitBlockHeight,r>1&&(t*=.8,i=s,s=i+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:i,endInd:s,data:a.slice(i,s).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return o}getRednerPoints(){let e=0,t=0,a=0,i=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(s=o,o=s+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(t=r*this.splitBlockHeight,!(a>(this.waveFromData||[]).length-1));r++)i=this.waveFromData[a]||[],a++,r===1&&(this.loopArrowY.rowAndCol=t),n.push({pos:[e,t],startInd:s,endInd:o,data:i.slice(s,o).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return n}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let a=0,i=0,s=[];for(let o=0;o<this.leadModel.add;o++)i=this.longLeadConfig.leadIdxs[o],a=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[i]||[],o===0&&(this.loopArrowY.add=a),e.push({pos:[t,a],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((n,l)=>{var r;return[l*(((r=this.formatEcgData)==null?void 0:r.step)||0),-n]})});return e}createSingleWaveFrom(){var o,n,l,r,h,d,m;(o=this.singleWaveFromGroup)==null||o.removeAll();const e=(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),a=v.getDataLenTimes(this.slidingWindowInfo.points||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),i=0,s=0;for(let p=0;p<t.length&&!(t[p].pos[1]>this.drawArea.height+this.bottomAreaHeight);p++)this.isLeadDel(e)||(i=parseInt(`${a/1e3/60}`,10),s=parseInt(`${a/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,(r=this.singleWaveFromGroup)==null||r.add(new u.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+p,shape:{points:t[p].data.map(([g,C])=>[g+t[p].pos[0],C+t[p].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:g=>{this.onDbClickWaveFrom(g,"single")}})),(d=this.singleWaveFromGroup)==null||d.add(new u.Text({cursor:"",style:{x:t[p].pos[0],y:t[p].pos[1]-(((h=this.formatEcgData)==null?void 0:h.sens)||0)/2,text:p===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),p>0&&(a+=a));this.createLeadName(e,t[0].pos[0]-10,t[0].pos[1]+10),this.createLeadOffAndDel(e,t[0].pos[0]-5,t[0].pos[1]-(((m=this.formatEcgData)==null?void 0:m.sens)||0)/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,a;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let i=0;i<e.length;i++)this.isLeadDel(this.longLeadConfig.leadIdxs[i])||((t=this.addwaveFromGroup)==null||t.add(new u.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[i]+"_"+i,shape:{points:e[i].data.map(([s,o])=>[s+e[i].pos[0],o+e[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[i],e[i].pos[0],e[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[i],e[i].pos[0]-5,e[i].pos[1]-(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var a,i,s,o,n,l;console.time("createRowAndColWaveFrom"),(a=this.rowAndColwaveFromGroup)==null||a.removeAll();let e=this.getRednerPoints(),t=0;for(let r=0;r<e.length;r++)t=(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.LeadName)||[])[r]||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new u.Polyline({cursor:"",name:r+"_"+r,shape:{points:e[r].data.map(([h,d])=>[h+e[r].pos[0],d+e[r].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),r<this.leadModel.line?(this.createLeadName(t,e[r].pos[0],e[r].pos[1]-15),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(t,e[r].pos[0]+5,e[r].pos[1]-(((n=this.formatEcgData)==null?void 0:n.sens)||0)/2),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,a,i=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new u.Text({style:{x:t,y:a,text:v.LeadNameTexts[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})},onclick:o=>{this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})}}))}createLeadOffAndDel(e,t,a){var i;(this.isLeadOff(e)||this.isLeadDel(e))&&((i=this.leadHeadOffAndDelGroup)==null||i.add(new u.Text({cursor:"",style:{x:t,y:a,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var i,s,o,n,l,r;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new u.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.drawArea.height+this.bottomAreaHeight-25},e)}),a=new u.Text({style:W({text:`${((i=this.formatEcgData)==null?void 0:i.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(s=this.formatEcgData)==null?void 0:s.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(n=this.formatEcgData)==null?void 0:n.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.drawArea.height+this.bottomAreaHeight-40},e)});(l=this.sceneIns)==null||l.add(a),(r=this.sceneIns)==null||r.add(t)}drawRuler(e=0){var o,n,l,r,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let a=this.leadHeadConfig.leadHedeWidth,i=0,s=t;if(this.leadModel.isContinuous)s=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=v.getPointIdxForPx(this.splitPoint,this.formatEcgData.step),m=v.getDataLenTimes(d,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)/1e3;s=e+m}for(let d=e;d<=s;d=+(d+.1).toFixed(1))d!==e&&(a+=this.rulerStep),d%1===0?(i=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new u.Text({cursor:"",style:{x:a,y:i-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):i=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new u.Line({cursor:"",shape:{x1:a,y1:i,x2:a,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,a;this.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),(a=this.sceneIns)==null||a.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(),this.drawLoopArrow()}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}drawLoopArrow(e=0){var l,r,h,d,m,p,g,C,D,P,I,y,E,S,x,G,M;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=((l=this.formatEcgData)==null?void 0:l.heartBeatPosition[this.heartFight.defaultSelect])||null,this.drawHeardBeatLine());let t=0,a=0;this.leadModel.add?a=this.loopArrowY.add-(((r=this.formatEcgData)==null?void 0:r.sens)||0)-this.splitBlockHeight/3.5:a=20;let i=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let n=0;for(let H=0;H<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;H++){const f=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[H];if(n=((f==null?void 0:f.position)||0)-e,!(e>((f==null?void 0:f.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&n>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&n>(this.slidingWindowInfo.points||0))){if(((f==null?void 0:f.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=n*(((m=this.formatEcgData)==null?void 0:m.step)||0)+this.leadHeadConfig.leadHedeWidth-9.5,s=0,(C=this.arrowGroup)==null||C.add(new u.Polygon({name:"arrow_box",shape:{points:[[4+t,0+a],[15+t,0+a],[15+t,10+a],[19+t,10+a],[9.5+t,22+a],[0+t,10+a],[4+t,10+a],[4+t,0+a]]},style:{fill:((g=(p=this.currentHeardBeat)==null?void 0:p.heardBeat)==null?void 0:g.index)===(f==null?void 0:f.index)?"blue":"#ccc"},onclick:F=>{var b;!this.heartFight.mode||(F.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(L=>L.name==="arrow_box").forEach(L=>{L.id!==F.target.id&&L.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(f,F.target))}})),this.heartFight.heartrate&&(i=((D=this.AssistCtx)==null?void 0:D.measureText(`${(f==null?void 0:f.heartrate)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(i=((I=this.AssistCtx)==null?void 0:I.measureText(`${(f==null?void 0:f.interval)||""}`).width)||0,(y=this.arrowGroup)==null||y.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(i=((E=this.AssistCtx)==null?void 0:E.measureText(`${(f==null?void 0:f.qrstCompany)||""}`).width)||0,(S=this.arrowGroup)==null||S.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(i=((x=this.AssistCtx)==null?void 0:x.measureText(`${(f==null?void 0:f.telectricalaxis)||""}`).width)||0,(G=this.arrowGroup)==null||G.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.telectricalaxis)||""}`},o)})))}}(M=this.sceneIns)==null||M.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",u.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,l,r,h,d,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,a=0,i=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const p in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(p)&&Object.prototype.hasOwnProperty.call(t,p)){a=(t[p]-this.slidingWindowInfo.startInd)*(((r=this.formatEcgData)==null?void 0:r.step)||0);e:for(let g=0;g<i.length;g++)if(!(this.isLeadOff(g)||this.isLeadDel(g))){if(e>t[p]||!this.leadModel.isContinuous&&t[p]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=i[g],this.leadModel.isContinuous&&g>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}e:for(let g=0;g<s.length;g++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[g])&&this.isLeadDel(this.longLeadConfig.leadIdxs[g]))){if(e>t[p])break e;o=s[g],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}}(m=this.sceneIns)==null||m.add(this.heardBeatLineGroup),t=null,i=null,s=null}createHeardBeatLine(e,t){return new u.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}handleScroll(e,t,a){var i;if(t.type==="horizontal"){t.scrollLeft=t.scrollLeft||0;const s=v.getPointIdxForPx(t.scrollLeft,((i=this.formatEcgData)==null?void 0:i.step)||1);this.scrollWaveFrom(s),this.scrollRuler(s),this.scrollArrow(s),this.$emit("notifyScrollPointIdx",s)}}scrollWaveFrom(e){var i,s;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(),a=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=a,(i=this.rowAndColwaveFromGroup)==null||i.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:t[n].data.map(([l,r])=>[l+t[n].pos[0],r+t[n].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:a[n].data.map(([l,r])=>[l+a[n].pos[0],r+a[n].pos[1]])}})}),t=null,a=null}scrollRuler(e){var a,i,s;(a=this.rulerGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.rulerGroup);const t=v.getDataLenTimes(this.isSingleMode?0:e,((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,a;(t=this.arrowGroup)==null||t.removeAll(),(a=this.sceneIns)==null||a.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:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);c([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);c([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);c([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);c([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);c([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);c([w.Prop({default:()=>({isShow:!0,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"vuescrollConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);c([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);c([w.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"gains",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"speeds",2);c([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);c([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);c([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([_.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";var B=Object.defineProperty,R=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var k=(e,t,a)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,W=(e,t)=>{for(var a in t||(t={}))N.call(t,a)&&k(e,a,t[a]);if(O)for(var a of O(t))z.call(t,a)&&k(e,a,t[a]);return e},A=(e,t)=>R(e,T(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("vue"),_=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_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),v=require("@costy-plus/utils"),u=require("zrender"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},X=$(j);var q=Object.defineProperty,V=Object.getOwnPropertyDescriptor,c=(e,t,a,i)=>{for(var s=i>1?void 0:i?V(t,a):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,a,s):n(s))||s);return i&&s&&q(t,a,s),s};exports.default=class extends X.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(100),this.dataTotalTimes=Object.freeze(0),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({Data:{maxPoints:0,minPoints:0},ComplexData:{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=-1,this.activeLeadAnalyseValue=null,this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0),this.isShowEnlargeWave=!1}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.vuescrollConfig.isShow&&parseInt(`${(e=this.vuescrollConfig.bar)==null?void 0:e.size}`)||0)||0}}get waveFromData(){var e,t,a;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===v.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((a=this.formatEcgData)==null?void 0:a.processedData.handleData.Data)||[[]]}get isSingleMode(){return this.leadModel.column===1&&this.leadModel.line===1}get MXEnlargeWaveWH(){let e=this.width,t=this.height;return this.MXEnlargeWaveWidth&&(e=this.MXEnlargeWaveWidth),this.MXEnlargeWaveHeight&&(t=this.MXEnlargeWaveHeight),{width:e,height:t}}destroyed(){var e,t,a,i,s,o,n,l,r,h,d;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(a=this.addwaveFromGroup)==null||a.removeAll(),(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.sceneIns)==null||d.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.vuescrollConfig.isShow?this.$nextTick(()=>{var t,a;this.$refs.vueScroll.scrollBy({dx:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((a=this.formatEcgData)==null?void 0:a.step)||0)})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){var a;(a=this.sceneIns)==null||a.dispose(),this.AssistCtx=null;const e=document.getElementById("wave-from-box");this.sceneIns=u.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById("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)}sceneInsEventOff(){var e,t,a;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(a=this.sceneIns)==null||a.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,a,i,s,o,n,l,r,h,d,m;this.rowAndColwaveFromGroup=new u.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new u.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new u.Group({name:"addwaveFrom"}),this.leadHeadGroup=new u.Group({name:"leadHead"}),this.splitLineGroup=new u.Group({name:"splitLine"}),this.leadHeadNameGroup=new u.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new u.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new u.Group({name:"ruler"}),this.arrowGroup=new u.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new u.Group({name:"heardBeatLine"}),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.ecgareawidth)==="1"){const p=v.getPrintLengthToPx(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;p<=e&&(e=p)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||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=((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=(l=this.formatEcgData)==null?void 0:l.calcHighestAndLowestPoint(),this.isSingleMode?(this.splitBlockHeight=(((r=this.formatEcgData)==null?void 0:r.analysisValueMode)===v.AnalysisMode.CompoundWave?Math.abs(this.highestAndLowestPoint.ComplexData.maxPoints)+Math.abs(this.highestAndLowestPoint.ComplexData.minPoints):Math.abs(this.highestAndLowestPoint.Data.maxPoints)+Math.abs(this.highestAndLowestPoint.Data.minPoints))+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6)):this.splitBlockHeight=this.drawArea.height/this.totalRows,this.dataTotalTimes=v.getDataLenTimes(this.waveFromData[0].length||0,((h=this.formatEcgData)==null?void 0:h.processedData.otherParams.SampleRate)||0),this.rulerStep=(((d=this.formatEcgData)==null?void 0:d.step)||1)*(((m=this.formatEcgData)==null?void 0:m.processedData.otherParams.SampleRate)||1)/(this.gridConfig.cellMg*2+2)}isLeadOff(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadOff)||[]).includes(e)}isLeadDel(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadDelete)||[]).includes(e)}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const a=Date.now(),i=()=>{var m,p,g,C;const s=e.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let n=0,l=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let r=v.getPointIdxForPx(n,((m=this.formatEcgData)==null?void 0:m.step)||1);r+=l;const h=((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(r<=h[1].KeyPosByBeat.Tend+.1*(((g=this.formatEcgData)==null?void 0:g.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(r>h[D-1].KeyPosByBeat.Tend+1&&r<h[D].KeyPosByBeat.Tend+.1*(((C=this.formatEcgData)==null?void 0:C.processedData.otherParams.SampleRate)||0)){d=h[D];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=A(W({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};a-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,i()):this.dbClickWaveFromTime=a}sceneInsMousemove(e){this.sceneIsMouseDown&&this.$refs.vueScroll.scrollBy({dx:e.offsetX-this.sceneIsMouseDownX})}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}createLeadHead(e,t,a){var o;const i=this.leadHeadConfig.leadHedeWidth/4;let s=((o=this.formatEcgData)==null?void 0:o.sens)||0;return s=a?s/2:s,new u.Polyline({cursor:"",shape:{points:[[0+e,0+t],[i+e,0+t],[i+e,-s+t],[3*i+e,-s+t],[3*i+e,0+t],[4*i+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,a){var i,s;return new u.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(a?(((i=this.formatEcgData)==null?void 0:i.sens)||0)/2:((s=this.formatEcgData)==null?void 0:s.sens)||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var a,i,s,o,n,l;(a=this.leadHeadGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.leadHeadGroup);let e=0,t=!1;for(let r=1;r<=this.totalRows;r++)e=0,t=!1,r<=this.leadModel.line?e=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[r-1]||0:r>this.leadModel.line&&r-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[r-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[e])&&(t=!0),(n=this.leadHeadGroup)==null||n.add(this.createLeadHead(0,r*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var s,o,n,l,r,h,d,m,p,g,C,D,P;(s=this.splitLineGroup)==null||s.removeAll(),(o=this.sceneIns)==null||o.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;if(this.splitPoint=e,this.isSingleMode){const I=v.getDataLenTimes(Math.ceil(this.splitPoint/(((n=this.formatEcgData)==null?void 0:n.step)||1))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),y=parseInt(`${I/1e3%60}`,10);this.splitPoint=y*(((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)}let t=0,a=0,i=0;for(let I=1;I<=this.leadModel.column-1;I++){t=I*e+this.leadHeadConfig.leadHedeWidth,a=I*this.leadModel.line;for(let y=1;y<=this.leadModel.line&&(i=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[y-1+a],i!==void 0);y++)((m=this.formatEcgData)==null?void 0:m.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[i])?(g=this.splitLineGroup)==null||g.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((p=this.formatEcgData)==null?void 0:p.sens)||0)/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((C=this.formatEcgData)==null?void 0:C.sens)||0)*.5))}(P=this.sceneIns)==null||P.add(this.splitLineGroup)}initSlidingWindowInfo(){var i,s;const e=((i=this.formatEcgData)==null?void 0:i.step)||0,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.vuescrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint);const a=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:a,startInd:0,endInd:a}}getRednerSinglePoints(){let e=0,t=0;const a=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let i=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],n=Math.ceil(a.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let r=1;r<=n;r++)t=r*this.splitBlockHeight,r>1&&(t*=.8,i=s,s=i+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:i,endInd:s,data:a.slice(i,s).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return o}getRednerPoints(){let e=0,t=0,a=0,i=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(s=o,o=s+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(t=r*this.splitBlockHeight,!(a>(this.waveFromData||[]).length-1));r++)i=this.waveFromData[a]||[],a++,r===1&&(this.loopArrowY.rowAndCol=t),n.push({pos:[e,t],startInd:s,endInd:o,data:i.slice(s,o).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return n}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let a=0,i=0,s=[];for(let o=0;o<this.leadModel.add;o++)i=this.longLeadConfig.leadIdxs[o],a=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[i]||[],o===0&&(this.loopArrowY.add=a),e.push({pos:[t,a],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((n,l)=>{var r;return[l*(((r=this.formatEcgData)==null?void 0:r.step)||0),-n]})});return e}createSingleWaveFrom(){var o,n,l,r,h,d,m;(o=this.singleWaveFromGroup)==null||o.removeAll();const e=(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),a=v.getDataLenTimes(this.slidingWindowInfo.points||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),i=0,s=0;for(let p=0;p<t.length&&!(t[p].pos[1]>this.drawArea.height+this.bottomAreaHeight);p++)this.isLeadDel(e)||(i=parseInt(`${a/1e3/60}`,10),s=parseInt(`${a/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,(r=this.singleWaveFromGroup)==null||r.add(new u.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+p,shape:{points:t[p].data.map(([g,C])=>[g+t[p].pos[0],C+t[p].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:g=>{this.onDbClickWaveFrom(g,"single")}})),(d=this.singleWaveFromGroup)==null||d.add(new u.Text({cursor:"",style:{x:t[p].pos[0],y:t[p].pos[1]-(((h=this.formatEcgData)==null?void 0:h.sens)||0)/2,text:p===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),p>0&&(a+=a));this.createLeadName(e,t[0].pos[0]-10,t[0].pos[1]+10),this.createLeadOffAndDel(e,t[0].pos[0]-5,t[0].pos[1]-(((m=this.formatEcgData)==null?void 0:m.sens)||0)/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,a;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let i=0;i<e.length;i++)this.isLeadDel(this.longLeadConfig.leadIdxs[i])||((t=this.addwaveFromGroup)==null||t.add(new u.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[i]+"_"+i,shape:{points:e[i].data.map(([s,o])=>[s+e[i].pos[0],o+e[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[i],e[i].pos[0],e[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[i],e[i].pos[0]-5,e[i].pos[1]-(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var a,i,s,o,n,l;console.time("createRowAndColWaveFrom"),(a=this.rowAndColwaveFromGroup)==null||a.removeAll();let e=this.getRednerPoints(),t=0;for(let r=0;r<e.length;r++)t=(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.LeadName)||[])[r]||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new u.Polyline({cursor:"",name:r+"_"+r,shape:{points:e[r].data.map(([h,d])=>[h+e[r].pos[0],d+e[r].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),r<this.leadModel.line?(this.createLeadName(t,e[r].pos[0],e[r].pos[1]-15),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(t,e[r].pos[0]+5,e[r].pos[1]-(((n=this.formatEcgData)==null?void 0:n.sens)||0)/2),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,a,i=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new u.Text({style:{x:t,y:a,text:v.LeadNameTexts[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})},onclick:o=>{this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})}}))}createLeadOffAndDel(e,t,a){var i;(this.isLeadOff(e)||this.isLeadDel(e))&&((i=this.leadHeadOffAndDelGroup)==null||i.add(new u.Text({cursor:"",style:{x:t,y:a,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var i,s,o,n,l,r;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new u.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.drawArea.height+this.bottomAreaHeight-25},e)}),a=new u.Text({style:W({text:`${((i=this.formatEcgData)==null?void 0:i.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(s=this.formatEcgData)==null?void 0:s.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(n=this.formatEcgData)==null?void 0:n.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.drawArea.height+this.bottomAreaHeight-40},e)});(l=this.sceneIns)==null||l.add(a),(r=this.sceneIns)==null||r.add(t)}drawRuler(e=0){var o,n,l,r,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let a=this.leadHeadConfig.leadHedeWidth,i=0,s=t;if(this.leadModel.isContinuous)s=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=v.getPointIdxForPx(this.splitPoint,this.formatEcgData.step),m=v.getDataLenTimes(d,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)/1e3;s=e+m}for(let d=e;d<=s;d=+(d+.1).toFixed(1))d!==e&&(a+=this.rulerStep),d%1===0?(i=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new u.Text({cursor:"",style:{x:a,y:i-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):i=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new u.Line({cursor:"",shape:{x1:a,y1:i,x2:a,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,a;this.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),(a=this.sceneIns)==null||a.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(),this.drawLoopArrow()}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}drawLoopArrow(e=0){var l,r,h,d,m,p,g,C,D,P,I,y,S,E,x,G,M;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=((l=this.formatEcgData)==null?void 0:l.heartBeatPosition[this.heartFight.defaultSelect])||null,this.drawHeardBeatLine());let t=0,a=0;this.leadModel.add?a=this.loopArrowY.add-(((r=this.formatEcgData)==null?void 0:r.sens)||0)-this.splitBlockHeight/3.5:a=20;let i=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let n=0;for(let H=0;H<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;H++){const f=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[H];if(n=((f==null?void 0:f.position)||0)-e,!(e>((f==null?void 0:f.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&n>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&n>(this.slidingWindowInfo.points||0))){if(((f==null?void 0:f.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=n*(((m=this.formatEcgData)==null?void 0:m.step)||0)+this.leadHeadConfig.leadHedeWidth-9.5,s=0,(C=this.arrowGroup)==null||C.add(new u.Polygon({name:"arrow_box",shape:{points:[[4+t,0+a],[15+t,0+a],[15+t,10+a],[19+t,10+a],[9.5+t,22+a],[0+t,10+a],[4+t,10+a],[4+t,0+a]]},style:{fill:((g=(p=this.currentHeardBeat)==null?void 0:p.heardBeat)==null?void 0:g.index)===(f==null?void 0:f.index)?"blue":"#ccc"},onclick:F=>{var b;!this.heartFight.mode||(F.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(L=>L.name==="arrow_box").forEach(L=>{L.id!==F.target.id&&L.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(f,F.target))}})),this.heartFight.heartrate&&(i=((D=this.AssistCtx)==null?void 0:D.measureText(`${(f==null?void 0:f.heartrate)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(i=((I=this.AssistCtx)==null?void 0:I.measureText(`${(f==null?void 0:f.interval)||""}`).width)||0,(y=this.arrowGroup)==null||y.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(i=((S=this.AssistCtx)==null?void 0:S.measureText(`${(f==null?void 0:f.qrstCompany)||""}`).width)||0,(E=this.arrowGroup)==null||E.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(i=((x=this.AssistCtx)==null?void 0:x.measureText(`${(f==null?void 0:f.telectricalaxis)||""}`).width)||0,(G=this.arrowGroup)==null||G.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.telectricalaxis)||""}`},o)})))}}(M=this.sceneIns)==null||M.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",u.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,l,r,h,d,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,a=0,i=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const p in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(p)&&Object.prototype.hasOwnProperty.call(t,p)){a=(t[p]-this.slidingWindowInfo.startInd)*(((r=this.formatEcgData)==null?void 0:r.step)||0);e:for(let g=0;g<i.length;g++)if(!(this.isLeadOff(g)||this.isLeadDel(g))){if(e>t[p]||!this.leadModel.isContinuous&&t[p]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=i[g],this.leadModel.isContinuous&&g>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}e:for(let g=0;g<s.length;g++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[g])&&this.isLeadDel(this.longLeadConfig.leadIdxs[g]))){if(e>t[p])break e;o=s[g],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}}(m=this.sceneIns)==null||m.add(this.heardBeatLineGroup),t=null,i=null,s=null}createHeardBeatLine(e,t){return new u.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}handleScroll(e,t,a){var i;if(t.type==="horizontal"){t.scrollLeft=t.scrollLeft||0;const s=v.getPointIdxForPx(t.scrollLeft,((i=this.formatEcgData)==null?void 0:i.step)||1);this.scrollWaveFrom(s),this.scrollRuler(s),this.scrollArrow(s),this.$emit("notifyScrollPointIdx",s)}}scrollWaveFrom(e){var i,s;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(),a=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=a,(i=this.rowAndColwaveFromGroup)==null||i.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:t[n].data.map(([l,r])=>[l+t[n].pos[0],r+t[n].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:a[n].data.map(([l,r])=>[l+a[n].pos[0],r+a[n].pos[1]])}})}),t=null,a=null}scrollRuler(e){var a,i,s;(a=this.rulerGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.rulerGroup);const t=v.getDataLenTimes(this.isSingleMode?0:e,((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,a;(t=this.arrowGroup)==null||t.removeAll(),(a=this.sceneIns)==null||a.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:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);c([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);c([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);c([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);c([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);c([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);c([w.Prop({default:()=>({isShow:!0,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"vuescrollConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);c([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);c([w.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);c([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);c([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);c([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([_.default({name:"Methods"})],exports.default);
|
|
@@ -49,12 +49,12 @@ export default class Methods extends Vue {
|
|
|
49
49
|
/** 心电相关配置 */
|
|
50
50
|
protected conventionalECGConfig: MXConventionalECGConfig | null;
|
|
51
51
|
/** 所有增益配置 */
|
|
52
|
-
protected
|
|
52
|
+
protected enlargeGains: {
|
|
53
53
|
name: string;
|
|
54
54
|
value: number;
|
|
55
55
|
}[];
|
|
56
56
|
/** 所有走纸速度 */
|
|
57
|
-
protected
|
|
57
|
+
protected enlargeSpeeds: {
|
|
58
58
|
name: string;
|
|
59
59
|
value: number;
|
|
60
60
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty,D=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var S=(e,t,a)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,c=(e,t)=>{for(var a in t||(t={}))R.call(t,a)&&S(e,a,t[a]);if(x)for(var a of x(t))w.call(t,a)&&S(e,a,t[a]);return e},y=(e,t)=>D(e,F(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("vue"),b=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_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),V=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Watch.js"),n=require("@costy-plus/utils"),C=require("../utils/tool.js"),m=require("zrender"),Q=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},W=Q(T);var G=Object.defineProperty,K=Object.getOwnPropertyDescriptor,r=(e,t,a,s)=>{for(var i=s>1?void 0:s?K(t,a):t,l=e.length-1,h;l>=0;l--)(h=e[l])&&(i=(s?h(t,a,i):h(i))||i);return s&&i&&G(t,a,i),i};exports.default=class extends W.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=n.AnalyseParameterTable,this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.modifyAnalysed=Object.freeze(null),this.measureLineMoveInfo=Object.freeze({x:0,findIdx:0,name:"",offLeftX:0}),this.measureLineList=Object.freeze([]),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.isSyncAnalyseValue=!1,this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0,this.currentLeadAnalyseValue=null,this.complexAnalysisvalue=Object.freeze(null),this.enlargeAnalysisData=null,this.difference={timeDifference:0,amplitudeDifference:""}}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(a=>a.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,a)=>{var s;return this.activeLeadIdx===a&&((s=this.leadNameIns)==null||s.attr({style:{text:n.LeadNameTexts[t]}}),this.leadNameActive={name:n.LeadNameTexts[t],val:a}),{name:n.LeadNameTexts[t],val:a}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,l,h,u,d,f,p;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(a=this.M1)==null||a.removeAll(),(s=this.M2)==null||s.removeAll(),(i=this.P1)==null||i.removeAll(),(l=this.P2)==null||l.removeAll(),(h=this.R1)==null||h.removeAll(),(u=this.R2)==null||u.removeAll(),(d=this.T1)==null||d.removeAll(),(f=this.T2)==null||f.removeAll();try{(p=this.sceneIns)==null||p.dispose()}catch(A){}}resetDefaultValue(){this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0}}created(){this.modifyAnalysed=new Map,this.resetDefaultValue(),this.currentGainIdx=this.gains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.speeds.findIndex(e=>e.value===this.speedValue),this.currentLeadAnalyseValueIdx=this.analyseValue.findIndex(e=>{var t;return e.BeatID===((t=this.activeLeadAnalyseValue)==null?void 0:t.BeatID)}),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.currentLeadAnalyseValue=m.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=m.util.clone(this.analyseValue[0])||null,this.isSyncAnalyseValueCheck&&(this.isSyncAnalyseValue=!0),this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i;this.enlargeAnalysisData=y(c({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.complexAnalysisvalue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.complexAnalysisvalue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QTc:""})}selectLeadName(e){var t;this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var s,i;const t=this.containerWH.height/2,a=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((s=this.sceneIns)==null||s.remove(this.leadHeadIns)),this.leadHeadIns=new m.Polyline({cursor:"",shape:{points:[[0+0,0+t],[a+0,0+t],[a+0,-this.currentSens+t],[3*a+0,-this.currentSens+t],[3*a+0,0+t],[4*a+0,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(i=this.sceneIns)==null||i.add(this.leadHeadIns)}createLeadName(){var e;this.leadNameIns=new m.Text({style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(e=this.sceneIns)==null||e.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new m.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new m.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}drawAllLead(){var t,a,s;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new m.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let i=0;i<this.leadNames.length-1;i++){const{beatData:l,startPos:h}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=h,this.waveFromLenPX=l.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new m.Polyline({cursor:"",name:`${i}`,shape:{points:l.map((u,d)=>[d*this.currentStep+this.drawWaveFromX,-u+e])},style:{stroke:this.leadColors[i]||this.leadColors[i%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(s=this.sceneIns)==null||s.add(this.waveFromGroup)}drawSingleLead(){var i,l,h;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=a;const s=this.containerWH.height/2;(l=this.waveFromIns)==null||l.attr({shape:{points:e.map((u,d)=>[d*this.currentStep+this.drawWaveFromX,-u+s])}}),(h=this.waveFromIns)==null||h.show()}getWaveFrom(e,t){var a;if(e=e!==void 0?e:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val,this.typeClass==="ECG"){const{beatData:s,startPos:i}=n.getLeadpoint({ComplexData:this.complexData,Data:this.normalData,AnalyseValue:this.analyseValue,BeatID:e,leadIdx:t,SampleRate:this.sampleRate});return{originData:s,beatData:s.map(l=>n.getActualY(this.sensitivity,l,this.currentSens)),startPos:i}}return{originData:[],beatData:[],startPos:-1}}drawMeasureLine(){var a,s,i,l,h,u,d,f,p,A,L,g,v,P;this.measureGroup?(this.measureGroup.removeAll(),(a=this.sceneIns)==null||a.remove(this.measureGroup)):this.measureGroup=new m.Group({name:"measureGroup"});const e=n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification),t={stroke:"#FF09FF",lineWidth:1.5};this.M1=this.createMeasureLineGroup("M1",this.drawWaveFromX+10,t),this.M2=this.createMeasureLineGroup("M2",this.drawWaveFromX+10+e,t),t.stroke="blue",this.P1=this.createMeasureLineGroup("P1",((((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.KeyPosByBeat)==null?void 0:i.Pstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.P2=this.createMeasureLineGroup("P2",((((h=(l=this.currentLeadAnalyseValue)==null?void 0:l.KeyPosByBeat)==null?void 0:h.Pend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R1=this.createMeasureLineGroup("R1",((((d=(u=this.currentLeadAnalyseValue)==null?void 0:u.KeyPosByBeat)==null?void 0:d.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R2=this.createMeasureLineGroup("R2",((((p=(f=this.currentLeadAnalyseValue)==null?void 0:f.KeyPosByBeat)==null?void 0:p.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T1=this.createMeasureLineGroup("T1",((((L=(A=this.currentLeadAnalyseValue)==null?void 0:A.KeyPosByBeat)==null?void 0:L.Tstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T2=this.createMeasureLineGroup("T2",((((v=(g=this.currentLeadAnalyseValue)==null?void 0:g.KeyPosByBeat)==null?void 0:v.Tend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.measureGroup.add(this.M1),this.measureGroup.add(this.M2),this.measureGroup.add(this.P1),this.measureGroup.add(this.P2),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.T1),this.measureGroup.add(this.T2),(P=this.sceneIns)==null||P.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new m.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new m.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new m.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new m.Text({cursor:"",name:"Text",style:{x:t-7,y:i+12+10,text:e,fontSize:12,fill:"#000",fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1"}})),e!=="M1"&&e!=="M2"&&(this.measureLineList=[...this.measureLineList,{ins:s,x:t}].sort((l,h)=>l.x-h.x)),s}measureLineDrag(e){e.target.name==="M1"||e.target.name==="M2"?this.calculatedValue():this.calcMeasureLineMove(e)}calcMeasureLineMove(e){if(e.target.name!==this.measureLineMoveInfo.name){const a=this.measureLineList.findIndex(s=>s.ins.name===e.target.name);this.measureLineMoveInfo.findIdx=a,this.measureLineMoveInfo.name=e.target.name}if(this.measureLineMoveInfo.findIdx===-1)return;let t=0;if(this.calcMeasureLineOffx(),this.measureLineMoveInfo.findIdx===0){const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t<this.drawWaveFromX||t>a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else if(this.measureLineMoveInfo.findIdx===this.measureLineList.length-1){const a=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(!a)return;if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>this.waveFromLenPX+this.drawWaveFromX||t<a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else{const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1],s=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>a.x+a.ins.x-1.5||t<s.x+s.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}this.measureLineMoveInfo.x=e.target.x}calcMeasureLineOffx(){var t,a,s;const e=Math.round((this.measureLineMoveInfo.offLeftX-this.drawWaveFromX)/this.currentStep)+this.startPos;switch(this.measureLineMoveInfo.name){case"P1":this.currentLeadAnalyseValue.KeyPosByBeat.Pstart=e;break;case"P2":this.currentLeadAnalyseValue.KeyPosByBeat.Pend=e;break;case"R1":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R2":this.currentLeadAnalyseValue.KeyPosByBeat.QRSend=e;break;case"T1":this.currentLeadAnalyseValue.KeyPosByBeat.Tstart=e;break;case"T2":this.currentLeadAnalyseValue.KeyPosByBeat.Tend=e;break}if(this.electricAxisAnalyse(),this.processEnlargeAnalysis(),this.isShowSyncAnalyseValue){const i=c(c({},((t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)||{}),this.enlargeAnalysisData);this.modifyAnalysed.set(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,y(c({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i,l,h;const e={start_pos:this.startPos,Sensitivity:this.sensitivity,SampleRate:this.sampleRate,longdata:this.longdata};if((this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="R1")&&(this.enlargeAnalysisData.PR=Math.round(n.calcPRInterval(this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2")&&(this.enlargeAnalysisData.Pd=Math.round(n.calcPD(this.currentLeadAnalyseValue.KeyPosByBeat.Pend,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="T2"){const{QT:u,QTC:d}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.QTd_algorithm)||1),((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(u),this.enlargeAnalysisData.QTc=Math.round(d||(Array.isArray(this.enlargeAnalysisData.QTc)?this.enlargeAnalysisData.QTc[0]:this.enlargeAnalysisData.QTc))}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.Td=Math.round(n.caclTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,this.sampleRate));const{TA:u}=n.calcTA(y(c({},e),{Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}));this.enlargeAnalysisData.TtypeA=n.toFixedFun(u||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,data:this.longdata}))||"",this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){const{PA:u}=n.calcPA(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(u||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){const{qrs_morph_type:u,QA:d,QD:f,RA:p,RD:A,SD:L,RPD:g,SA:v,RPA:P}=n.calcQRS(y(c({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.QRStype=u||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(d||0,2),this.enlargeAnalysisData.QD=Math.round(f||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(p||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(P||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(A||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(g||0,2);const I=n.calcSTJA(e.start_pos,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,e.Sensitivity,e.longdata);this.enlargeAnalysisData.STJtypeA=n.toFixedFun(I||0,2),this.enlargeAnalysisData.STstate=n.clacST(I||0,e.longdata)||"";const B=n.calcIaddIIaddIII(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(B,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((l=this.currentLeadAnalyseValue)==null?void 0:l.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.SV1Amp=n.toFixedFun(n.calcSv1(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((h=this.currentLeadAnalyseValue)==null?void 0:h.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+""}}electricAxisAnalyse(){var a;const e={ComplexData:this.complexData,Data:this.normalData,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,SampleRate:this.sampleRate,Sensitivity:this.sensitivity,leadNameList:this.leadNameList,start_pos:this.startPos};if(this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){this.enlargeAnalysisData.PAxis=n.calcPelectricAxis(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend}));return}const t=()=>{let s=Math.abs(this.enlargeAnalysisData.QRSAxis-this.enlargeAnalysisData.TAxis);s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart})),t();return}if(this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.TAxis=n.calcTelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend})),t();return}}calculatedValue(){var f,p,A,L;const e=(f=this.M1)==null?void 0:f.childOfName("Line_M1"),t=(p=this.M2)==null?void 0:p.childOfName("Line_M2");if(!e||!t)return;const a=e.shape.x1+(e.transform&&e.transform[4]||0),s=t.shape.x1+(t.transform&&t.transform[4]||0),i=Math.abs(a-s),l=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=l;const h=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),u=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let d=[];if(this.leadNameActive.val===-1?d=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:d=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],u>0&&h>0&&u<=d.length-1&&h<=d.length-1){const v=(Math.abs(d[u][1]-d[h][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=v}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.gains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.gains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender());return}this.currentGainIdx>0&&this.currentGainIdx<=this.gains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.gains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender())}toggleSpeeds(e){console.log("toggleSpeed",this.speeds,this.currentSpeedIdx);const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification};if(e){this.currentSpeedIdx<this.speeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.speeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.speeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.speeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var t,a,s,i,l,h;e?this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatCount)||0})):this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatCount)||0})),this.enlargeAnalysisData.PAxis=((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.AnabyBeat)==null?void 0:i.PAxis)||0,this.enlargeAnalysisData.TAxis=((h=(l=this.currentLeadAnalyseValue)==null?void 0:l.AnabyBeat)==null?void 0:h.TAxis)||0,this.toggleRender()}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom(),this.drawMeasureLine(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1),this.isShowSyncAnalyseValue&&this.isSyncAnalyseValue&&this.$emit("notifyModifyAnalyse",this.modifyAnalysed)):this.dbClickTime=e}};r([o.Prop({default:()=>""})],exports.default.prototype,"className",2);r([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);r([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);r([o.Prop({required:!0})],exports.default.prototype,"gridConfig",2);r([o.Prop({required:!0})],exports.default.prototype,"speedValue",2);r([o.Prop({default:1})],exports.default.prototype,"sens",2);r([o.Prop({default:1})],exports.default.prototype,"step",2);r([o.Prop({required:!0})],exports.default.prototype,"sampleRate",2);r([o.Prop({required:!0})],exports.default.prototype,"sensitivity",2);r([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);r([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);r([o.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);r([o.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);r([o.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);r([o.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);r([o.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);r([o.Prop({default:5})],exports.default.prototype,"magnification",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);r([o.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);r([o.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);r([o.Prop({required:!0})],exports.default.prototype,"analyseValue",2);r([o.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);r([o.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);r([o.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);r([o.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"gains",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"speeds",2);r([V.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);r([V.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);r([C.throttleDecorator(500)],exports.default.prototype,"calcMeasureLineOffx",1);exports.default=r([b.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";var M=Object.defineProperty,D=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var x=(e,t,a)=>t in e?M(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,c=(e,t)=>{for(var a in t||(t={}))R.call(t,a)&&x(e,a,t[a]);if(S)for(var a of S(t))w.call(t,a)&&x(e,a,t[a]);return e},y=(e,t)=>D(e,F(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("vue"),b=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_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),V=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Watch.js"),n=require("@costy-plus/utils"),C=require("../utils/tool.js"),m=require("zrender"),G=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Q=G(T);var W=Object.defineProperty,K=Object.getOwnPropertyDescriptor,r=(e,t,a,s)=>{for(var i=s>1?void 0:s?K(t,a):t,l=e.length-1,h;l>=0;l--)(h=e[l])&&(i=(s?h(t,a,i):h(i))||i);return s&&i&&W(t,a,i),i};exports.default=class extends Q.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=n.AnalyseParameterTable,this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.modifyAnalysed=Object.freeze(null),this.measureLineMoveInfo=Object.freeze({x:0,findIdx:0,name:"",offLeftX:0}),this.measureLineList=Object.freeze([]),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.isSyncAnalyseValue=!1,this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0,this.currentLeadAnalyseValue=null,this.complexAnalysisvalue=Object.freeze(null),this.enlargeAnalysisData=null,this.difference={timeDifference:0,amplitudeDifference:""}}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(a=>a.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,a)=>{var s;return this.activeLeadIdx===a&&((s=this.leadNameIns)==null||s.attr({style:{text:n.LeadNameTexts[t]}}),this.leadNameActive={name:n.LeadNameTexts[t],val:a}),{name:n.LeadNameTexts[t],val:a}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,l,h,u,d,f,p;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(a=this.M1)==null||a.removeAll(),(s=this.M2)==null||s.removeAll(),(i=this.P1)==null||i.removeAll(),(l=this.P2)==null||l.removeAll(),(h=this.R1)==null||h.removeAll(),(u=this.R2)==null||u.removeAll(),(d=this.T1)==null||d.removeAll(),(f=this.T2)==null||f.removeAll();try{(p=this.sceneIns)==null||p.dispose()}catch(A){}}resetDefaultValue(){this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0}}created(){this.modifyAnalysed=new Map,this.resetDefaultValue(),this.currentGainIdx=this.enlargeGains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.enlargeSpeeds.findIndex(e=>e.value===this.speedValue),this.currentLeadAnalyseValueIdx=this.analyseValue.findIndex(e=>{var t;return e.BeatID===((t=this.activeLeadAnalyseValue)==null?void 0:t.BeatID)}),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.currentLeadAnalyseValue=m.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=m.util.clone(this.analyseValue[0])||null,this.isSyncAnalyseValueCheck&&(this.isSyncAnalyseValue=!0),this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i;this.enlargeAnalysisData=y(c({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.complexAnalysisvalue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.complexAnalysisvalue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QTc:""})}selectLeadName(e){var t;this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var s,i;const t=this.containerWH.height/2,a=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((s=this.sceneIns)==null||s.remove(this.leadHeadIns)),this.leadHeadIns=new m.Polyline({cursor:"",shape:{points:[[0+0,0+t],[a+0,0+t],[a+0,-this.currentSens+t],[3*a+0,-this.currentSens+t],[3*a+0,0+t],[4*a+0,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(i=this.sceneIns)==null||i.add(this.leadHeadIns)}createLeadName(){var e;this.leadNameIns=new m.Text({style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(e=this.sceneIns)==null||e.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new m.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new m.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}drawAllLead(){var t,a,s;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new m.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let i=0;i<this.leadNames.length-1;i++){const{beatData:l,startPos:h}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=h,this.waveFromLenPX=l.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new m.Polyline({cursor:"",name:`${i}`,shape:{points:l.map((u,d)=>[d*this.currentStep+this.drawWaveFromX,-u+e])},style:{stroke:this.leadColors[i]||this.leadColors[i%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(s=this.sceneIns)==null||s.add(this.waveFromGroup)}drawSingleLead(){var i,l,h;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=a;const s=this.containerWH.height/2;(l=this.waveFromIns)==null||l.attr({shape:{points:e.map((u,d)=>[d*this.currentStep+this.drawWaveFromX,-u+s])}}),(h=this.waveFromIns)==null||h.show()}getWaveFrom(e,t){var a;if(e=e!==void 0?e:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val,this.typeClass==="ECG"){const{beatData:s,startPos:i}=n.getLeadpoint({ComplexData:this.complexData,Data:this.normalData,AnalyseValue:this.analyseValue,BeatID:e,leadIdx:t,SampleRate:this.sampleRate});return{originData:s,beatData:s.map(l=>n.getActualY(this.sensitivity,l,this.currentSens)),startPos:i}}return{originData:[],beatData:[],startPos:-1}}drawMeasureLine(){var a,s,i,l,h,u,d,f,p,A,L,g,v,P;this.measureGroup?(this.measureGroup.removeAll(),(a=this.sceneIns)==null||a.remove(this.measureGroup)):this.measureGroup=new m.Group({name:"measureGroup"});const e=n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification),t={stroke:"#FF09FF",lineWidth:1.5};this.M1=this.createMeasureLineGroup("M1",this.drawWaveFromX+10,t),this.M2=this.createMeasureLineGroup("M2",this.drawWaveFromX+10+e,t),t.stroke="blue",this.P1=this.createMeasureLineGroup("P1",((((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.KeyPosByBeat)==null?void 0:i.Pstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.P2=this.createMeasureLineGroup("P2",((((h=(l=this.currentLeadAnalyseValue)==null?void 0:l.KeyPosByBeat)==null?void 0:h.Pend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R1=this.createMeasureLineGroup("R1",((((d=(u=this.currentLeadAnalyseValue)==null?void 0:u.KeyPosByBeat)==null?void 0:d.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R2=this.createMeasureLineGroup("R2",((((p=(f=this.currentLeadAnalyseValue)==null?void 0:f.KeyPosByBeat)==null?void 0:p.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T1=this.createMeasureLineGroup("T1",((((L=(A=this.currentLeadAnalyseValue)==null?void 0:A.KeyPosByBeat)==null?void 0:L.Tstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T2=this.createMeasureLineGroup("T2",((((v=(g=this.currentLeadAnalyseValue)==null?void 0:g.KeyPosByBeat)==null?void 0:v.Tend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.measureGroup.add(this.M1),this.measureGroup.add(this.M2),this.measureGroup.add(this.P1),this.measureGroup.add(this.P2),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.T1),this.measureGroup.add(this.T2),(P=this.sceneIns)==null||P.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new m.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new m.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new m.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new m.Text({cursor:"",name:"Text",style:{x:t-7,y:i+12+10,text:e,fontSize:12,fill:"#000",fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1"}})),e!=="M1"&&e!=="M2"&&(this.measureLineList=[...this.measureLineList,{ins:s,x:t}].sort((l,h)=>l.x-h.x)),s}measureLineDrag(e){e.target.name==="M1"||e.target.name==="M2"?this.calculatedValue():this.calcMeasureLineMove(e)}calcMeasureLineMove(e){if(e.target.name!==this.measureLineMoveInfo.name){const a=this.measureLineList.findIndex(s=>s.ins.name===e.target.name);this.measureLineMoveInfo.findIdx=a,this.measureLineMoveInfo.name=e.target.name}if(this.measureLineMoveInfo.findIdx===-1)return;let t=0;if(this.calcMeasureLineOffx(),this.measureLineMoveInfo.findIdx===0){const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t<this.drawWaveFromX||t>a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else if(this.measureLineMoveInfo.findIdx===this.measureLineList.length-1){const a=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(!a)return;if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>this.waveFromLenPX+this.drawWaveFromX||t<a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else{const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1],s=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>a.x+a.ins.x-1.5||t<s.x+s.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}this.measureLineMoveInfo.x=e.target.x}calcMeasureLineOffx(){var t,a,s;const e=Math.round((this.measureLineMoveInfo.offLeftX-this.drawWaveFromX)/this.currentStep)+this.startPos;switch(this.measureLineMoveInfo.name){case"P1":this.currentLeadAnalyseValue.KeyPosByBeat.Pstart=e;break;case"P2":this.currentLeadAnalyseValue.KeyPosByBeat.Pend=e;break;case"R1":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R2":this.currentLeadAnalyseValue.KeyPosByBeat.QRSend=e;break;case"T1":this.currentLeadAnalyseValue.KeyPosByBeat.Tstart=e;break;case"T2":this.currentLeadAnalyseValue.KeyPosByBeat.Tend=e;break}if(this.electricAxisAnalyse(),this.processEnlargeAnalysis(),this.isShowSyncAnalyseValue){const i=c(c({},((t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)||{}),this.enlargeAnalysisData);this.modifyAnalysed.set(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,y(c({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i,l,h;const e={start_pos:this.startPos,Sensitivity:this.sensitivity,SampleRate:this.sampleRate,longdata:this.longdata};if((this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="R1")&&(this.enlargeAnalysisData.PR=Math.round(n.calcPRInterval(this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2")&&(this.enlargeAnalysisData.Pd=Math.round(n.calcPD(this.currentLeadAnalyseValue.KeyPosByBeat.Pend,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="T2"){const{QT:u,QTC:d}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.QTd_algorithm)||1),((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(u),this.enlargeAnalysisData.QTc=Math.round(d||(Array.isArray(this.enlargeAnalysisData.QTc)?this.enlargeAnalysisData.QTc[0]:this.enlargeAnalysisData.QTc))}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.Td=Math.round(n.caclTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,this.sampleRate));const{TA:u}=n.calcTA(y(c({},e),{Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}));this.enlargeAnalysisData.TtypeA=n.toFixedFun(u||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,data:this.longdata}))||"",this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){const{PA:u}=n.calcPA(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(u||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){const{qrs_morph_type:u,QA:d,QD:f,RA:p,RD:A,SD:L,RPD:g,SA:v,RPA:P}=n.calcQRS(y(c({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.QRStype=u||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(d||0,2),this.enlargeAnalysisData.QD=Math.round(f||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(p||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(P||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(A||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(g||0,2);const I=n.calcSTJA(e.start_pos,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,e.Sensitivity,e.longdata);this.enlargeAnalysisData.STJtypeA=n.toFixedFun(I||0,2),this.enlargeAnalysisData.STstate=n.clacST(I||0,e.longdata)||"";const B=n.calcIaddIIaddIII(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(B,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((l=this.currentLeadAnalyseValue)==null?void 0:l.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.SV1Amp=n.toFixedFun(n.calcSv1(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((h=this.currentLeadAnalyseValue)==null?void 0:h.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+""}}electricAxisAnalyse(){var a;const e={ComplexData:this.complexData,Data:this.normalData,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,SampleRate:this.sampleRate,Sensitivity:this.sensitivity,leadNameList:this.leadNameList,start_pos:this.startPos};if(this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){this.enlargeAnalysisData.PAxis=n.calcPelectricAxis(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend}));return}const t=()=>{let s=Math.abs(this.enlargeAnalysisData.QRSAxis-this.enlargeAnalysisData.TAxis);s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart})),t();return}if(this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.TAxis=n.calcTelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend})),t();return}}calculatedValue(){var f,p,A,L;const e=(f=this.M1)==null?void 0:f.childOfName("Line_M1"),t=(p=this.M2)==null?void 0:p.childOfName("Line_M2");if(!e||!t)return;const a=e.shape.x1+(e.transform&&e.transform[4]||0),s=t.shape.x1+(t.transform&&t.transform[4]||0),i=Math.abs(a-s),l=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=l;const h=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),u=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let d=[];if(this.leadNameActive.val===-1?d=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:d=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],u>0&&h>0&&u<=d.length-1&&h<=d.length-1){const v=(Math.abs(d[u][1]-d[h][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=v}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.enlargeGains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender());return}this.currentGainIdx>0&&this.currentGainIdx<=this.enlargeGains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender())}toggleSpeeds(e){const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification};if(e){this.currentSpeedIdx<this.enlargeSpeeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.enlargeSpeeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var t,a,s,i,l,h;e?this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatCount)||0})):this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatCount)||0})),this.enlargeAnalysisData.PAxis=((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.AnabyBeat)==null?void 0:i.PAxis)||0,this.enlargeAnalysisData.TAxis=((h=(l=this.currentLeadAnalyseValue)==null?void 0:l.AnabyBeat)==null?void 0:h.TAxis)||0,this.toggleRender()}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom(),this.drawMeasureLine(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1),this.isShowSyncAnalyseValue&&this.isSyncAnalyseValue&&this.$emit("notifyModifyAnalyse",this.modifyAnalysed)):this.dbClickTime=e}};r([o.Prop({default:()=>""})],exports.default.prototype,"className",2);r([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);r([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);r([o.Prop({required:!0})],exports.default.prototype,"gridConfig",2);r([o.Prop({required:!0})],exports.default.prototype,"speedValue",2);r([o.Prop({default:1})],exports.default.prototype,"sens",2);r([o.Prop({default:1})],exports.default.prototype,"step",2);r([o.Prop({required:!0})],exports.default.prototype,"sampleRate",2);r([o.Prop({required:!0})],exports.default.prototype,"sensitivity",2);r([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);r([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);r([o.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);r([o.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);r([o.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);r([o.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);r([o.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);r([o.Prop({default:5})],exports.default.prototype,"magnification",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);r([o.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);r([o.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);r([o.Prop({required:!0})],exports.default.prototype,"analyseValue",2);r([o.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);r([o.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);r([o.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);r([o.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);r([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);r([V.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);r([V.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);r([C.throttleDecorator(500)],exports.default.prototype,"calcMeasureLineOffx",1);exports.default=r([b.default({name:"Methods"})],exports.default);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "costy-plus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30-0",
|
|
4
4
|
"main": "dist/lib/index.js",
|
|
5
5
|
"module": "dist/es/index.js",
|
|
6
6
|
"types": "dist/es/index.d.ts",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"description": "",
|
|
21
21
|
"typings": "lib/index.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@costy-plus/utils": "
|
|
23
|
+
"@costy-plus/utils": "0.0.6-0",
|
|
24
24
|
"element-ui": "~2.15.11",
|
|
25
25
|
"vuescroll": "~4.17.5",
|
|
26
26
|
"zrender": "5.4.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"lodash": "^4.17.21",
|
|
30
|
+
"view-design": "^4.7.0"
|
|
31
31
|
}
|
|
32
32
|
}
|