costy-plus 1.0.85-0 → 1.0.86-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.
@@ -1,5 +1,5 @@
1
1
  var C = function() {
2
- var t, i, l, o, r, s, n, g, d, v, c, h, m, f, a = this, u = a.$createElement, e = a._self._c || u;
2
+ var t, i, l, o, r, s, n, d, g, v, c, h, f, m, a = this, u = a.$createElement, e = a._self._c || u;
3
3
  return e("div", {
4
4
  style: {
5
5
  width: `${a.width}px`,
@@ -14,7 +14,7 @@ var C = function() {
14
14
  height: a.canvasContainer.height,
15
15
  "grid-config": a.gridConfig,
16
16
  magnification: a.sceneMagnification,
17
- "layer-id": "MXGrid"
17
+ "layer-id": a.prefixId + "MXGrid"
18
18
  }
19
19
  }), a.measurRulerConfig.isShow ? e("MeasuringRuler", a._g({
20
20
  staticClass: "measuring-ruler",
@@ -24,7 +24,8 @@ var C = function() {
24
24
  height: a.canvasContainer.height,
25
25
  "cell-mg": a.gridConfig.cellMg,
26
26
  "speed-value": ((t = a.formatEcgData) === null || t === void 0 ? void 0 : t.speed) || 0,
27
- sens: a.formatEcgData.sens
27
+ sens: a.formatEcgData.sens,
28
+ "prefix-id": a.prefixId
28
29
  }
29
30
  }, a.$listeners)) : a._e(), a.paralleRulerConfig.isShow ? e("MXParallelRuler", a._g({
30
31
  staticClass: "parallel-ruler",
@@ -34,7 +35,8 @@ var C = function() {
34
35
  "cell-mg": a.gridConfig.cellMg,
35
36
  "speed-value": ((i = a.formatEcgData) === null || i === void 0 ? void 0 : i.speed) || 0,
36
37
  sens: a.formatEcgData.sens,
37
- "heart-rate": a.ventricularRate
38
+ "heart-rate": a.ventricularRate,
39
+ "prefix-id": a.prefixId
38
40
  }
39
41
  }, a.$listeners)) : a._e(), a.magnifierRulerConfig.isShow ? e("MXMagnifierWave", {
40
42
  staticClass: "magnifier-wave",
@@ -54,7 +56,8 @@ var C = function() {
54
56
  "split-point": a.splitPoint,
55
57
  "lead-config": a.leadConfig,
56
58
  "heart-fight": a.heartFight,
57
- "normal-lead-names": ((r = a.formatEcgData) === null || r === void 0 ? void 0 : r.processedData.otherParams.LeadName) || []
59
+ "normal-lead-names": ((r = a.formatEcgData) === null || r === void 0 ? void 0 : r.processedData.otherParams.LeadName) || [],
60
+ "prefix-id": a.prefixId
58
61
  }
59
62
  }) : a._e(), a.isShowEnlargeWave ? e("MXEnlargeWave", a._g({
60
63
  staticClass: "enlarge-wave",
@@ -66,8 +69,8 @@ var C = function() {
66
69
  "speed-value": ((s = a.formatEcgData) === null || s === void 0 ? void 0 : s.speed) || 0,
67
70
  sens: a.formatEcgData.sens,
68
71
  step: ((n = a.formatEcgData) === null || n === void 0 ? void 0 : n.step) || 0,
69
- "sample-rate": ((g = a.formatEcgData) === null || g === void 0 ? void 0 : g.processedData.otherParams.SampleRate) || 0,
70
- sensitivity: ((d = a.formatEcgData) === null || d === void 0 ? void 0 : d.processedData.otherParams.Sensitivity) || 0,
72
+ "sample-rate": ((d = a.formatEcgData) === null || d === void 0 ? void 0 : d.processedData.otherParams.SampleRate) || 0,
73
+ sensitivity: ((g = a.formatEcgData) === null || g === void 0 ? void 0 : g.processedData.otherParams.Sensitivity) || 0,
71
74
  "normal-data": ((v = a.formatEcgData) === null || v === void 0 ? void 0 : v.processedData.originData.Data) || [],
72
75
  "complex-data": ((c = a.formatEcgData) === null || c === void 0 ? void 0 : c.processedData.originData.ComplexData) || [],
73
76
  "lead-name-list": a.leadNameList,
@@ -76,11 +79,12 @@ var C = function() {
76
79
  "active-lead-analyse-value": a.activeLeadAnalyseValue,
77
80
  "analyse-value": ((h = a.formatEcgData) === null || h === void 0 ? void 0 : h.processedData.otherParams.AnalyseValue) || [],
78
81
  "enlarge-wave-mode": a.enlargeWaveMode,
79
- "q-td-algorithm": ((m = a.conventionalECGConfig) === null || m === void 0 || (f = m.ecgReviewSetting) === null || f === void 0 ? void 0 : f.QTd_algorithm) || 1,
82
+ "q-td-algorithm": ((f = a.conventionalECGConfig) === null || f === void 0 || (m = f.ecgReviewSetting) === null || m === void 0 ? void 0 : m.QTd_algorithm) || 1,
80
83
  "is-sync-analyse-value-check": a.isSyncAnalyseValueCheck,
81
84
  "enlarge-gains": a.enlargeGains,
82
85
  "lead-name-texts-porps": a.LeadNameTextsPorps,
83
- "enlarge-speeds": a.enlargeSpeeds
86
+ "enlarge-speeds": a.enlargeSpeeds,
87
+ "prefix-id": a.prefixId
84
88
  },
85
89
  on: {
86
90
  "update:isShowEnlargeWave": function(p) {
@@ -91,8 +95,9 @@ var C = function() {
91
95
  }
92
96
  }
93
97
  }, a.$listeners)) : a._e(), e("div", {
98
+ staticClass: "wave-from-box_container",
94
99
  attrs: {
95
- id: "wave-from-box"
100
+ id: a.prefixId + "wave-from-box"
96
101
  }
97
102
  }), e("div", {
98
103
  staticClass: "scroll-box",
@@ -101,7 +106,7 @@ var C = function() {
101
106
  height: `${a.height}px`
102
107
  }
103
108
  }, [a.scrollConfig.isNativeScroll ? e("div", {
104
- ref: "nativeScroll",
109
+ ref: a.prefixId + "nativeScroll",
105
110
  staticClass: "native-scroll",
106
111
  on: {
107
112
  scroll: a.nativeScrollFunc
@@ -113,7 +118,7 @@ var C = function() {
113
118
  height: `${a.vuescrollWH.height}px`
114
119
  }
115
120
  })]) : e("vueScroll", {
116
- ref: "vueScroll",
121
+ ref: a.prefixId + "vueScroll",
117
122
  attrs: {
118
123
  ops: a.scrollConfig
119
124
  },
@@ -127,8 +132,8 @@ var C = function() {
127
132
  height: `${a.vuescrollWH.height}px`
128
133
  }
129
134
  })])], 1)], 1);
130
- }, D = [];
135
+ }, w = [];
131
136
  export {
132
137
  C as render,
133
- D as staticRenderFns
138
+ w as staticRenderFns
134
139
  };
@@ -7,6 +7,10 @@ import { MXGridConfig } from '../../types/BackgroundGrid';
7
7
  import { HandleScrollParams } from '../../types/Common';
8
8
  import { MXMeasuringRulerConfig } from '../../types/MeasuringRuler';
9
9
  export default class Methods extends Vue {
10
+ /** 前缀 id */
11
+ protected supportTwoFingerZoom: boolean;
12
+ /** 前缀 id */
13
+ protected prefixId: string;
10
14
  protected width: number;
11
15
  protected height: number;
12
16
  protected MXEnlargeWaveWidth: number;
@@ -2,7 +2,7 @@ var Y = Object.defineProperty, V = Object.defineProperties;
2
2
  var _ = Object.getOwnPropertyDescriptors;
3
3
  var j = Object.getOwnPropertySymbols;
4
4
  var q = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
5
- var T = (e, t, i) => t in e ? Y(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, I = (e, t) => {
5
+ var T = (e, t, i) => t in e ? Y(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, y = (e, t) => {
6
6
  for (var i in t || (t = {}))
7
7
  q.call(t, i) && T(e, i, t[i]);
8
8
  if (j)
@@ -11,12 +11,12 @@ var T = (e, t, i) => t in e ? Y(e, t, { enumerable: !0, configurable: !0, writab
11
11
  return e;
12
12
  }, S = (e, t) => V(e, _(t));
13
13
  import U from "vue";
14
- import Q from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
14
+ import Z from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
15
15
  import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
16
16
  import { Prop as w } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
17
- import { AnalysisMode as M, throttling as O, getPrintLengthToPx as Z, getDataLenTimes as L, getDistance as $, getPointIdxForPx as x, LeadNameTexts as J } from "@costy-plus/utils";
17
+ import { AnalysisMode as M, throttling as O, getPrintLengthToPx as Q, getDataLenTimes as F, getDistance as $, getPointIdxForPx as x, LeadNameTexts as J } from "@costy-plus/utils";
18
18
  import * as ee from "zrender";
19
- import { Group as C, Text as W, Polyline as F, Line as b, Polygon as te, util as ie } from "zrender";
19
+ import { Group as C, Text as W, Polyline as L, Line as b, Polygon as te, util as ie } from "zrender";
20
20
  var ae = Object.defineProperty, se = Object.getOwnPropertyDescriptor, u = (e, t, i, a) => {
21
21
  for (var s = a > 1 ? void 0 : a ? se(t, i) : t, o = e.length - 1, r; o >= 0; o--)
22
22
  (r = e[o]) && (s = (a ? r(t, i, s) : r(s)) || s);
@@ -76,10 +76,10 @@ let g = class extends U {
76
76
  var e;
77
77
  this.initWaveFormPeer(), this.combinationDrawing(), (e = this.formatEcgData) != null && e.processedData.otherParams.PosStart && (this.scrollConfig.isShow ? this.$nextTick(() => {
78
78
  var t, i, a, s, o;
79
- this.scrollConfig.isNativeScroll ? (a = this.$refs.nativeScroll) == null || a.scrollBy({
79
+ this.scrollConfig.isNativeScroll ? (a = this.$refs[this.prefixId + "nativeScroll"]) == null || a.scrollBy({
80
80
  left: (((t = this.formatEcgData) == null ? void 0 : t.processedData.otherParams.PosStart) || 0) * (((i = this.formatEcgData) == null ? void 0 : i.step) || 0),
81
81
  top: 0
82
- }) : this.$refs.vueScroll.scrollTo({
82
+ }) : this.$refs[this.prefixId + "vueScroll"].scrollTo({
83
83
  dx: (((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.PosStart) || 0) * (((o = this.formatEcgData) == null ? void 0 : o.step) || 0)
84
84
  });
85
85
  }) : (this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart), this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart), this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)));
@@ -87,13 +87,13 @@ let g = class extends U {
87
87
  initWaveFormPeer() {
88
88
  var i;
89
89
  (i = this.sceneIns) == null || i.dispose(), this.AssistCtx = null;
90
- const e = document.getElementById("wave-from-box");
90
+ const e = document.getElementById(`${this.prefixId}wave-from-box`);
91
91
  this.sceneIns = ee.init(e, {
92
92
  width: this.canvasContainer.width,
93
93
  height: this.canvasContainer.height,
94
94
  devicePixelRatio: 2
95
95
  });
96
- const t = document.getElementById("MXGrid");
96
+ const t = document.getElementById(`${this.prefixId}MXGrid`);
97
97
  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);
98
98
  }
99
99
  sceneInsEventOff() {
@@ -130,7 +130,7 @@ let g = class extends U {
130
130
  }), this.vuescrollWH.width = this.width, this.originCanvasWidth = this.width, this.vuescrollWH.height = this.height;
131
131
  let e = this.canvasContainer.width;
132
132
  if (((i = (t = this.conventionalECGConfig) == null ? void 0 : t.ecgReviewSetting) == null ? void 0 : i.ecgareawidth) === "1") {
133
- const m = Z(((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.SampleRate) || 0) + this.leadHeadConfig.leadHedeWidth;
133
+ const m = Q(((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.SampleRate) || 0) + this.leadHeadConfig.leadHedeWidth;
134
134
  m <= e && (e = m);
135
135
  } else
136
136
  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);
@@ -157,7 +157,7 @@ let g = class extends U {
157
157
  let m = this.drawArea.height;
158
158
  this.leadModel.isShowPacing && (m = this.drawArea.height - this.drawBottomPacH), this.splitBlockHeight = m / this.totalRows;
159
159
  }
160
- this.dataTotalTimes = L(
160
+ this.dataTotalTimes = F(
161
161
  this.waveFromData[0].length || 0,
162
162
  ((h = this.formatEcgData) == null ? void 0 : h.processedData.otherParams.SampleRate) || 0
163
163
  ), this.rulerStep = (((d = this.formatEcgData) == null ? void 0 : d.step) || 1) * (((f = this.formatEcgData) == null ? void 0 : f.processedData.otherParams.SampleRate) || 1) / (this.gridConfig.cellMg * 2 + 2);
@@ -194,7 +194,7 @@ let g = class extends U {
194
194
  }
195
195
  } else
196
196
  d = h[0];
197
- !d || (this.activeLeadAnalyseValue = S(I({}, d), {
197
+ !d || (this.activeLeadAnalyseValue = S(y({}, d), {
198
198
  BeatCount: h.length - 1
199
199
  }), d = null, this.$emit("notifyActiveEnlargr"), this.isShowEnlargeWave = !0);
200
200
  };
@@ -204,13 +204,13 @@ let g = class extends U {
204
204
  var t;
205
205
  if (e.event.preventDefault(), e.event.stopPropagation(), this.sceneIsMouseDown) {
206
206
  if (!e.event.touches || e.event.touches.length === 1)
207
- this.scrollConfig.isNativeScroll ? (t = this.$refs.nativeScroll) == null || t.scrollBy({
207
+ this.scrollConfig.isNativeScroll ? (t = this.$refs[this.prefixId + "nativeScroll"]) == null || t.scrollBy({
208
208
  left: e.offsetX - this.sceneIsMouseDownX,
209
209
  top: 0
210
- }) : this.$refs.vueScroll.scrollBy({
210
+ }) : this.$refs[this.prefixId + "vueScroll"].scrollBy({
211
211
  dx: e.offsetX - this.sceneIsMouseDownX
212
212
  });
213
- else if (e.event.touches.length === 2) {
213
+ else if (this.supportTwoFingerZoom && e.event.touches.length === 2) {
214
214
  let a = $({
215
215
  x: e.event.touches[0].pageX,
216
216
  y: e.event.touches[0].pageY
@@ -287,7 +287,7 @@ let g = class extends U {
287
287
  fill: this.leadConfig.lineColor,
288
288
  fontFamily: this.fontFamily
289
289
  }
290
- })), (l = this.pacingGroup) == null || l.add(new F({
290
+ })), (l = this.pacingGroup) == null || l.add(new L({
291
291
  cursor: "",
292
292
  name: "0_0",
293
293
  shape: {
@@ -313,7 +313,7 @@ let g = class extends U {
313
313
  var o;
314
314
  const a = this.leadHeadConfig.leadHedeWidth / 4;
315
315
  let s = ((o = this.formatEcgData) == null ? void 0 : o.sens) || 0;
316
- return s = i ? s / 2 : s, new F({
316
+ return s = i ? s / 2 : s, new L({
317
317
  cursor: "",
318
318
  shape: {
319
319
  points: [
@@ -378,17 +378,17 @@ let g = class extends U {
378
378
  (s = this.splitLineGroup) == null || s.removeAll(), (o = this.sceneIns) == null || o.remove(this.splitLineGroup);
379
379
  const e = (this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / this.leadModel.column;
380
380
  if (this.splitPoint = e, this.isSingleMode) {
381
- const P = L(
381
+ const P = F(
382
382
  Math.ceil(this.splitPoint / (((r = this.formatEcgData) == null ? void 0 : r.step) || 1)) || 0,
383
383
  ((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.SampleRate) || 0
384
- ), y = parseInt(`${P / 1e3 % 60}`, 10);
385
- this.splitPoint = y * (((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0) * (((h = this.formatEcgData) == null ? void 0 : h.step) || 0);
384
+ ), I = parseInt(`${P / 1e3 % 60}`, 10);
385
+ this.splitPoint = I * (((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0) * (((h = this.formatEcgData) == null ? void 0 : h.step) || 0);
386
386
  }
387
387
  let t = 0, i = 0, a = 0;
388
388
  for (let P = 1; P <= this.leadModel.column - 1; P++) {
389
389
  t = P * e + this.leadHeadConfig.leadHedeWidth, i = P * this.leadModel.line;
390
- for (let y = 1; y <= this.leadModel.line && (a = (((d = this.formatEcgData) == null ? void 0 : d.processedData.otherParams.LeadName) || [])[y - 1 + i], a !== void 0); y++)
391
- ((f = this.formatEcgData) == null ? void 0 : f.gainName) === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.LeadNameTextsPorps[a]) ? (p = this.splitLineGroup) == null || p.add(this.creatSplitLine(t, y * this.splitBlockHeight - (((m = this.formatEcgData) == null ? void 0 : m.sens) || 0) / 2 * 0.5, !0)) : (D = this.splitLineGroup) == null || D.add(this.creatSplitLine(t, y * this.splitBlockHeight - (((v = this.formatEcgData) == null ? void 0 : v.sens) || 0) * 0.5));
390
+ for (let I = 1; I <= this.leadModel.line && (a = (((d = this.formatEcgData) == null ? void 0 : d.processedData.otherParams.LeadName) || [])[I - 1 + i], a !== void 0); I++)
391
+ ((f = this.formatEcgData) == null ? void 0 : f.gainName) === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.LeadNameTextsPorps[a]) ? (p = this.splitLineGroup) == null || p.add(this.creatSplitLine(t, I * this.splitBlockHeight - (((m = this.formatEcgData) == null ? void 0 : m.sens) || 0) / 2 * 0.5, !0)) : (D = this.splitLineGroup) == null || D.add(this.creatSplitLine(t, I * this.splitBlockHeight - (((v = this.formatEcgData) == null ? void 0 : v.sens) || 0) * 0.5));
392
392
  }
393
393
  (H = this.sceneIns) == null || H.add(this.splitLineGroup);
394
394
  }
@@ -464,11 +464,11 @@ let g = class extends U {
464
464
  var r, l, n, h, d, f, m;
465
465
  (r = this.singleWaveFromGroup) == null || r.removeAll();
466
466
  const e = (((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.LeadName) || [])[this.singleModeInfo.defaultSelect] || 0;
467
- let t = this.getRednerSinglePoints(), i = L(this.slidingWindowInfo.points || 0, ((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0);
467
+ let t = this.getRednerSinglePoints(), i = F(this.slidingWindowInfo.points || 0, ((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0);
468
468
  const a = i;
469
469
  let s = 0, o = 0;
470
470
  for (let p = 0; p < t.length && !(t[p].pos[1] > this.drawArea.height + this.bottomAreaHeight); p++)
471
- this.isLeadDel(e) || (s = parseInt(`${i / 1e3 / 60}`, 10), o = parseInt(`${i / 1e3 % 60}`, 10), s = o === 60 ? s += 1 : s, s = s === 0 ? "00" : s < 10 ? `0${s}` : s, o = o === 0 || o === 60 ? "00" : o < 10 ? `0${o}` : o, (h = this.singleWaveFromGroup) == null || h.add(new F({
471
+ this.isLeadDel(e) || (s = parseInt(`${i / 1e3 / 60}`, 10), o = parseInt(`${i / 1e3 % 60}`, 10), s = o === 60 ? s += 1 : s, s = s === 0 ? "00" : s < 10 ? `0${s}` : s, o = o === 0 || o === 60 ? "00" : o < 10 ? `0${o}` : o, (h = this.singleWaveFromGroup) == null || h.add(new L({
472
472
  cursor: "",
473
473
  name: this.singleModeInfo.defaultSelect + "_" + p,
474
474
  shape: {
@@ -503,7 +503,7 @@ let g = class extends U {
503
503
  console.time("createAddWaveFrom");
504
504
  let e = this.getAddRednerPoints();
505
505
  for (let a = 0; a < e.length; a++)
506
- this.isLeadDel(this.longLeadConfig.leadIdxs[a]) || ((t = this.addwaveFromGroup) == null || t.add(new F({
506
+ this.isLeadDel(this.longLeadConfig.leadIdxs[a]) || ((t = this.addwaveFromGroup) == null || t.add(new L({
507
507
  cursor: "",
508
508
  name: this.longLeadConfig.leadIdxs[a] + "_" + a,
509
509
  shape: {
@@ -527,7 +527,7 @@ let g = class extends U {
527
527
  console.time("createRowAndColWaveFrom"), (i = this.rowAndColwaveFromGroup) == null || i.removeAll();
528
528
  let e = this.getRednerPoints(), t = 0;
529
529
  for (let n = 0; n < e.length; n++)
530
- t = (((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.LeadName) || [])[n] || 0, this.isLeadDel(t) || (s = this.rowAndColwaveFromGroup) == null || s.add(new F({
530
+ t = (((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.LeadName) || [])[n] || 0, this.isLeadDel(t) || (s = this.rowAndColwaveFromGroup) == null || s.add(new L({
531
531
  cursor: "",
532
532
  name: n + "_" + n,
533
533
  shape: {
@@ -559,7 +559,7 @@ let g = class extends U {
559
559
  },
560
560
  oncontextmenu: (o) => {
561
561
  o.event.preventDefault(), this.$emit("notiifyLeadName", {
562
- event: S(I({}, o), {
562
+ event: S(y({}, o), {
563
563
  name: this.LeadNameTextsPorps[e],
564
564
  idx: e
565
565
  }),
@@ -568,7 +568,7 @@ let g = class extends U {
568
568
  },
569
569
  onclick: (o) => {
570
570
  this.$emit("notiifyLeadName", {
571
- event: S(I({}, o), {
571
+ event: S(y({}, o), {
572
572
  name: this.LeadNameTextsPorps[e],
573
573
  idx: e
574
574
  }),
@@ -602,13 +602,13 @@ let g = class extends U {
602
602
  fontFamily: this.fontFamily
603
603
  }, t = new W({
604
604
  cursor: "",
605
- style: I({
605
+ style: y({
606
606
  text: "(s)",
607
607
  x: this.leadHeadConfig.leadHedeWidth / 2 - 8,
608
608
  y: this.canvasContainer.height - 25
609
609
  }, e)
610
610
  }), i = new W({
611
- style: I({
611
+ style: y({
612
612
  text: `${((a = this.formatEcgData) == null ? void 0 : a.gainName) === "\u80F8\u5BFC\u51CF\u534A" ? (s = this.formatEcgData) == null ? void 0 : s.gainName : `${(o = this.formatEcgData) == null ? void 0 : o.gain}mm/mV`} ${(r = this.formatEcgData) == null ? void 0 : r.speed}mm/s`,
613
613
  x: this.leadHeadConfig.leadHedeWidth / 2 + 20,
614
614
  y: this.canvasContainer.height - this.ruleH
@@ -625,7 +625,7 @@ let g = class extends U {
625
625
  if (this.leadModel.isContinuous)
626
626
  s = t * 5;
627
627
  else if (!this.leadModel.add && ((o = this.formatEcgData) == null ? void 0 : o.step)) {
628
- const d = x(this.splitPoint, this.formatEcgData.step), f = L(d, ((r = this.formatEcgData) == null ? void 0 : r.processedData.otherParams.SampleRate) || 0) / 1e3;
628
+ const d = x(this.splitPoint, this.formatEcgData.step), f = F(d, ((r = this.formatEcgData) == null ? void 0 : r.processedData.otherParams.SampleRate) || 0) / 1e3;
629
629
  s = e + f;
630
630
  }
631
631
  for (let d = e; d <= s; d = +(d + 0.1).toFixed(1))
@@ -663,7 +663,7 @@ let g = class extends U {
663
663
  (e = this.sceneIns) == null || e.add(this.leadHeadNameGroup), (t = this.sceneIns) == null || t.add(this.leadHeadOffAndDelGroup);
664
664
  }
665
665
  drawLoopArrow(e = 0) {
666
- var l, n, h, d, f, m, p, v, D, H, P, y, z, B, N, k, R;
666
+ var l, n, h, d, f, m, p, v, D, H, P, I, z, B, N, k, R;
667
667
  if (this.drawLoopArrowStartPosIdx = e, !this.heartFight.isShow)
668
668
  return;
669
669
  this.heartFight.mode && this.currentHeardBeat.heardBeat === null && (this.currentHeardBeat.heardBeat = ((l = this.formatEcgData) == null ? void 0 : l.heartBeatPosition[this.heartFight.defaultSelect]) || null, this.drawHeardBeatLine());
@@ -710,28 +710,28 @@ let g = class extends U {
710
710
  }
711
711
  })), this.heartFight.heartrate && (a = ((D = this.AssistCtx) == null ? void 0 : D.measureText(`${(c == null ? void 0 : c.heartrate) || ""}`).width) || 0, (H = this.arrowGroup) == null || H.add(new W({
712
712
  cursor: "",
713
- style: I({
713
+ style: y({
714
714
  x: 4 + t - a * 1.5,
715
715
  y: s + i,
716
716
  text: `${(c == null ? void 0 : c.heartrate) || ""}`
717
717
  }, o)
718
- })), s += 12), this.heartFight.interval && (a = ((P = this.AssistCtx) == null ? void 0 : P.measureText(`${(c == null ? void 0 : c.interval) || ""}`).width) || 0, (y = this.arrowGroup) == null || y.add(new W({
718
+ })), s += 12), this.heartFight.interval && (a = ((P = this.AssistCtx) == null ? void 0 : P.measureText(`${(c == null ? void 0 : c.interval) || ""}`).width) || 0, (I = this.arrowGroup) == null || I.add(new W({
719
719
  cursor: "",
720
- style: I({
720
+ style: y({
721
721
  x: 4 + t - a * 1.5,
722
722
  y: s + i,
723
723
  text: `${(c == null ? void 0 : c.interval) || ""}`
724
724
  }, o)
725
725
  })), s += 12), this.heartFight.qrstCompany && (a = ((z = this.AssistCtx) == null ? void 0 : z.measureText(`${(c == null ? void 0 : c.qrstCompany) || ""}`).width) || 0, (B = this.arrowGroup) == null || B.add(new W({
726
726
  cursor: "",
727
- style: I({
727
+ style: y({
728
728
  x: 4 + t - a * 1.5,
729
729
  y: s + i,
730
730
  text: `${(c == null ? void 0 : c.qrstCompany) || ""}`
731
731
  }, o)
732
732
  })), s += 12), this.heartFight.telectricalaxis && (a = ((N = this.AssistCtx) == null ? void 0 : N.measureText(`${(c == null ? void 0 : c.telectricalaxis) || ""}`).width) || 0, (k = this.arrowGroup) == null || k.add(new W({
733
733
  cursor: "",
734
- style: I({
734
+ style: y({
735
735
  x: 4 + t - a * 1.5,
736
736
  y: s + i,
737
737
  text: `${(c == null ? void 0 : c.telectricalaxis) || ""}`
@@ -830,7 +830,7 @@ let g = class extends U {
830
830
  scrollRuler(e) {
831
831
  var i, a, s;
832
832
  (i = this.rulerGroup) == null || i.removeAll(), (a = this.sceneIns) == null || a.remove(this.rulerGroup);
833
- const t = L(this.isSingleMode ? 0 : e, ((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.SampleRate) || 0) / 1e3;
833
+ const t = F(this.isSingleMode ? 0 : e, ((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.SampleRate) || 0) / 1e3;
834
834
  this.drawRuler(t);
835
835
  }
836
836
  scrollArrow(e) {
@@ -838,6 +838,16 @@ let g = class extends U {
838
838
  (t = this.arrowGroup) == null || t.removeAll(), (i = this.sceneIns) == null || i.remove(this.arrowGroup), this.drawLoopArrow(e), this.drawHeardBeatLine(e);
839
839
  }
840
840
  };
841
+ u([
842
+ w({
843
+ default: () => !0
844
+ })
845
+ ], g.prototype, "supportTwoFingerZoom", 2);
846
+ u([
847
+ w({
848
+ default: () => ""
849
+ })
850
+ ], g.prototype, "prefixId", 2);
841
851
  u([
842
852
  w({
843
853
  required: !0,
@@ -1021,7 +1031,7 @@ u([
1021
1031
  O(200)
1022
1032
  ], g.prototype, "handleScroll", 1);
1023
1033
  g = u([
1024
- Q({
1034
+ Z({
1025
1035
  name: "Methods"
1026
1036
  })
1027
1037
  ], g);
@@ -8,13 +8,13 @@
8
8
  border: 1px solid #564648;
9
9
  position: relative;
10
10
  }
11
- #ecg-wave-form-main #wave-from-box,
11
+ #ecg-wave-form-main .wave-from-box_container,
12
12
  #ecg-wave-form-main .scroll-box {
13
13
  position: absolute;
14
14
  left: 0;
15
15
  top: 0;
16
16
  }
17
- #ecg-wave-form-main #wave-from-box {
17
+ #ecg-wave-form-main .wave-from-box_container {
18
18
  z-index: 1;
19
19
  }
20
20
  #ecg-wave-form-main .scroll-box {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var C=function(){var t,i,l,o,r,s,n,d,g,v,c,h,m,f,a=this,p=a.$createElement,e=a._self._c||p;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,magnification:a.sceneMagnification,"layer-id":"MXGrid"}}),a.measurRulerConfig.isShow?e("MeasuringRuler",a._g({staticClass:"measuring-ruler",attrs:{config:a.measurRulerConfig.config,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:((o=a.formatEcgData)===null||o===void 0?void 0:o.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":((r=a.formatEcgData)===null||r===void 0?void 0:r.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":((d=a.formatEcgData)===null||d===void 0?void 0:d.processedData.otherParams.SampleRate)||0,sensitivity:((g=a.formatEcgData)===null||g===void 0?void 0:g.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,"q-td-algorithm":((m=a.conventionalECGConfig)===null||m===void 0||(f=m.ecgReviewSetting)===null||f===void 0?void 0:f.QTd_algorithm)||1,"is-sync-analyse-value-check":a.isSyncAnalyseValueCheck,"enlarge-gains":a.enlargeGains,"lead-name-texts-porps":a.LeadNameTextsPorps,"enlarge-speeds":a.enlargeSpeeds},on:{"update:isShowEnlargeWave":function(u){a.isShowEnlargeWave=u},"update:is-show-enlarge-wave":function(u){a.isShowEnlargeWave=u}}},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`}},[a.scrollConfig.isNativeScroll?e("div",{ref:"nativeScroll",staticClass:"native-scroll",on:{scroll:a.nativeScrollFunc}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})]):e("vueScroll",{ref:"vueScroll",attrs:{ops:a.scrollConfig},on:{"handle-scroll":a.handleScroll}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})])],1)],1)},D=[];exports.render=C;exports.staticRenderFns=D;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var C=function(){var t,i,l,r,o,s,n,d,g,v,c,h,f,m,a=this,u=a.$createElement,e=a._self._c||u;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,magnification:a.sceneMagnification,"layer-id":a.prefixId+"MXGrid"}}),a.measurRulerConfig.isShow?e("MeasuringRuler",a._g({staticClass:"measuring-ruler",attrs:{config:a.measurRulerConfig.config,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,"prefix-id":a.prefixId}},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,"prefix-id":a.prefixId}},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)||[],"prefix-id":a.prefixId}}):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":((d=a.formatEcgData)===null||d===void 0?void 0:d.processedData.otherParams.SampleRate)||0,sensitivity:((g=a.formatEcgData)===null||g===void 0?void 0:g.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,"q-td-algorithm":((f=a.conventionalECGConfig)===null||f===void 0||(m=f.ecgReviewSetting)===null||m===void 0?void 0:m.QTd_algorithm)||1,"is-sync-analyse-value-check":a.isSyncAnalyseValueCheck,"enlarge-gains":a.enlargeGains,"lead-name-texts-porps":a.LeadNameTextsPorps,"enlarge-speeds":a.enlargeSpeeds,"prefix-id":a.prefixId},on:{"update:isShowEnlargeWave":function(p){a.isShowEnlargeWave=p},"update:is-show-enlarge-wave":function(p){a.isShowEnlargeWave=p}}},a.$listeners)):a._e(),e("div",{staticClass:"wave-from-box_container",attrs:{id:a.prefixId+"wave-from-box"}}),e("div",{staticClass:"scroll-box",style:{width:`${a.width}px`,height:`${a.height}px`}},[a.scrollConfig.isNativeScroll?e("div",{ref:a.prefixId+"nativeScroll",staticClass:"native-scroll",on:{scroll:a.nativeScrollFunc}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})]):e("vueScroll",{ref:a.prefixId+"vueScroll",attrs:{ops:a.scrollConfig},on:{"handle-scroll":a.handleScroll}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})])],1)],1)},w=[];exports.render=C;exports.staticRenderFns=w;
@@ -7,6 +7,10 @@ import { MXGridConfig } from '../../types/BackgroundGrid';
7
7
  import { HandleScrollParams } from '../../types/Common';
8
8
  import { MXMeasuringRulerConfig } from '../../types/MeasuringRuler';
9
9
  export default class Methods extends Vue {
10
+ /** 前缀 id */
11
+ protected supportTwoFingerZoom: boolean;
12
+ /** 前缀 id */
13
+ protected prefixId: string;
10
14
  protected width: number;
11
15
  protected height: number;
12
16
  protected MXEnlargeWaveWidth: number;
@@ -1 +1 @@
1
- "use strict";var B=Object.defineProperty,N=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var z=(e,t,i)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,y=(e,t)=>{for(var i in t||(t={}))T.call(t,i)&&z(e,i,t[i]);if(O)for(var i of O(t))k.call(t,i)&&z(e,i,t[i]);return e},L=(e,t)=>N(e,j(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("vue"),X=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),v=require("@costy-plus/utils"),u=require("zrender"),_=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function $(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const Y=_(R),q=$(u);var V=Object.defineProperty,K=Object.getOwnPropertyDescriptor,g=(e,t,i,a)=>{for(var s=a>1?void 0:a?K(t,i):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(s=(a?r(t,i,s):r(s))||s);return a&&s&&V(t,i,s),s};exports.default=class extends Y.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=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.pacingGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(55),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.ruleH=Object.freeze(40),this.bottomPacH=Object.freeze(20),this.drawBottomPacH=Object.freeze(this.bottomPacH+40),this.pacingh=Object.freeze(12),this.pacingPFontSize=Object.freeze(14),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,this.sceneFirstDistance=Object.freeze(0),this.sceneMagnification=1,this.originCanvasWidth=Object.freeze(0)}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}get waveFromData(){var e,t,i;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===v.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((i=this.formatEcgData)==null?void 0:i.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,i,a,s,o,r,l,n,h,d,f;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(a=this.leadHeadGroup)==null||a.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(r=this.leadHeadOffAndDelGroup)==null||r.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(n=this.arrowGroup)==null||n.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.pacingGroup)==null||d.removeAll(),(f=this.sceneIns)==null||f.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.scrollConfig.isShow?this.$nextTick(()=>{var t,i,a,s,o;this.scrollConfig.isNativeScroll?(a=this.$refs.nativeScroll)==null||a.scrollBy({left:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((i=this.formatEcgData)==null?void 0:i.step)||0),top:0}):this.$refs.vueScroll.scrollTo({dx:(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.PosStart)||0)*(((o=this.formatEcgData)==null?void 0:o.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 i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById("wave-from-box");this.sceneIns=q.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,i;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawPacing(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,i,a,s,o,r,l,n,h,d,f;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.pacingGroup=new u.Group({name:"pacing"}),this.vuescrollWH.width=this.width,this.originCanvasWidth=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((i=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:i.ecgareawidth)==="1"){const m=v.getPrintLengthToPx(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;m<=e&&(e=m)}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);if(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=((r=this.formatEcgData)==null?void 0:r.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=(((n=this.formatEcgData)==null?void 0:n.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);else{let m=this.drawArea.height;this.leadModel.isShowPacing&&(m=this.drawArea.height-this.drawBottomPacH),this.splitBlockHeight=m/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)*(((f=this.formatEcgData)==null?void 0:f.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 i=Date.now(),a=()=>{var f,m,p,C;const s=e.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let r=0,l=0;t==="single"?(r=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(r=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(r=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let n=v.getPointIdxForPx(r,((f=this.formatEcgData)==null?void 0:f.step)||1);n+=l;const h=((m=this.formatEcgData)==null?void 0:m.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(n<=h[1].KeyPosByBeat.Tend+.1*(((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(n>h[D-1].KeyPosByBeat.Tend+1&&n<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=L(y({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,a()):this.dbClickWaveFromTime=i}sceneInsMousemove(e){var t;if(e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown){if(!e.event.touches||e.event.touches.length===1)this.scrollConfig.isNativeScroll?(t=this.$refs.nativeScroll)==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs.vueScroll.scrollBy({dx:e.offsetX-this.sceneIsMouseDownX});else if(e.event.touches.length===2){let a=v.getDistance({x:e.event.touches[0].pageX,y:e.event.touches[0].pageY},{x:e.event.touches[1].pageX,y:e.event.touches[1].pageY})/this.sceneFirstDistance;a<.5&&(a=.5),this.sceneMagnification=a,this.zoomWave()}}}zoomWave(){var e,t,i,a,s,o,r,l,n,h,d,f;this.scrollConfig.isShow&&!this.isSingleMode&&(this.sceneMagnification>1?this.vuescrollWH.width=this.originCanvasWidth*1.3:this.vuescrollWH.width=this.originCanvasWidth),(e=this.rowAndColwaveFromGroup)==null||e.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(t=this.leadHeadGroup)==null||t.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(i=this.addwaveFromGroup)==null||i.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(a=this.splitLineGroup)==null||a.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(s=this.singleWaveFromGroup)==null||s.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(o=this.leadHeadNameGroup)==null||o.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(r=this.leadHeadOffAndDelGroup)==null||r.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(n=this.rulerGroup)==null||n.attr({scaleX:this.sceneMagnification,scaleY:(l=this.rulerGroup)==null?void 0:l.scaleY}),(h=this.arrowGroup)==null||h.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(d=this.heardBeatLineGroup)==null||d.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(f=this.pacingGroup)==null||f.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification})}sceneInsMouseDown(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!0,!e.event.touches||e.event.touches.length===1?this.sceneIsMouseDownX=e.offsetX:e.event.touches.length===2&&(this.sceneFirstDistance=v.getDistance({x:e.event.touches[0].pageX,y:e.event.touches[0].pageY},{x:e.event.touches[1].pageX,y:e.event.touches[1].pageY}))}sceneInsMouseUp(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!1}drawPacing(){var i,a,s,o,r,l,n;if(!this.leadModel.isShowPacing||!((a=(i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)!=null&&a.length))return;(s=this.pacingGroup)==null||s.removeAll(),(o=this.sceneIns)==null||o.remove(this.pacingGroup);const e=this.leadHeadConfig.leadHedeWidth,t=this.canvasContainer.height-this.drawBottomPacH;(r=this.pacingGroup)==null||r.add(new u.Text({cursor:"",style:{x:e,y:t,text:"P",fontSize:this.pacingPFontSize,fill:this.leadConfig.lineColor,fontFamily:this.fontFamily}})),(l=this.pacingGroup)==null||l.add(new u.Polyline({cursor:"",name:"0_0",shape:{points:this.getPacinfPoints(e,t)},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}})),(n=this.sceneIns)==null||n.add(this.pacingGroup)}getPacinfPoints(e,t){var i;return(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)||[]).slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((a,s)=>{var o;return[e+s*(((o=this.formatEcgData)==null?void 0:o.step)||0),(a===1?t-this.pacingh:t)+this.pacingPFontSize]})}createLeadHead(e,t,i){var o;const a=this.leadHeadConfig.leadHedeWidth/4;let s=((o=this.formatEcgData)==null?void 0:o.sens)||0;return s=i?s/2:s,new u.Polyline({cursor:"",shape:{points:[[0+e,0+t],[a+e,0+t],[a+e,-s+t],[3*a+e,-s+t],[3*a+e,0+t],[4*a+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,i){var a,s;return new u.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(i?(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2:((s=this.formatEcgData)==null?void 0:s.sens)||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var i,a,s,o,r,l;(i=this.leadHeadGroup)==null||i.removeAll(),(a=this.sceneIns)==null||a.remove(this.leadHeadGroup);let e=0,t=!1;for(let n=1;n<=this.totalRows;n++)e=0,t=!1,n<=this.leadModel.line?e=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[n-1]||0:n>this.leadModel.line&&n-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[n-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[e])&&(t=!0),(r=this.leadHeadGroup)==null||r.add(this.createLeadHead(0,n*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var s,o,r,l,n,h,d,f,m,p,C,D,I;(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 W=v.getDataLenTimes(Math.ceil(this.splitPoint/(((r=this.formatEcgData)==null?void 0:r.step)||1))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),P=parseInt(`${W/1e3%60}`,10);this.splitPoint=P*(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)}let t=0,i=0,a=0;for(let W=1;W<=this.leadModel.column-1;W++){t=W*e+this.leadHeadConfig.leadHedeWidth,i=W*this.leadModel.line;for(let P=1;P<=this.leadModel.line&&(a=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[P-1+i],a!==void 0);P++)((f=this.formatEcgData)==null?void 0:f.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[a])?(p=this.splitLineGroup)==null||p.add(this.creatSplitLine(t,P*this.splitBlockHeight-(((m=this.formatEcgData)==null?void 0:m.sens)||0)/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,P*this.splitBlockHeight-(((C=this.formatEcgData)==null?void 0:C.sens)||0)*.5))}(I=this.sceneIns)==null||I.add(this.splitLineGroup)}initSlidingWindowInfo(){var a,s,o;const e=((a=this.formatEcgData)==null?void 0:a.step)||0,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint,this.originCanvasWidth=this.canvasContainer.width+(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||0)-this.splitPoint);const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:i,startInd:0,endInd:i}}getRednerSinglePoints(){let e=0,t=0;const i=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let a=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],r=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let n=1;n<=r;n++)t=n*this.splitBlockHeight,n>1&&(t*=.8,a=s,s=a+(this.slidingWindowInfo.points||0)),n===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:a,endInd:s,data:i.slice(a,s).map((h,d)=>{var f;return[d*(((f=this.formatEcgData)==null?void 0:f.step)||0),-h]})})}return o}getRednerPoints(){let e=0,t=0,i=0,a=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const r=[];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 n=1;n<=this.leadModel.line&&(t=n*this.splitBlockHeight,!(i>(this.waveFromData||[]).length-1));n++)a=this.waveFromData[i]||[],i++,n===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:s,endInd:o,data:a.slice(s,o).map((h,d)=>{var f;return[d*(((f=this.formatEcgData)==null?void 0:f.step)||0),-h]})})}return r}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let i=0,a=0,s=[];for(let o=0;o<this.leadModel.add;o++)a=this.longLeadConfig.leadIdxs[o],i=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[a]||[],o===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((r,l)=>{var n;return[l*(((n=this.formatEcgData)==null?void 0:n.step)||0),-r]})});return e}createSingleWaveFrom(){var r,l,n,h,d,f,m;(r=this.singleWaveFromGroup)==null||r.removeAll();const e=(((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),i=v.getDataLenTimes(this.slidingWindowInfo.points||0,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0);const a=i;let s=0,o=0;for(let p=0;p<t.length&&!(t[p].pos[1]>this.drawArea.height+this.bottomAreaHeight);p++)this.isLeadDel(e)||(s=parseInt(`${i/1e3/60}`,10),o=parseInt(`${i/1e3%60}`,10),s=o===60?s+=1:s,s=s===0?"00":s<10?`0${s}`:s,o=o===0||o===60?"00":o<10?`0${o}`:o,(h=this.singleWaveFromGroup)==null||h.add(new u.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+p,shape:{points:t[p].data.map(([C,D])=>[C+t[p].pos[0],D+t[p].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:C=>{this.onDbClickWaveFrom(C,"single")}})),(f=this.singleWaveFromGroup)==null||f.add(new u.Text({cursor:"",style:{x:t[p].pos[0],y:t[p].pos[1]-(((d=this.formatEcgData)==null?void 0:d.sens)||0)/2,text:p===0?"00:00 \u5FC3\u7387":`${s}:${o} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),p>0&&(i+=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,i;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let a=0;a<e.length;a++)this.isLeadDel(this.longLeadConfig.leadIdxs[a])||((t=this.addwaveFromGroup)==null||t.add(new u.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[a]+"_"+a,shape:{points:e[a].data.map(([s,o])=>[s+e[a].pos[0],o+e[a].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[a],e[a].pos[0],e[a].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[a],e[a].pos[0]-5,e[a].pos[1]-(((i=this.formatEcgData)==null?void 0:i.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var i,a,s,o,r,l;console.time("createRowAndColWaveFrom"),(i=this.rowAndColwaveFromGroup)==null||i.removeAll();let e=this.getRednerPoints(),t=0;for(let n=0;n<e.length;n++)t=(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.LeadName)||[])[n]||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new u.Polyline({cursor:"",name:n+"_"+n,shape:{points:e[n].data.map(([h,d])=>[h+e[n].pos[0],d+e[n].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),n<this.leadModel.line?(this.createLeadName(t,e[n].pos[0],e[n].pos[1]-15),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-(((r=this.formatEcgData)==null?void 0:r.sens)||0)/2),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,a=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new u.Text({style:{x:t,y:i,text:this.LeadNameTextsPorps[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:L(y({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:a})},onclick:o=>{this.$emit("notiifyLeadName",{event:L(y({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:a})}}))}createLeadOffAndDel(e,t,i){var a;(this.isLeadOff(e)||this.isLeadDel(e))&&((a=this.leadHeadOffAndDelGroup)==null||a.add(new u.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var a,s,o,r,l,n;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new u.Text({cursor:"",style:y({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new u.Text({style:y({text:`${((a=this.formatEcgData)==null?void 0:a.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(s=this.formatEcgData)==null?void 0:s.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(r=this.formatEcgData)==null?void 0:r.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(l=this.sceneIns)==null||l.add(i),(n=this.sceneIns)==null||n.add(t)}drawRuler(e=0){var o,r,l,n,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,a=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),f=v.getDataLenTimes(d,((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)/1e3;s=e+f}for(let d=e;d<=s;d=+(d+.1).toFixed(1))d!==e&&(i+=this.rulerStep),d%1===0?(a=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new u.Text({cursor:"",style:{x:i,y:a-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):a=this.canvasContainer.height-5,(n=this.rulerGroup)==null||n.add(new u.Line({cursor:"",shape:{x1:i,y1:a,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,i;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),(i=this.sceneIns)==null||i.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,n,h,d,f,m,p,C,D,I,W,P,A,S,G,x,E;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,i=0;this.leadModel.add?i=this.loopArrowY.add-(((n=this.formatEcgData)==null?void 0:n.sens)||0)-this.splitBlockHeight/3.5:i=20;let a=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let r=0;for(let F=0;F<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;F++){const c=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[F];if(r=((c==null?void 0:c.position)||0)-e,!(e>((c==null?void 0:c.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&r>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&r>(this.slidingWindowInfo.points||0))){if(((c==null?void 0:c.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=r*(((f=this.formatEcgData)==null?void 0:f.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+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((p=(m=this.currentHeardBeat)==null?void 0:m.heardBeat)==null?void 0:p.index)===(c==null?void 0:c.index)?"blue":"#ccc"},onclick:M=>{var b;!this.heartFight.mode||(M.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(H=>H.name==="arrow_box").forEach(H=>{H.id!==M.target.id&&H.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(c,M.target))}})),this.heartFight.heartrate&&(a=((D=this.AssistCtx)==null?void 0:D.measureText(`${(c==null?void 0:c.heartrate)||""}`).width)||0,(I=this.arrowGroup)==null||I.add(new u.Text({cursor:"",style:y({x:4+t-a*1.5,y:s+i,text:`${(c==null?void 0:c.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(a=((W=this.AssistCtx)==null?void 0:W.measureText(`${(c==null?void 0:c.interval)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new u.Text({cursor:"",style:y({x:4+t-a*1.5,y:s+i,text:`${(c==null?void 0:c.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(a=((A=this.AssistCtx)==null?void 0:A.measureText(`${(c==null?void 0:c.qrstCompany)||""}`).width)||0,(S=this.arrowGroup)==null||S.add(new u.Text({cursor:"",style:y({x:4+t-a*1.5,y:s+i,text:`${(c==null?void 0:c.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(a=((G=this.AssistCtx)==null?void 0:G.measureText(`${(c==null?void 0:c.telectricalaxis)||""}`).width)||0,(x=this.arrowGroup)==null||x.add(new u.Text({cursor:"",style:y({x:4+t-a*1.5,y:s+i,text:`${(c==null?void 0:c.telectricalaxis)||""}`},o)})))}}(E=this.sceneIns)==null||E.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 r,l,n,h,d,f;if(!this.currentHeardBeat.heardBeat)return;(r=this.heardBeatLineGroup)==null||r.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,i=0,a=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const m in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(m)&&Object.prototype.hasOwnProperty.call(t,m)){i=(t[m]-this.slidingWindowInfo.startInd)*(((n=this.formatEcgData)==null?void 0:n.step)||0);e:for(let p=0;p<a.length;p++)if(!(this.isLeadOff(p)||this.isLeadDel(p))){if(e>t[m]||!this.leadModel.isContinuous&&t[m]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=a[p],this.leadModel.isContinuous&&p>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}e:for(let p=0;p<s.length;p++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[p])&&this.isLeadDel(this.longLeadConfig.leadIdxs[p]))){if(e>t[m])break e;o=s[p],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}(f=this.sceneIns)==null||f.add(this.heardBeatLineGroup),t=null,a=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}})}nativeScrollFunc(e){console.log("event",e,e.target.scrollLeft),this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){var i;const t=v.getPointIdxForPx(e,((i=this.formatEcgData)==null?void 0:i.step)||1);this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",t)}scrollWaveFrom(e){var a,s,o,r,l,n;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,(a=this.rowAndColwaveFromGroup)==null||a.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:t[d].data.map(([f,m])=>[f+t[d].pos[0],m+t[d].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:i[d].data.map(([f,m])=>[f+i[d].pos[0],m+i[d].pos[1]])}})}),this.leadModel.isShowPacing&&((r=(o=this.formatEcgData)==null?void 0:o.processedData.otherParams.PacingData)==null?void 0:r.length)&&((n=(l=this.pacingGroup)==null?void 0:l.childOfName("0_0"))==null||n.attr({shape:{points:this.getPacinfPoints(this.leadHeadConfig.leadHedeWidth,this.canvasContainer.height-this.drawBottomPacH)}})),t=null,i=null}scrollRuler(e){var i,a,s;(i=this.rulerGroup)==null||i.removeAll(),(a=this.sceneIns)==null||a.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,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};g([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);g([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);g([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);g([w.Prop({default:()=>v.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);g([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);g([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);g([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);g([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);g([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);g([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);g([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);g([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);g([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);g([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);g([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);g([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);g([w.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);g([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);g([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);g([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);g([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);g([v.throttling(200)],exports.default.prototype,"zoomWave",1);g([v.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);g([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=g([X.default({name:"Methods"})],exports.default);
1
+ "use strict";var T=Object.defineProperty,B=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var z=(e,t,i)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,y=(e,t)=>{for(var i in t||(t={}))j.call(t,i)&&z(e,i,t[i]);if(O)for(var i of O(t))k.call(t,i)&&z(e,i,t[i]);return e},L=(e,t)=>B(e,N(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const R=require("vue"),X=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),v=require("@costy-plus/utils"),u=require("zrender"),_=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function $(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const a=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const Y=_(R),q=$(u);var V=Object.defineProperty,K=Object.getOwnPropertyDescriptor,g=(e,t,i,a)=>{for(var s=a>1?void 0:a?K(t,i):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(s=(a?r(t,i,s):r(s))||s);return a&&s&&V(t,i,s),s};exports.default=class extends Y.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=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.pacingGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(55),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.ruleH=Object.freeze(40),this.bottomPacH=Object.freeze(20),this.drawBottomPacH=Object.freeze(this.bottomPacH+40),this.pacingh=Object.freeze(12),this.pacingPFontSize=Object.freeze(14),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,this.sceneFirstDistance=Object.freeze(0),this.sceneMagnification=1,this.originCanvasWidth=Object.freeze(0)}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}get waveFromData(){var e,t,i;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===v.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((i=this.formatEcgData)==null?void 0:i.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,i,a,s,o,r,l,n,h,d,f;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(a=this.leadHeadGroup)==null||a.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(r=this.leadHeadOffAndDelGroup)==null||r.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(n=this.arrowGroup)==null||n.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.pacingGroup)==null||d.removeAll(),(f=this.sceneIns)==null||f.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.scrollConfig.isShow?this.$nextTick(()=>{var t,i,a,s,o;this.scrollConfig.isNativeScroll?(a=this.$refs[this.prefixId+"nativeScroll"])==null||a.scrollBy({left:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((i=this.formatEcgData)==null?void 0:i.step)||0),top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({dx:(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.PosStart)||0)*(((o=this.formatEcgData)==null?void 0:o.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 i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById(`${this.prefixId}wave-from-box`);this.sceneIns=q.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById(`${this.prefixId}MXGrid`);this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp)}sceneInsEventOff(){var e,t,i;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawPacing(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,i,a,s,o,r,l,n,h,d,f;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.pacingGroup=new u.Group({name:"pacing"}),this.vuescrollWH.width=this.width,this.originCanvasWidth=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((i=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:i.ecgareawidth)==="1"){const m=v.getPrintLengthToPx(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;m<=e&&(e=m)}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);if(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=((r=this.formatEcgData)==null?void 0:r.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=(((n=this.formatEcgData)==null?void 0:n.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);else{let m=this.drawArea.height;this.leadModel.isShowPacing&&(m=this.drawArea.height-this.drawBottomPacH),this.splitBlockHeight=m/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)*(((f=this.formatEcgData)==null?void 0:f.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 i=Date.now(),a=()=>{var f,m,p,C;const s=e.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let r=0,l=0;t==="single"?(r=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(r=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(r=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let n=v.getPointIdxForPx(r,((f=this.formatEcgData)==null?void 0:f.step)||1);n+=l;const h=((m=this.formatEcgData)==null?void 0:m.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(n<=h[1].KeyPosByBeat.Tend+.1*(((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(n>h[D-1].KeyPosByBeat.Tend+1&&n<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=L(y({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,a()):this.dbClickWaveFromTime=i}sceneInsMousemove(e){var t;if(e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown){if(!e.event.touches||e.event.touches.length===1)this.scrollConfig.isNativeScroll?(t=this.$refs[this.prefixId+"nativeScroll"])==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollBy({dx:e.offsetX-this.sceneIsMouseDownX});else if(this.supportTwoFingerZoom&&e.event.touches.length===2){let a=v.getDistance({x:e.event.touches[0].pageX,y:e.event.touches[0].pageY},{x:e.event.touches[1].pageX,y:e.event.touches[1].pageY})/this.sceneFirstDistance;a<.5&&(a=.5),this.sceneMagnification=a,this.zoomWave()}}}zoomWave(){var e,t,i,a,s,o,r,l,n,h,d,f;this.scrollConfig.isShow&&!this.isSingleMode&&(this.sceneMagnification>1?this.vuescrollWH.width=this.originCanvasWidth*1.3:this.vuescrollWH.width=this.originCanvasWidth),(e=this.rowAndColwaveFromGroup)==null||e.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(t=this.leadHeadGroup)==null||t.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(i=this.addwaveFromGroup)==null||i.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(a=this.splitLineGroup)==null||a.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(s=this.singleWaveFromGroup)==null||s.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(o=this.leadHeadNameGroup)==null||o.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(r=this.leadHeadOffAndDelGroup)==null||r.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(n=this.rulerGroup)==null||n.attr({scaleX:this.sceneMagnification,scaleY:(l=this.rulerGroup)==null?void 0:l.scaleY}),(h=this.arrowGroup)==null||h.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(d=this.heardBeatLineGroup)==null||d.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification}),(f=this.pacingGroup)==null||f.attr({scaleX:this.sceneMagnification,scaleY:this.sceneMagnification})}sceneInsMouseDown(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!0,!e.event.touches||e.event.touches.length===1?this.sceneIsMouseDownX=e.offsetX:e.event.touches.length===2&&(this.sceneFirstDistance=v.getDistance({x:e.event.touches[0].pageX,y:e.event.touches[0].pageY},{x:e.event.touches[1].pageX,y:e.event.touches[1].pageY}))}sceneInsMouseUp(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!1}drawPacing(){var i,a,s,o,r,l,n;if(!this.leadModel.isShowPacing||!((a=(i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)!=null&&a.length))return;(s=this.pacingGroup)==null||s.removeAll(),(o=this.sceneIns)==null||o.remove(this.pacingGroup);const e=this.leadHeadConfig.leadHedeWidth,t=this.canvasContainer.height-this.drawBottomPacH;(r=this.pacingGroup)==null||r.add(new u.Text({cursor:"",style:{x:e,y:t,text:"P",fontSize:this.pacingPFontSize,fill:this.leadConfig.lineColor,fontFamily:this.fontFamily}})),(l=this.pacingGroup)==null||l.add(new u.Polyline({cursor:"",name:"0_0",shape:{points:this.getPacinfPoints(e,t)},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}})),(n=this.sceneIns)==null||n.add(this.pacingGroup)}getPacinfPoints(e,t){var i;return(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)||[]).slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((a,s)=>{var o;return[e+s*(((o=this.formatEcgData)==null?void 0:o.step)||0),(a===1?t-this.pacingh:t)+this.pacingPFontSize]})}createLeadHead(e,t,i){var o;const a=this.leadHeadConfig.leadHedeWidth/4;let s=((o=this.formatEcgData)==null?void 0:o.sens)||0;return s=i?s/2:s,new u.Polyline({cursor:"",shape:{points:[[0+e,0+t],[a+e,0+t],[a+e,-s+t],[3*a+e,-s+t],[3*a+e,0+t],[4*a+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,i){var a,s;return new u.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(i?(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2:((s=this.formatEcgData)==null?void 0:s.sens)||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var i,a,s,o,r,l;(i=this.leadHeadGroup)==null||i.removeAll(),(a=this.sceneIns)==null||a.remove(this.leadHeadGroup);let e=0,t=!1;for(let n=1;n<=this.totalRows;n++)e=0,t=!1,n<=this.leadModel.line?e=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[n-1]||0:n>this.leadModel.line&&n-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[n-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[e])&&(t=!0),(r=this.leadHeadGroup)==null||r.add(this.createLeadHead(0,n*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var s,o,r,l,n,h,d,f,m,p,C,D,I;(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 W=v.getDataLenTimes(Math.ceil(this.splitPoint/(((r=this.formatEcgData)==null?void 0:r.step)||1))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),P=parseInt(`${W/1e3%60}`,10);this.splitPoint=P*(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)}let t=0,i=0,a=0;for(let W=1;W<=this.leadModel.column-1;W++){t=W*e+this.leadHeadConfig.leadHedeWidth,i=W*this.leadModel.line;for(let P=1;P<=this.leadModel.line&&(a=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[P-1+i],a!==void 0);P++)((f=this.formatEcgData)==null?void 0:f.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[a])?(p=this.splitLineGroup)==null||p.add(this.creatSplitLine(t,P*this.splitBlockHeight-(((m=this.formatEcgData)==null?void 0:m.sens)||0)/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,P*this.splitBlockHeight-(((C=this.formatEcgData)==null?void 0:C.sens)||0)*.5))}(I=this.sceneIns)==null||I.add(this.splitLineGroup)}initSlidingWindowInfo(){var a,s,o;const e=((a=this.formatEcgData)==null?void 0:a.step)||0,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint,this.originCanvasWidth=this.canvasContainer.width+(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||0)-this.splitPoint);const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:i,startInd:0,endInd:i}}getRednerSinglePoints(){let e=0,t=0;const i=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let a=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],r=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let n=1;n<=r;n++)t=n*this.splitBlockHeight,n>1&&(t*=.8,a=s,s=a+(this.slidingWindowInfo.points||0)),n===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:a,endInd:s,data:i.slice(a,s).map((h,d)=>{var f;return[d*(((f=this.formatEcgData)==null?void 0:f.step)||0),-h]})})}return o}getRednerPoints(){let e=0,t=0,i=0,a=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const r=[];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 n=1;n<=this.leadModel.line&&(t=n*this.splitBlockHeight,!(i>(this.waveFromData||[]).length-1));n++)a=this.waveFromData[i]||[],i++,n===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:s,endInd:o,data:a.slice(s,o).map((h,d)=>{var f;return[d*(((f=this.formatEcgData)==null?void 0:f.step)||0),-h]})})}return r}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let i=0,a=0,s=[];for(let o=0;o<this.leadModel.add;o++)a=this.longLeadConfig.leadIdxs[o],i=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[a]||[],o===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((r,l)=>{var n;return[l*(((n=this.formatEcgData)==null?void 0:n.step)||0),-r]})});return e}createSingleWaveFrom(){var r,l,n,h,d,f,m;(r=this.singleWaveFromGroup)==null||r.removeAll();const e=(((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),i=v.getDataLenTimes(this.slidingWindowInfo.points||0,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0);const a=i;let s=0,o=0;for(let p=0;p<t.length&&!(t[p].pos[1]>this.drawArea.height+this.bottomAreaHeight);p++)this.isLeadDel(e)||(s=parseInt(`${i/1e3/60}`,10),o=parseInt(`${i/1e3%60}`,10),s=o===60?s+=1:s,s=s===0?"00":s<10?`0${s}`:s,o=o===0||o===60?"00":o<10?`0${o}`:o,(h=this.singleWaveFromGroup)==null||h.add(new u.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+p,shape:{points:t[p].data.map(([C,D])=>[C+t[p].pos[0],D+t[p].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:C=>{this.onDbClickWaveFrom(C,"single")}})),(f=this.singleWaveFromGroup)==null||f.add(new u.Text({cursor:"",style:{x:t[p].pos[0],y:t[p].pos[1]-(((d=this.formatEcgData)==null?void 0:d.sens)||0)/2,text:p===0?"00:00 \u5FC3\u7387":`${s}:${o} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),p>0&&(i+=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,i;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let a=0;a<e.length;a++)this.isLeadDel(this.longLeadConfig.leadIdxs[a])||((t=this.addwaveFromGroup)==null||t.add(new u.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[a]+"_"+a,shape:{points:e[a].data.map(([s,o])=>[s+e[a].pos[0],o+e[a].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[a],e[a].pos[0],e[a].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[a],e[a].pos[0]-5,e[a].pos[1]-(((i=this.formatEcgData)==null?void 0:i.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var i,a,s,o,r,l;console.time("createRowAndColWaveFrom"),(i=this.rowAndColwaveFromGroup)==null||i.removeAll();let e=this.getRednerPoints(),t=0;for(let n=0;n<e.length;n++)t=(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.LeadName)||[])[n]||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new u.Polyline({cursor:"",name:n+"_"+n,shape:{points:e[n].data.map(([h,d])=>[h+e[n].pos[0],d+e[n].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),n<this.leadModel.line?(this.createLeadName(t,e[n].pos[0],e[n].pos[1]-15),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-(((r=this.formatEcgData)==null?void 0:r.sens)||0)/2),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,a=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new u.Text({style:{x:t,y:i,text:this.LeadNameTextsPorps[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:L(y({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:a})},onclick:o=>{this.$emit("notiifyLeadName",{event:L(y({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:a})}}))}createLeadOffAndDel(e,t,i){var a;(this.isLeadOff(e)||this.isLeadDel(e))&&((a=this.leadHeadOffAndDelGroup)==null||a.add(new u.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var a,s,o,r,l,n;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new u.Text({cursor:"",style:y({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new u.Text({style:y({text:`${((a=this.formatEcgData)==null?void 0:a.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(s=this.formatEcgData)==null?void 0:s.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(r=this.formatEcgData)==null?void 0:r.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(l=this.sceneIns)==null||l.add(i),(n=this.sceneIns)==null||n.add(t)}drawRuler(e=0){var o,r,l,n,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,a=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),f=v.getDataLenTimes(d,((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)/1e3;s=e+f}for(let d=e;d<=s;d=+(d+.1).toFixed(1))d!==e&&(i+=this.rulerStep),d%1===0?(a=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new u.Text({cursor:"",style:{x:i,y:a-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):a=this.canvasContainer.height-5,(n=this.rulerGroup)==null||n.add(new u.Line({cursor:"",shape:{x1:i,y1:a,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,i;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),(i=this.sceneIns)==null||i.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,n,h,d,f,m,p,C,D,I,W,P,A,S,G,x,E;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,i=0;this.leadModel.add?i=this.loopArrowY.add-(((n=this.formatEcgData)==null?void 0:n.sens)||0)-this.splitBlockHeight/3.5:i=20;let a=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let r=0;for(let F=0;F<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;F++){const c=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[F];if(r=((c==null?void 0:c.position)||0)-e,!(e>((c==null?void 0:c.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&r>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&r>(this.slidingWindowInfo.points||0))){if(((c==null?void 0:c.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=r*(((f=this.formatEcgData)==null?void 0:f.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+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((p=(m=this.currentHeardBeat)==null?void 0:m.heardBeat)==null?void 0:p.index)===(c==null?void 0:c.index)?"blue":"#ccc"},onclick:M=>{var b;!this.heartFight.mode||(M.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(H=>H.name==="arrow_box").forEach(H=>{H.id!==M.target.id&&H.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(c,M.target))}})),this.heartFight.heartrate&&(a=((D=this.AssistCtx)==null?void 0:D.measureText(`${(c==null?void 0:c.heartrate)||""}`).width)||0,(I=this.arrowGroup)==null||I.add(new u.Text({cursor:"",style:y({x:4+t-a*1.5,y:s+i,text:`${(c==null?void 0:c.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(a=((W=this.AssistCtx)==null?void 0:W.measureText(`${(c==null?void 0:c.interval)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new u.Text({cursor:"",style:y({x:4+t-a*1.5,y:s+i,text:`${(c==null?void 0:c.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(a=((A=this.AssistCtx)==null?void 0:A.measureText(`${(c==null?void 0:c.qrstCompany)||""}`).width)||0,(S=this.arrowGroup)==null||S.add(new u.Text({cursor:"",style:y({x:4+t-a*1.5,y:s+i,text:`${(c==null?void 0:c.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(a=((G=this.AssistCtx)==null?void 0:G.measureText(`${(c==null?void 0:c.telectricalaxis)||""}`).width)||0,(x=this.arrowGroup)==null||x.add(new u.Text({cursor:"",style:y({x:4+t-a*1.5,y:s+i,text:`${(c==null?void 0:c.telectricalaxis)||""}`},o)})))}}(E=this.sceneIns)==null||E.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 r,l,n,h,d,f;if(!this.currentHeardBeat.heardBeat)return;(r=this.heardBeatLineGroup)==null||r.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,i=0,a=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const m in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(m)&&Object.prototype.hasOwnProperty.call(t,m)){i=(t[m]-this.slidingWindowInfo.startInd)*(((n=this.formatEcgData)==null?void 0:n.step)||0);e:for(let p=0;p<a.length;p++)if(!(this.isLeadOff(p)||this.isLeadDel(p))){if(e>t[m]||!this.leadModel.isContinuous&&t[m]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=a[p],this.leadModel.isContinuous&&p>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}e:for(let p=0;p<s.length;p++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[p])&&this.isLeadDel(this.longLeadConfig.leadIdxs[p]))){if(e>t[m])break e;o=s[p],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}(f=this.sceneIns)==null||f.add(this.heardBeatLineGroup),t=null,a=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}})}nativeScrollFunc(e){console.log("event",e,e.target.scrollLeft),this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){var i;const t=v.getPointIdxForPx(e,((i=this.formatEcgData)==null?void 0:i.step)||1);this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",t)}scrollWaveFrom(e){var a,s,o,r,l,n;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,(a=this.rowAndColwaveFromGroup)==null||a.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:t[d].data.map(([f,m])=>[f+t[d].pos[0],m+t[d].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:i[d].data.map(([f,m])=>[f+i[d].pos[0],m+i[d].pos[1]])}})}),this.leadModel.isShowPacing&&((r=(o=this.formatEcgData)==null?void 0:o.processedData.otherParams.PacingData)==null?void 0:r.length)&&((n=(l=this.pacingGroup)==null?void 0:l.childOfName("0_0"))==null||n.attr({shape:{points:this.getPacinfPoints(this.leadHeadConfig.leadHedeWidth,this.canvasContainer.height-this.drawBottomPacH)}})),t=null,i=null}scrollRuler(e){var i,a,s;(i=this.rulerGroup)==null||i.removeAll(),(a=this.sceneIns)==null||a.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,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};g([w.Prop({default:()=>!0})],exports.default.prototype,"supportTwoFingerZoom",2);g([w.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);g([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);g([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);g([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);g([w.Prop({default:()=>v.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);g([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);g([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);g([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);g([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);g([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);g([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);g([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);g([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);g([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);g([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);g([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);g([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);g([w.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);g([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);g([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);g([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);g([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);g([v.throttling(200)],exports.default.prototype,"zoomWave",1);g([v.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);g([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=g([X.default({name:"Methods"})],exports.default);
@@ -8,13 +8,13 @@
8
8
  border: 1px solid #564648;
9
9
  position: relative;
10
10
  }
11
- #ecg-wave-form-main #wave-from-box,
11
+ #ecg-wave-form-main .wave-from-box_container,
12
12
  #ecg-wave-form-main .scroll-box {
13
13
  position: absolute;
14
14
  left: 0;
15
15
  top: 0;
16
16
  }
17
- #ecg-wave-form-main #wave-from-box {
17
+ #ecg-wave-form-main .wave-from-box_container {
18
18
  z-index: 1;
19
19
  }
20
20
  #ecg-wave-form-main .scroll-box {
package/package.json CHANGED
@@ -1,33 +1,33 @@
1
- {
2
- "name": "costy-plus",
3
- "version": "1.0.85-0",
4
- "main": "dist/lib/index.js",
5
- "module": "dist/es/index.js",
6
- "types": "dist/es/index.d.ts",
7
- "scripts": {
8
- "build": "vite build",
9
- "test": "vitest run"
10
- },
11
- "files": [
12
- "dist"
13
- ],
14
- "keywords": [
15
- "costy-plus",
16
- "vue2组件库"
17
- ],
18
- "author": "Wick Magic",
19
- "license": "MIT",
20
- "description": "",
21
- "typings": "dist/lib/index.d.ts",
22
- "dependencies": {
23
- "@costy-plus/utils": "0.0.14-0",
24
- "element-ui": "~2.15.11",
25
- "vuescroll": "4.17.5",
26
- "zrender": "^5.5.0"
27
- },
28
- "peerDependencies": {
29
- "lodash": "^4.17.21",
30
- "view-design": "^4.7.0",
31
- "zrender": "^5.5.0"
32
- }
33
- }
1
+ {
2
+ "name": "costy-plus",
3
+ "version": "1.0.86-0",
4
+ "main": "dist/lib/index.js",
5
+ "module": "dist/es/index.js",
6
+ "types": "dist/es/index.d.ts",
7
+ "scripts": {
8
+ "build": "vite build",
9
+ "test": "vitest run"
10
+ },
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "keywords": [
15
+ "costy-plus",
16
+ "vue2组件库"
17
+ ],
18
+ "author": "Wick Magic",
19
+ "license": "MIT",
20
+ "description": "",
21
+ "typings": "dist/lib/index.d.ts",
22
+ "dependencies": {
23
+ "@costy-plus/utils": "0.0.14-0",
24
+ "element-ui": "~2.15.11",
25
+ "vuescroll": "4.17.5",
26
+ "zrender": "^5.5.0"
27
+ },
28
+ "peerDependencies": {
29
+ "lodash": "^4.17.21",
30
+ "view-design": "^4.7.0",
31
+ "zrender": "^5.5.0"
32
+ }
33
+ }