costy-plus 1.0.10-0 → 1.0.12-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.
@@ -8,6 +8,7 @@ declare class ECGWaveForm extends ECGWaveForm_base {
8
8
  protected watchWidth(): void;
9
9
  protected watchHeight(): void;
10
10
  protected watchHeartFight(): void;
11
+ protected watchLongLeadConfig(): void;
11
12
  protected mounted(): void;
12
13
  protected repaint(): void;
13
14
  }
@@ -1,21 +1,21 @@
1
1
  import "./style/index.css";
2
2
  import "vue";
3
- import l, { mixins as c } from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
3
+ import c, { mixins as l } 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";
4
4
  import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js";
5
5
  import { Watch as o } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Watch.js";
6
6
  import d from "../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.7.14/node_modules/vuescroll/dist/vuescroll-native.js";
7
7
  import m from "../BackgroundGrid/index2.js";
8
- import f from "../MeasuringRuler/index2.js";
9
- import g from "../ParallelRuler/index2.js";
8
+ import g from "../MeasuringRuler/index2.js";
9
+ import f from "../ParallelRuler/index2.js";
10
10
  import u from "../MagnifierWave/index.js";
11
11
  import w from "../EnlargeWave/index2.js";
12
12
  import v from "./method.js";
13
- var M = Object.defineProperty, C = Object.getOwnPropertyDescriptor, a = (e, t, h, n) => {
14
- for (var i = n > 1 ? void 0 : n ? C(t, h) : t, s = e.length - 1, p; s >= 0; s--)
13
+ var C = Object.defineProperty, M = Object.getOwnPropertyDescriptor, a = (e, t, h, n) => {
14
+ for (var i = n > 1 ? void 0 : n ? M(t, h) : t, s = e.length - 1, p; s >= 0; s--)
15
15
  (p = e[s]) && (i = (n ? p(t, h, i) : p(i)) || i);
16
- return n && i && M(t, h, i), i;
16
+ return n && i && C(t, h, i), i;
17
17
  };
18
- let r = class extends c(v) {
18
+ let r = class extends l(v) {
19
19
  watchFormatEcgData() {
20
20
  var e;
21
21
  (e = this.sceneIns) == null || e.clear(), this.init();
@@ -40,6 +40,10 @@ let r = class extends c(v) {
40
40
  var e;
41
41
  (e = this.sceneIns) == null || e.clear(), this.init();
42
42
  }
43
+ watchLongLeadConfig() {
44
+ var e;
45
+ (e = this.sceneIns) == null || e.clear(), this.init();
46
+ }
43
47
  mounted() {
44
48
  this.init();
45
49
  }
@@ -72,14 +76,17 @@ a([
72
76
  a([
73
77
  o("singleModeInfo", { deep: !0 })
74
78
  ], r.prototype, "watchHeartFight", 1);
79
+ a([
80
+ o("longLeadConfig", { deep: !0 })
81
+ ], r.prototype, "watchLongLeadConfig", 1);
75
82
  r = a([
76
- l({
83
+ c({
77
84
  name: "ECGWaveForm",
78
85
  components: {
79
86
  vueScroll: d,
80
87
  MXBackgroundGrid: m,
81
- MXMeasuringRuler: f,
82
- MXParallelRuler: g,
88
+ MXMeasuringRuler: g,
89
+ MXParallelRuler: f,
83
90
  MXMagnifierWave: u,
84
91
  MXEnlargeWave: w
85
92
  }
@@ -9,14 +9,14 @@ var $ = (t, e, i) => e in t ? _(t, e, { enumerable: !0, configurable: !0, writab
9
9
  for (var i of T(e))
10
10
  Y.call(e, i) && $(t, i, e[i]);
11
11
  return t;
12
- }, L = (t, e) => X(t, q(e));
12
+ }, A = (t, e) => X(t, q(e));
13
13
  import K from "vue";
14
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";
15
15
  import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js";
16
16
  import { Prop as g } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js";
17
- import { AnalysisMode as F, throttling as J, getPrintLengthToPx as U, getDataLenTimes as H, LeadNameTexts as G, getPointIdxForPx as b } from "@costy-plus/utils";
18
- import { init as Z, Group as D, Polyline as I, Line as E, Text as C, Polygon as ee, util as te } from "zrender";
19
- var ie = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, u = (t, e, i, a) => {
17
+ import { AnalysisMode as F, throttling as J, getPrintLengthToPx as U, getDataLenTimes as L, LeadNameTexts as G, getPointIdxForPx as b } from "@costy-plus/utils";
18
+ import { init as Z, Group as D, Polyline as H, Line as x, Text as C, Polygon as ee, util as te } from "zrender";
19
+ var ie = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, m = (t, e, i, a) => {
20
20
  for (var s = a > 1 ? void 0 : a ? ae(e, i) : e, o = t.length - 1, n; o >= 0; o--)
21
21
  (n = t[o]) && (s = (a ? n(e, i, s) : n(s)) || s);
22
22
  return a && s && ie(e, i, s), s;
@@ -131,7 +131,7 @@ let c = class extends K {
131
131
  }, this.currentHeardBeat = {
132
132
  heardBeat: null,
133
133
  ele: null
134
- }, this.leadNameList = ((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.LeadName) || [], this.totalRows = this.leadModel.line + this.leadModel.add || 1, this.highestAndLowestPoint = (o = this.formatEcgData) == null ? void 0 : o.calcHighestAndLowestPoint(), this.isSingleMode ? this.splitBlockHeight = (((n = this.formatEcgData) == null ? void 0 : n.analysisValueMode) === F.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.totalRows, this.dataTotalTimes = H(
134
+ }, this.leadNameList = ((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.LeadName) || [], this.totalRows = this.leadModel.line + this.leadModel.add || 1, this.highestAndLowestPoint = (o = this.formatEcgData) == null ? void 0 : o.calcHighestAndLowestPoint(), this.isSingleMode ? this.splitBlockHeight = (((n = this.formatEcgData) == null ? void 0 : n.analysisValueMode) === F.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.totalRows, this.dataTotalTimes = L(
135
135
  this.waveFromData[0].length || 0,
136
136
  ((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.SampleRate) || 0
137
137
  ), this.rulerStep = (((r = this.formatEcgData) == null ? void 0 : r.step) || 1) * (((f = this.formatEcgData) == null ? void 0 : f.processedData.otherParams.SampleRate) || 1) / (this.gridConfig.cellMg * 2 + 2);
@@ -147,7 +147,7 @@ let c = class extends K {
147
147
  onDbClickWaveFrom(t, e) {
148
148
  console.log("onDbClickWaveFrom", t);
149
149
  const i = Date.now(), a = () => {
150
- var w, p, m, y;
150
+ var w, p, u, y;
151
151
  const s = t.target.name.split("_");
152
152
  this.activeLeadIdx = +s[0];
153
153
  const o = +s[1];
@@ -158,7 +158,7 @@ let c = class extends K {
158
158
  const f = ((p = this.formatEcgData) == null ? void 0 : p.processedData.otherParams.AnalyseValue) || [];
159
159
  let d = null;
160
160
  if (this.enlargeWaveMode === F.SelectedHeartbeat) {
161
- if (r <= f[1].KeyPosByBeat.Tend + 0.1 * (((m = this.formatEcgData) == null ? void 0 : m.processedData.otherParams.SampleRate) || 0))
161
+ if (r <= f[1].KeyPosByBeat.Tend + 0.1 * (((u = this.formatEcgData) == null ? void 0 : u.processedData.otherParams.SampleRate) || 0))
162
162
  d = f[1];
163
163
  else
164
164
  for (let W = 1; W < f.length; W++)
@@ -168,7 +168,7 @@ let c = class extends K {
168
168
  }
169
169
  } else
170
170
  d = f[0];
171
- console.log("currentAnalyseValue", d, d == null ? void 0 : d.BeatID), d && (this.activeLeadAnalyseValue = L(v({}, d), {
171
+ console.log("currentAnalyseValue", d, d == null ? void 0 : d.BeatID), d && (this.activeLeadAnalyseValue = A(v({}, d), {
172
172
  BeatCount: f.length - 1
173
173
  }), d = null, this.isShowEnlargeWave = !0);
174
174
  };
@@ -177,7 +177,7 @@ let c = class extends K {
177
177
  createLeadHead(t, e) {
178
178
  var s;
179
179
  const i = this.leadHeadConfig.leadHedeWidth / 4, a = ((s = this.formatEcgData) == null ? void 0 : s.sens) || 0;
180
- return new I({
180
+ return new H({
181
181
  cursor: "",
182
182
  shape: {
183
183
  points: [
@@ -215,7 +215,7 @@ let c = class extends K {
215
215
  }
216
216
  creatSplitLine(t, e) {
217
217
  var i;
218
- return new E({
218
+ return new x({
219
219
  cursor: "",
220
220
  shape: {
221
221
  x1: 0 + t,
@@ -305,7 +305,7 @@ let c = class extends K {
305
305
  const t = [], e = this.leadHeadConfig.leadHedeWidth;
306
306
  let i = 0, a = 0, s = [];
307
307
  for (let o = 0; o < this.leadModel.add; o++)
308
- a = this.longLeadConfig[o], i = (o + this.leadModel.line + 1) * this.splitBlockHeight, s = this.waveFromData[a] || [], o === 0 && (this.loopArrowY.add = i), t.push({
308
+ a = this.longLeadConfig.leadIdxs[o], i = (o + this.leadModel.line + 1) * this.splitBlockHeight, s = this.waveFromData[a] || [], o === 0 && (this.loopArrowY.add = i), t.push({
309
309
  pos: [e, i],
310
310
  startInd: this.addSlidingWindowInfo.startInd || 0,
311
311
  endInd: this.addSlidingWindowInfo.endInd || 0,
@@ -320,14 +320,14 @@ let c = class extends K {
320
320
  var o, n, l, r, f, d, w;
321
321
  (o = this.singleWaveFromGroup) == null || o.removeAll();
322
322
  const t = (((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.LeadName) || [])[this.singleModeInfo.defaultSelect] || 0;
323
- let e = this.getRednerSinglePoints(), i = H(this.slidingWindowInfo.points || 0, ((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.SampleRate) || 0), a = 0, s = 0;
323
+ let e = this.getRednerSinglePoints(), i = L(this.slidingWindowInfo.points || 0, ((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.SampleRate) || 0), a = 0, s = 0;
324
324
  for (let p = 0; p < e.length && !(e[p].pos[1] > this.drawArea.height + this.bottomAreaHeight); p++)
325
- this.isLeadDel(t) || (a = parseInt(`${i / 1e3 / 60}`, 10), s = parseInt(`${i / 1e3 % 60}`, 10), a = s === 60 ? a += 1 : a, a = a === 0 ? "00" : a < 10 ? `0${a}` : a, s = s === 0 || s === 60 ? "00" : s < 10 ? `0${s}` : s, (r = this.singleWaveFromGroup) == null || r.add(new I({
325
+ this.isLeadDel(t) || (a = parseInt(`${i / 1e3 / 60}`, 10), s = parseInt(`${i / 1e3 % 60}`, 10), a = s === 60 ? a += 1 : a, a = a === 0 ? "00" : a < 10 ? `0${a}` : a, s = s === 0 || s === 60 ? "00" : s < 10 ? `0${s}` : s, (r = this.singleWaveFromGroup) == null || r.add(new H({
326
326
  cursor: "",
327
327
  name: this.singleModeInfo.defaultSelect + "_" + p,
328
328
  shape: {
329
- points: e[p].data.map(([m, y]) => [
330
- m + e[p].pos[0],
329
+ points: e[p].data.map(([u, y]) => [
330
+ u + e[p].pos[0],
331
331
  y + e[p].pos[1]
332
332
  ])
333
333
  },
@@ -335,8 +335,8 @@ let c = class extends K {
335
335
  stroke: this.leadConfig.lineColor,
336
336
  lineWidth: this.leadConfig.lineWidth
337
337
  },
338
- onclick: (m) => {
339
- this.onDbClickWaveFrom(m, "single");
338
+ onclick: (u) => {
339
+ this.onDbClickWaveFrom(u, "single");
340
340
  }
341
341
  })), (d = this.singleWaveFromGroup) == null || d.add(new C({
342
342
  cursor: "",
@@ -357,9 +357,9 @@ let c = class extends K {
357
357
  console.time("createAddWaveFrom");
358
358
  let t = this.getAddRednerPoints();
359
359
  for (let a = 0; a < t.length; a++)
360
- this.isLeadDel(this.longLeadConfig[a]) || ((e = this.addwaveFromGroup) == null || e.add(new I({
360
+ this.isLeadDel(this.longLeadConfig.leadIdxs[a]) || ((e = this.addwaveFromGroup) == null || e.add(new H({
361
361
  cursor: "",
362
- name: this.longLeadConfig[a] + "_" + a,
362
+ name: this.longLeadConfig.leadIdxs[a] + "_" + a,
363
363
  shape: {
364
364
  points: t[a].data.map(([s, o]) => [
365
365
  s + t[a].pos[0],
@@ -373,7 +373,7 @@ let c = class extends K {
373
373
  onclick: (s) => {
374
374
  this.onDbClickWaveFrom(s, "add");
375
375
  }
376
- })), this.createLeadName(this.longLeadConfig[a], t[a].pos[0], t[a].pos[1] - 15, !0), this.createLeadOffAndDel(this.longLeadConfig[a], t[a].pos[0] - 5, t[a].pos[1] - (((i = this.formatEcgData) == null ? void 0 : i.sens) || 0) / 2 - 15));
376
+ })), this.createLeadName(this.longLeadConfig.leadNames[a], t[a].pos[0], t[a].pos[1] - 15, !0), this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[a], t[a].pos[0] - 5, t[a].pos[1] - (((i = this.formatEcgData) == null ? void 0 : i.sens) || 0) / 2 - 15));
377
377
  console.timeEnd("createAddWaveFrom"), this.addWaveDataCopy = t, t = null;
378
378
  }
379
379
  createRowAndColWaveFrom() {
@@ -381,7 +381,7 @@ let c = class extends K {
381
381
  console.time("createRowAndColWaveFrom"), (i = this.rowAndColwaveFromGroup) == null || i.removeAll();
382
382
  let t = this.getRednerPoints(), e = 0;
383
383
  for (let r = 0; r < t.length; r++)
384
- e = (((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.LeadName) || [])[r] || 0, this.isLeadDel(e) || (s = this.rowAndColwaveFromGroup) == null || s.add(new I({
384
+ e = (((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.LeadName) || [])[r] || 0, this.isLeadDel(e) || (s = this.rowAndColwaveFromGroup) == null || s.add(new H({
385
385
  cursor: "",
386
386
  name: r + "_" + r,
387
387
  shape: {
@@ -413,7 +413,7 @@ let c = class extends K {
413
413
  },
414
414
  oncontextmenu: (o) => {
415
415
  o.event.preventDefault(), this.$emit("notiifyLeadName", {
416
- event: L(v({}, o), {
416
+ event: A(v({}, o), {
417
417
  name: G[t],
418
418
  idx: t
419
419
  }),
@@ -422,7 +422,7 @@ let c = class extends K {
422
422
  },
423
423
  onclick: (o) => {
424
424
  this.$emit("notiifyLeadName", {
425
- event: L(v({}, o), {
425
+ event: A(v({}, o), {
426
426
  name: G[t],
427
427
  idx: t
428
428
  }),
@@ -479,7 +479,7 @@ let c = class extends K {
479
479
  if (this.leadModel.isContinuous)
480
480
  s = e * 5;
481
481
  else if (!this.leadModel.add && ((o = this.formatEcgData) == null ? void 0 : o.step)) {
482
- const d = b(this.splitPoint, this.formatEcgData.step), w = H(d, ((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0) / 1e3;
482
+ const d = b(this.splitPoint, this.formatEcgData.step), w = L(d, ((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0) / 1e3;
483
483
  s = t + w;
484
484
  }
485
485
  for (let d = t; d <= s; d = +(d + 0.1).toFixed(1))
@@ -493,7 +493,7 @@ let c = class extends K {
493
493
  fontFamily: this.fontFamily,
494
494
  fill: "#FF0080"
495
495
  }
496
- }))) : a = this.canvasContainer.height - 5, (r = this.rulerGroup) == null || r.add(new E({
496
+ }))) : a = this.canvasContainer.height - 5, (r = this.rulerGroup) == null || r.add(new x({
497
497
  cursor: "",
498
498
  shape: {
499
499
  x1: i,
@@ -517,7 +517,7 @@ let c = class extends K {
517
517
  (t = this.sceneIns) == null || t.add(this.leadHeadNameGroup), (e = this.sceneIns) == null || e.add(this.leadHeadOffAndDelGroup);
518
518
  }
519
519
  drawLoopArrow(t = 0) {
520
- var l, r, f, d, w, p, m, y, W, x, O, M, R, k, B, z, j;
520
+ var l, r, f, d, w, p, u, y, W, E, O, M, R, k, B, z, j;
521
521
  if (this.drawLoopArrowStartPosIdx = t, !this.heartFight.isShow)
522
522
  return;
523
523
  this.heartFight.mode && this.currentHeardBeat.heardBeat === null && (this.currentHeardBeat.heardBeat = ((l = this.formatEcgData) == null ? void 0 : l.heartBeatPosition[this.heartFight.defaultSelect]) || null, this.drawHeardBeatLine());
@@ -550,19 +550,19 @@ let c = class extends K {
550
550
  ]
551
551
  },
552
552
  style: {
553
- fill: ((m = (p = this.currentHeardBeat) == null ? void 0 : p.heardBeat) == null ? void 0 : m.index) === (h == null ? void 0 : h.index) ? "blue" : "#ccc"
553
+ fill: ((u = (p = this.currentHeardBeat) == null ? void 0 : p.heardBeat) == null ? void 0 : u.index) === (h == null ? void 0 : h.index) ? "blue" : "#ccc"
554
554
  },
555
555
  onclick: (S) => {
556
556
  var N;
557
557
  !this.heartFight.mode || (S.target.attr({
558
558
  style: { fill: "blue" }
559
- }), (N = this.arrowGroup) == null || N.children().filter((A) => A.name === "arrow_box").forEach((A) => {
560
- A.id !== S.target.id && A.attr({
559
+ }), (N = this.arrowGroup) == null || N.children().filter((I) => I.name === "arrow_box").forEach((I) => {
560
+ I.id !== S.target.id && I.attr({
561
561
  style: { fill: "#ccc" }
562
562
  });
563
563
  }), this.arrowLoopClick(h, S.target));
564
564
  }
565
- })), this.heartFight.heartrate && (a = ((W = this.AssistCtx) == null ? void 0 : W.measureText(`${(h == null ? void 0 : h.heartrate) || ""}`).width) || 0, (x = this.arrowGroup) == null || x.add(new C({
565
+ })), this.heartFight.heartrate && (a = ((W = this.AssistCtx) == null ? void 0 : W.measureText(`${(h == null ? void 0 : h.heartrate) || ""}`).width) || 0, (E = this.arrowGroup) == null || E.add(new C({
566
566
  cursor: "",
567
567
  style: v({
568
568
  x: 4 + e - a * 1.5,
@@ -608,24 +608,24 @@ let c = class extends K {
608
608
  if (["Pstart", "Pend", "QRSstart", "QRSend", "Tstart", "Tend"].includes(p) && Object.prototype.hasOwnProperty.call(e, p)) {
609
609
  i = (e[p] - this.slidingWindowInfo.startInd) * (((r = this.formatEcgData) == null ? void 0 : r.step) || 0);
610
610
  e:
611
- for (let m = 0; m < a.length; m++)
612
- if (!(this.isLeadOff(m) || this.isLeadDel(m))) {
613
- if (t > e[p] || !this.leadModel.isContinuous && e[p] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0) || (o = a[m], this.leadModel.isContinuous && m > this.leadModel.line - 1))
611
+ for (let u = 0; u < a.length; u++)
612
+ if (!(this.isLeadOff(u) || this.isLeadDel(u))) {
613
+ if (t > e[p] || !this.leadModel.isContinuous && e[p] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0) || (o = a[u], this.leadModel.isContinuous && u > this.leadModel.line - 1))
614
614
  break e;
615
615
  (f = this.heardBeatLineGroup) == null || f.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
616
616
  }
617
617
  e:
618
- for (let m = 0; m < s.length; m++)
619
- if (!(this.isLeadOff(this.longLeadConfig[m]) && this.isLeadDel(this.longLeadConfig[m]))) {
618
+ for (let u = 0; u < s.length; u++)
619
+ if (!(this.isLeadOff(this.longLeadConfig.leadIdxs[u]) && this.isLeadDel(this.longLeadConfig.leadIdxs[u]))) {
620
620
  if (t > e[p])
621
621
  break e;
622
- o = s[m], (d = this.heardBeatLineGroup) == null || d.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
622
+ o = s[u], (d = this.heardBeatLineGroup) == null || d.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
623
623
  }
624
624
  }
625
625
  (w = this.sceneIns) == null || w.add(this.heardBeatLineGroup), e = null, a = null, s = null;
626
626
  }
627
627
  createHeardBeatLine(t, e) {
628
- return new E({
628
+ return new x({
629
629
  cursor: "",
630
630
  shape: {
631
631
  x1: t,
@@ -674,7 +674,7 @@ let c = class extends K {
674
674
  scrollRuler(t) {
675
675
  var i, a, s;
676
676
  (i = this.rulerGroup) == null || i.removeAll(), (a = this.sceneIns) == null || a.remove(this.rulerGroup);
677
- const e = H(t, ((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.SampleRate) || 0) / 1e3;
677
+ const e = L(t, ((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.SampleRate) || 0) / 1e3;
678
678
  this.drawRuler(e);
679
679
  }
680
680
  scrollArrow(t) {
@@ -682,37 +682,37 @@ let c = class extends K {
682
682
  (e = this.arrowGroup) == null || e.removeAll(), (i = this.sceneIns) == null || i.remove(this.arrowGroup), this.drawLoopArrow(t), this.drawHeardBeatLine(t);
683
683
  }
684
684
  };
685
- u([
685
+ m([
686
686
  g({
687
687
  required: !0,
688
688
  type: Number,
689
689
  validator: (t) => typeof t == "number"
690
690
  })
691
691
  ], c.prototype, "width", 2);
692
- u([
692
+ m([
693
693
  g({
694
694
  required: !0,
695
695
  type: Number,
696
696
  validator: (t) => typeof t == "number"
697
697
  })
698
698
  ], c.prototype, "height", 2);
699
- u([
699
+ m([
700
700
  g({
701
701
  required: !0
702
702
  })
703
703
  ], c.prototype, "gridConfig", 2);
704
- u([
704
+ m([
705
705
  g({
706
706
  default: 5,
707
707
  type: Number
708
708
  })
709
709
  ], c.prototype, "cellPoints", 2);
710
- u([
710
+ m([
711
711
  g({
712
712
  required: !0
713
713
  })
714
714
  ], c.prototype, "conventionalECGConfig", 2);
715
- u([
715
+ m([
716
716
  g({
717
717
  default: () => ({
718
718
  leadHedeWidth: 20,
@@ -721,17 +721,17 @@ u([
721
721
  })
722
722
  })
723
723
  ], c.prototype, "leadHeadConfig", 2);
724
- u([
724
+ m([
725
725
  g({
726
726
  required: !0
727
727
  })
728
728
  ], c.prototype, "formatEcgData", 2);
729
- u([
729
+ m([
730
730
  g({
731
731
  required: !0
732
732
  })
733
733
  ], c.prototype, "leadModel", 2);
734
- u([
734
+ m([
735
735
  g({
736
736
  default: () => ({
737
737
  lineColor: "#000",
@@ -741,12 +741,15 @@ u([
741
741
  })
742
742
  })
743
743
  ], c.prototype, "leadConfig", 2);
744
- u([
744
+ m([
745
745
  g({
746
- default: () => [1, 6, 10]
746
+ default: () => ({
747
+ leadIdxs: [1, 6, 10],
748
+ leadNames: [1, 6, 10]
749
+ })
747
750
  })
748
751
  ], c.prototype, "longLeadConfig", 2);
749
- u([
752
+ m([
750
753
  g({
751
754
  default: () => ({
752
755
  isShow: !1,
@@ -759,7 +762,7 @@ u([
759
762
  })
760
763
  })
761
764
  ], c.prototype, "heartFight", 2);
762
- u([
765
+ m([
763
766
  g({
764
767
  default: () => ({
765
768
  isShow: !0,
@@ -773,65 +776,65 @@ u([
773
776
  })
774
777
  })
775
778
  ], c.prototype, "vuescrollConfig", 2);
776
- u([
779
+ m([
777
780
  g({
778
781
  default: () => ({
779
782
  isShow: !1
780
783
  })
781
784
  })
782
785
  ], c.prototype, "rulerConfig", 2);
783
- u([
786
+ m([
784
787
  g({
785
788
  default: () => ({
786
789
  isShow: !1
787
790
  })
788
791
  })
789
792
  ], c.prototype, "measurRulerConfig", 2);
790
- u([
793
+ m([
791
794
  g({
792
795
  default: () => ({
793
796
  isShow: !1
794
797
  })
795
798
  })
796
799
  ], c.prototype, "paralleRulerConfig", 2);
797
- u([
800
+ m([
798
801
  g({
799
802
  default: () => ({
800
803
  isShow: !1
801
804
  })
802
805
  })
803
806
  ], c.prototype, "magnifierRulerConfig", 2);
804
- u([
807
+ m([
805
808
  g({
806
809
  default: 60
807
810
  })
808
811
  ], c.prototype, "ventricularRate", 2);
809
- u([
812
+ m([
810
813
  g({
811
814
  default: F.CompoundWave
812
815
  })
813
816
  ], c.prototype, "enlargeWaveMode", 2);
814
- u([
817
+ m([
815
818
  g({
816
819
  default: () => []
817
820
  })
818
821
  ], c.prototype, "gains", 2);
819
- u([
822
+ m([
820
823
  g({
821
824
  default: () => []
822
825
  })
823
826
  ], c.prototype, "speeds", 2);
824
- u([
827
+ m([
825
828
  g({
826
829
  default: () => ({
827
830
  defaultSelect: 1
828
831
  })
829
832
  })
830
833
  ], c.prototype, "singleModeInfo", 2);
831
- u([
834
+ m([
832
835
  J(200)
833
836
  ], c.prototype, "handleScroll", 1);
834
- c = u([
837
+ c = m([
835
838
  Q({
836
839
  name: "Methods"
837
840
  })
@@ -8,6 +8,7 @@ declare class ECGWaveForm extends ECGWaveForm_base {
8
8
  protected watchWidth(): void;
9
9
  protected watchHeight(): void;
10
10
  protected watchHeartFight(): void;
11
+ protected watchLongLeadConfig(): void;
11
12
  protected mounted(): void;
12
13
  protected repaint(): void;
13
14
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./style/index.css");require("vue");const l=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Watch.js"),u=require("../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.7.14/node_modules/vuescroll/dist/vuescroll-native.js"),c=require("../BackgroundGrid/index2.js"),h=require("../MeasuringRuler/index2.js"),p=require("../ParallelRuler/index2.js"),v=require("../MagnifierWave/index.js"),m=require("../EnlargeWave/index2.js"),f=require("./method.js");var g=Object.defineProperty,w=Object.getOwnPropertyDescriptor,a=(e,t,n,s)=>{for(var r=s>1?void 0:s?w(t,n):t,i=e.length-1,d;i>=0;i--)(d=e[i])&&(r=(s?d(t,n,r):d(r))||r);return s&&r&&g(t,n,r),r};exports.default=class extends l.mixins(f.default){watchFormatEcgData(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}watchVuescrollConfig(){this.repaint()}watchLeadHeadConfig(){var e,t;(e=this.leadHeadGroup)==null||e.removeAll(),(t=this.sceneIns)==null||t.remove(this.leadHeadGroup),this.drawLeadHead()}watchLeadModel(){this.repaint()}watchWidth(){this.repaint()}watchHeight(){this.repaint()}watchHeartFight(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}mounted(){this.init()}repaint(){var e,t;(e=this.sceneIns)==null||e.clear(),(t=this.sceneIns)==null||t.resize({width:this.canvasContainer.width,height:this.canvasContainer.height}),this.combinationDrawing()}};a([o.Watch("formatEcgData",{deep:!0})],exports.default.prototype,"watchFormatEcgData",1);a([o.Watch("vuescrollConfig",{deep:!0})],exports.default.prototype,"watchVuescrollConfig",1);a([o.Watch("leadHeadConfig",{deep:!0})],exports.default.prototype,"watchLeadHeadConfig",1);a([o.Watch("leadModel",{deep:!0})],exports.default.prototype,"watchLeadModel",1);a([o.Watch("width")],exports.default.prototype,"watchWidth",1);a([o.Watch("height")],exports.default.prototype,"watchHeight",1);a([o.Watch("singleModeInfo",{deep:!0})],exports.default.prototype,"watchHeartFight",1);exports.default=a([l.default({name:"ECGWaveForm",components:{vueScroll:u.default,MXBackgroundGrid:c.default,MXMeasuringRuler:h.default,MXParallelRuler:p.default,MXMagnifierWave:v.default,MXEnlargeWave:m.default}})],exports.default);
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./style/index.css");require("vue");const l=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const r=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Watch.js"),u=require("../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.7.14/node_modules/vuescroll/dist/vuescroll-native.js"),c=require("../BackgroundGrid/index2.js"),h=require("../MeasuringRuler/index2.js"),p=require("../ParallelRuler/index2.js"),f=require("../MagnifierWave/index.js"),v=require("../EnlargeWave/index2.js"),m=require("./method.js");var g=Object.defineProperty,w=Object.getOwnPropertyDescriptor,a=(e,t,s,n)=>{for(var o=n>1?void 0:n?w(t,s):t,i=e.length-1,d;i>=0;i--)(d=e[i])&&(o=(n?d(t,s,o):d(o))||o);return n&&o&&g(t,s,o),o};exports.default=class extends l.mixins(m.default){watchFormatEcgData(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}watchVuescrollConfig(){this.repaint()}watchLeadHeadConfig(){var e,t;(e=this.leadHeadGroup)==null||e.removeAll(),(t=this.sceneIns)==null||t.remove(this.leadHeadGroup),this.drawLeadHead()}watchLeadModel(){this.repaint()}watchWidth(){this.repaint()}watchHeight(){this.repaint()}watchHeartFight(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}watchLongLeadConfig(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}mounted(){this.init()}repaint(){var e,t;(e=this.sceneIns)==null||e.clear(),(t=this.sceneIns)==null||t.resize({width:this.canvasContainer.width,height:this.canvasContainer.height}),this.combinationDrawing()}};a([r.Watch("formatEcgData",{deep:!0})],exports.default.prototype,"watchFormatEcgData",1);a([r.Watch("vuescrollConfig",{deep:!0})],exports.default.prototype,"watchVuescrollConfig",1);a([r.Watch("leadHeadConfig",{deep:!0})],exports.default.prototype,"watchLeadHeadConfig",1);a([r.Watch("leadModel",{deep:!0})],exports.default.prototype,"watchLeadModel",1);a([r.Watch("width")],exports.default.prototype,"watchWidth",1);a([r.Watch("height")],exports.default.prototype,"watchHeight",1);a([r.Watch("singleModeInfo",{deep:!0})],exports.default.prototype,"watchHeartFight",1);a([r.Watch("longLeadConfig",{deep:!0})],exports.default.prototype,"watchLongLeadConfig",1);exports.default=a([l.default({name:"ECGWaveForm",components:{vueScroll:u.default,MXBackgroundGrid:c.default,MXMeasuringRuler:h.default,MXParallelRuler:p.default,MXMagnifierWave:f.default,MXEnlargeWave:v.default}})],exports.default);
@@ -1 +1 @@
1
- "use strict";var R=Object.defineProperty,T=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var k=(t,e,a)=>e in t?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,D=(t,e)=>{for(var a in e||(e={}))B.call(e,a)&&k(t,a,e[a]);if(M)for(var a of M(e))j.call(e,a)&&k(t,a,e[a]);return t},P=(t,e)=>T(t,z(e));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("vue"),N=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const g=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),v=require("@costy-plus/utils"),f=require("zrender"),$=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},q=$(_);var V=Object.defineProperty,X=Object.getOwnPropertyDescriptor,c=(t,e,a,i)=>{for(var s=i>1?void 0:i?X(e,a):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(i?n(e,a,s):n(s))||s);return i&&s&&V(e,a,s),s};exports.default=class extends q.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(100),this.dataTotalTimes=Object.freeze(0),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({Data:{maxPoints:0,minPoints:0},ComplexData:{maxPoints:0,minPoints:0}}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=-1,this.activeLeadAnalyseValue=null,this.isShowEnlargeWave=!1}get canvasContainer(){var t;return{width:this.width,height:this.height-(this.vuescrollConfig.isShow&&parseInt(`${(t=this.vuescrollConfig.bar)==null?void 0:t.size}`)||0)||0}}get waveFromData(){var t,e,a;return((t=this.formatEcgData)==null?void 0:t.analysisValueMode)===v.AnalysisMode.CompoundWave?((e=this.formatEcgData)==null?void 0:e.processedData.handleData.ComplexData)||[]:((a=this.formatEcgData)==null?void 0:a.processedData.handleData.Data)||[]}get isSingleMode(){return this.leadModel.column===1&&this.leadModel.line===1}destroyed(){var t,e,a,i,s,o,n,l,r,p,d;(t=this.rowAndColwaveFromGroup)==null||t.removeAll(),(e=this.singleWaveFromGroup)==null||e.removeAll(),(a=this.addwaveFromGroup)==null||a.removeAll(),(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(p=this.heardBeatLineGroup)==null||p.removeAll(),(d=this.sceneIns)==null||d.dispose()}init(){var t;this.initWaveFormPeer(),this.combinationDrawing(),(t=this.formatEcgData)!=null&&t.processedData.otherParams.PosStart&&(this.vuescrollConfig.isShow?this.$nextTick(()=>{var e,a;this.$refs.vueScroll.scrollBy({dx:(((e=this.formatEcgData)==null?void 0:e.processedData.otherParams.PosStart)||0)*(((a=this.formatEcgData)==null?void 0:a.step)||0)})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){const t=document.getElementById("wave-from-box");this.sceneIns=f.init(t,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const e=document.getElementById("MXGrid");this.AssistCtx=e.getContext("2d")}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var e,a,i,s,o,n,l,r,p;this.rowAndColwaveFromGroup=new f.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new f.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new f.Group({name:"addwaveFrom"}),this.leadHeadGroup=new f.Group({name:"leadHead"}),this.splitLineGroup=new f.Group({name:"splitLine"}),this.leadHeadNameGroup=new f.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new f.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new f.Group({name:"ruler"}),this.arrowGroup=new f.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new f.Group({name:"heardBeatLine"}),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let t=this.canvasContainer.width;if(((a=(e=this.conventionalECGConfig)==null?void 0:e.ecgReviewSetting)==null?void 0:a.ecgareawidth)==="1"){const d=v.getPrintLengthToPx(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;d<=t&&(t=d)}this.drawArea={width:t,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=((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=(o=this.formatEcgData)==null?void 0:o.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.totalRows,this.dataTotalTimes=v.getDataLenTimes(this.waveFromData[0].length||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),this.rulerStep=(((r=this.formatEcgData)==null?void 0:r.step)||1)*(((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.SampleRate)||1)/(this.gridConfig.cellMg*2+2)}isLeadOff(t){var e;return!!(((e=this.formatEcgData)==null?void 0:e.processedData.otherParams.LeadOff)||[]).includes(t)}isLeadDel(t){var e;return!!(((e=this.formatEcgData)==null?void 0:e.processedData.otherParams.LeadDelete)||[]).includes(t)}onDbClickWaveFrom(t,e){console.log("onDbClickWaveFrom",t);const a=Date.now(),i=()=>{var w,u,m,y;const s=t.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let n=0,l=0;e==="single"?(n=t.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):e==="rowAndCol"?(n=t.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):e==="add"&&(n=t.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let r=v.getPointIdxForPx(n,((w=this.formatEcgData)==null?void 0:w.step)||1);r+=l;const p=((u=this.formatEcgData)==null?void 0:u.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(r<=p[1].KeyPosByBeat.Tend+.1*(((m=this.formatEcgData)==null?void 0:m.processedData.otherParams.SampleRate)||0))d=p[1];else for(let C=1;C<p.length;C++)if(r>p[C-1].KeyPosByBeat.Tend+1&&r<p[C].KeyPosByBeat.Tend+.1*(((y=this.formatEcgData)==null?void 0:y.processedData.otherParams.SampleRate)||0)){d=p[C];break}}else d=p[0];console.log("currentAnalyseValue",d,d==null?void 0:d.BeatID),d&&(this.activeLeadAnalyseValue=P(D({},d),{BeatCount:p.length-1}),d=null,this.isShowEnlargeWave=!0)};a-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,i()):this.dbClickWaveFromTime=a}createLeadHead(t,e){var s;const a=this.leadHeadConfig.leadHedeWidth/4,i=((s=this.formatEcgData)==null?void 0:s.sens)||0;return new f.Polyline({cursor:"",shape:{points:[[0+t,0+e],[a+t,0+e],[a+t,-i+e],[3*a+t,-i+e],[3*a+t,0+e],[4*a+t,0+e]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(t,e){var a;return new f.Line({cursor:"",shape:{x1:0+t,y1:0+e,x2:0+t,y2:(((a=this.formatEcgData)==null?void 0:a.sens)||0)+e},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var t,e;for(let a=1;a<=this.totalRows;a++)(t=this.leadHeadGroup)==null||t.add(this.createLeadHead(0,a*this.splitBlockHeight));(e=this.sceneIns)==null||e.add(this.leadHeadGroup)}drawColSplitLine(){var a,i,s,o,n;(a=this.splitLineGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.splitLineGroup);const t=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;this.splitPoint=t,this.isSingleMode&&(this.splitPoint-=80);let e=0;for(let l=1;l<=this.leadModel.column-1;l++){e=l*t+this.leadHeadConfig.leadHedeWidth;for(let r=1;r<=this.leadModel.line;r++)(o=this.splitLineGroup)==null||o.add(this.creatSplitLine(e,r*this.splitBlockHeight-(((s=this.formatEcgData)==null?void 0:s.sens)||0)*.5))}(n=this.sceneIns)==null||n.add(this.splitLineGroup)}initSlidingWindowInfo(){var i,s;const t=((i=this.formatEcgData)==null?void 0:i.step)||0,e=Math.ceil(this.splitPoint/t);this.slidingWindowInfo={points:e,startInd:0,endInd:e},this.vuescrollConfig.isShow&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint);const a=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/t);this.addSlidingWindowInfo={points:a,startInd:0,endInd:a}}getRednerSinglePoints(){let t=0,e=0;const a=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let i=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],n=Math.ceil(a.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){t=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,e=0;for(let r=1;r<=n;r++)e=r*this.splitBlockHeight,r>1&&(e*=.8,i=s,s=i+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=e),o.push({pos:[t,e],startInd:i,endInd:s,data:a.slice(i,s).map((p,d)=>{var w;return[d*(((w=this.formatEcgData)==null?void 0:w.step)||0),-p]})})}return o}getRednerPoints(){let t=0,e=0,a=0,i=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=[];for(let l=0;l<this.leadModel.column;l++){t=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,e=0,this.leadModel.isContinuous&&l>0&&(s=o,o=s+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(e=r*this.splitBlockHeight,!(a>(this.waveFromData||[]).length-1));r++)i=this.waveFromData[a]||[],a++,r===1&&(this.loopArrowY.rowAndCol=e),n.push({pos:[t,e],startInd:s,endInd:o,data:i.slice(s,o).map((p,d)=>{var w;return[d*(((w=this.formatEcgData)==null?void 0:w.step)||0),-p]})})}return n}getAddRednerPoints(){const t=[],e=this.leadHeadConfig.leadHedeWidth;let a=0,i=0,s=[];for(let o=0;o<this.leadModel.add;o++)i=this.longLeadConfig[o],a=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[i]||[],o===0&&(this.loopArrowY.add=a),t.push({pos:[e,a],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((n,l)=>{var r;return[l*(((r=this.formatEcgData)==null?void 0:r.step)||0),-n]})});return t}createSingleWaveFrom(){var o,n,l,r,p,d,w;(o=this.singleWaveFromGroup)==null||o.removeAll();const t=(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let e=this.getRednerSinglePoints(),a=v.getDataLenTimes(this.slidingWindowInfo.points||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),i=0,s=0;for(let u=0;u<e.length&&!(e[u].pos[1]>this.drawArea.height+this.bottomAreaHeight);u++)this.isLeadDel(t)||(i=parseInt(`${a/1e3/60}`,10),s=parseInt(`${a/1e3%60}`,10),i=s===60?i+=1:i,i=i===0?"00":i<10?`0${i}`:i,s=s===0||s===60?"00":s<10?`0${s}`:s,(r=this.singleWaveFromGroup)==null||r.add(new f.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+u,shape:{points:e[u].data.map(([m,y])=>[m+e[u].pos[0],y+e[u].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:m=>{this.onDbClickWaveFrom(m,"single")}})),(d=this.singleWaveFromGroup)==null||d.add(new f.Text({cursor:"",style:{x:e[u].pos[0],y:e[u].pos[1]-(((p=this.formatEcgData)==null?void 0:p.sens)||0)/2,text:u===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),u>0&&(a+=a));this.createLeadName(t,e[0].pos[0]-10,e[0].pos[1]+10),this.createLeadOffAndDel(t,e[0].pos[0]-5,e[0].pos[1]-(((w=this.formatEcgData)==null?void 0:w.sens)||0)/2-15),this.singleWaveDataCopy=e,e=null}createAddWaveFrom(){var e,a;console.time("createAddWaveFrom");let t=this.getAddRednerPoints();for(let i=0;i<t.length;i++)this.isLeadDel(this.longLeadConfig[i])||((e=this.addwaveFromGroup)==null||e.add(new f.Polyline({cursor:"",name:this.longLeadConfig[i]+"_"+i,shape:{points:t[i].data.map(([s,o])=>[s+t[i].pos[0],o+t[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig[i],t[i].pos[0],t[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig[i],t[i].pos[0]-5,t[i].pos[1]-(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=t,t=null}createRowAndColWaveFrom(){var a,i,s,o,n,l;console.time("createRowAndColWaveFrom"),(a=this.rowAndColwaveFromGroup)==null||a.removeAll();let t=this.getRednerPoints(),e=0;for(let r=0;r<t.length;r++)e=(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.LeadName)||[])[r]||0,this.isLeadDel(e)||(s=this.rowAndColwaveFromGroup)==null||s.add(new f.Polyline({cursor:"",name:r+"_"+r,shape:{points:t[r].data.map(([p,d])=>[p+t[r].pos[0],d+t[r].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:p=>{this.onDbClickWaveFrom(p,"rowAndCol")}})),r<this.leadModel.line?(this.createLeadName(e,t[r].pos[0],t[r].pos[1]-15),this.createLeadOffAndDel(e,t[r].pos[0]-5,t[r].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(e,t[r].pos[0]+5,t[r].pos[1]-(((n=this.formatEcgData)==null?void 0:n.sens)||0)/2),this.createLeadOffAndDel(e,t[r].pos[0]-5,t[r].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=t,t=null}createLeadName(t,e,a,i=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new f.Text({style:{x:e,y:a,text:v.LeadNameTexts[t],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:P(D({},o),{name:v.LeadNameTexts[t],idx:t}),isAdd:i})},onclick:o=>{this.$emit("notiifyLeadName",{event:P(D({},o),{name:v.LeadNameTexts[t],idx:t}),isAdd:i})}}))}createLeadOffAndDel(t,e,a){var i;(this.isLeadOff(t)||this.isLeadDel(t))&&((i=this.leadHeadOffAndDelGroup)==null||i.add(new f.Text({cursor:"",style:{x:e,y:a,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var i,s,o,n;if(!this.rulerConfig.isShow)return;const t={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},e=new f.Text({cursor:"",style:D({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.drawArea.height+this.bottomAreaHeight-25},t)}),a=new f.Text({style:D({text:`${(i=this.formatEcgData)==null?void 0:i.gain}mm/mV ${(s=this.formatEcgData)==null?void 0:s.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.drawArea.height+this.bottomAreaHeight-40},t)});(o=this.sceneIns)==null||o.add(a),(n=this.sceneIns)==null||n.add(e)}drawRuler(t=0){var o,n,l,r,p;if(!this.rulerConfig.isShow)return;const e=this.dataTotalTimes/1e3;let a=this.leadHeadConfig.leadHedeWidth,i=0,s=e;if(this.leadModel.isContinuous)s=e*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=v.getPointIdxForPx(this.splitPoint,this.formatEcgData.step),w=v.getDataLenTimes(d,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)/1e3;s=t+w}for(let d=t;d<=s;d=+(d+.1).toFixed(1))d!==t&&(a+=this.rulerStep),d%1===0?(i=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new f.Text({cursor:"",style:{x:a,y:i-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):i=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new f.Line({cursor:"",shape:{x1:a,y1:i,x2:a,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(p=this.sceneIns)==null||p.add(this.rulerGroup)}drawWaveFrom(){var t,e,a;this.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(t=this.sceneIns)==null||t.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(e=this.sceneIns)==null||e.add(this.rowAndColwaveFromGroup),(a=this.sceneIns)==null||a.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(),this.drawLoopArrow()}drawLeadHeadNameAndOffOrDel(){var t,e;(t=this.sceneIns)==null||t.add(this.leadHeadNameGroup),(e=this.sceneIns)==null||e.add(this.leadHeadOffAndDelGroup)}drawLoopArrow(t=0){var l,r,p,d,w,u,m,y,C,I,F,H,G,S,b,x,E;if(this.drawLoopArrowStartPosIdx=t,!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 e=0,a=0;this.leadModel.add?a=this.loopArrowY.add-(((r=this.formatEcgData)==null?void 0:r.sens)||0)-this.splitBlockHeight/3.5:a=20;let i=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let n=0;for(let L=0;L<(((p=this.formatEcgData)==null?void 0:p.heartBeatPosition)||[]).length;L++){const h=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[L];if(n=((h==null?void 0:h.position)||0)-t,!(t>((h==null?void 0:h.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&n>(this.slidingWindowInfo.points||0))){if(((h==null?void 0:h.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;e=n*(((w=this.formatEcgData)==null?void 0:w.step)||0)+this.leadHeadConfig.leadHedeWidth-9.5,s=0,(y=this.arrowGroup)==null||y.add(new f.Polygon({name:"arrow_box",shape:{points:[[4+e,0+a],[15+e,0+a],[15+e,10+a],[19+e,10+a],[9.5+e,22+a],[0+e,10+a],[4+e,10+a],[4+e,0+a]]},style:{fill:((m=(u=this.currentHeardBeat)==null?void 0:u.heardBeat)==null?void 0:m.index)===(h==null?void 0:h.index)?"blue":"#ccc"},onclick:A=>{var O;!this.heartFight.mode||(A.target.attr({style:{fill:"blue"}}),(O=this.arrowGroup)==null||O.children().filter(W=>W.name==="arrow_box").forEach(W=>{W.id!==A.target.id&&W.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(h,A.target))}})),this.heartFight.heartrate&&(i=((C=this.AssistCtx)==null?void 0:C.measureText(`${(h==null?void 0:h.heartrate)||""}`).width)||0,(I=this.arrowGroup)==null||I.add(new f.Text({cursor:"",style:D({x:4+e-i*1.5,y:s+a,text:`${(h==null?void 0:h.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(i=((F=this.AssistCtx)==null?void 0:F.measureText(`${(h==null?void 0:h.interval)||""}`).width)||0,(H=this.arrowGroup)==null||H.add(new f.Text({cursor:"",style:D({x:4+e-i*1.5,y:s+a,text:`${(h==null?void 0:h.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(i=((G=this.AssistCtx)==null?void 0:G.measureText(`${(h==null?void 0:h.qrstCompany)||""}`).width)||0,(S=this.arrowGroup)==null||S.add(new f.Text({cursor:"",style:D({x:4+e-i*1.5,y:s+a,text:`${(h==null?void 0:h.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(i=((b=this.AssistCtx)==null?void 0:b.measureText(`${(h==null?void 0:h.telectricalaxis)||""}`).width)||0,(x=this.arrowGroup)==null||x.add(new f.Text({cursor:"",style:D({x:4+e-i*1.5,y:s+a,text:`${(h==null?void 0:h.telectricalaxis)||""}`},o)})))}}(E=this.sceneIns)==null||E.add(this.arrowGroup)}arrowLoopClick(t,e){this.$emit("notifyHeardBeat",f.util.clone(t)),this.currentHeardBeat.heardBeat=t,this.currentHeardBeat.ele=e,this.drawHeardBeatLine()}drawHeardBeatLine(t=0){var n,l,r,p,d,w;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let e=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,a=0,i=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const u in e)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(u)&&Object.prototype.hasOwnProperty.call(e,u)){a=(e[u]-this.slidingWindowInfo.startInd)*(((r=this.formatEcgData)==null?void 0:r.step)||0);e:for(let m=0;m<i.length;m++)if(!(this.isLeadOff(m)||this.isLeadDel(m))){if(t>e[u]||!this.leadModel.isContinuous&&e[u]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=i[m],this.leadModel.isContinuous&&m>this.leadModel.line-1))break e;(p=this.heardBeatLineGroup)==null||p.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}e:for(let m=0;m<s.length;m++)if(!(this.isLeadOff(this.longLeadConfig[m])&&this.isLeadDel(this.longLeadConfig[m]))){if(t>e[u])break e;o=s[m],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}}(w=this.sceneIns)==null||w.add(this.heardBeatLineGroup),e=null,i=null,s=null}createHeardBeatLine(t,e){return new f.Line({cursor:"",shape:{x1:t,y1:e-10,x2:t,y2:e+10},style:{stroke:"blue",lineWidth:1}})}handleScroll(t,e,a){var i;if(e.type==="horizontal"){e.scrollLeft=e.scrollLeft||0;const s=v.getPointIdxForPx(e.scrollLeft,((i=this.formatEcgData)==null?void 0:i.step)||1);this.scrollWaveFrom(s),this.scrollRuler(s),this.scrollArrow(s),this.$emit("notifyScrollPointIdx",s)}}scrollWaveFrom(t){var i,s;this.slidingWindowInfo.startInd=t,this.slidingWindowInfo.endInd=t+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=t,this.addSlidingWindowInfo.endInd=t+(this.addSlidingWindowInfo.points||0);let e=this.getRednerPoints(),a=this.getAddRednerPoints();this.waveDataCopy=e,this.addWaveDataCopy=a,(i=this.rowAndColwaveFromGroup)==null||i.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:e[n].data.map(([l,r])=>[l+e[n].pos[0],r+e[n].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:a[n].data.map(([l,r])=>[l+a[n].pos[0],r+a[n].pos[1]])}})}),e=null,a=null}scrollRuler(t){var a,i,s;(a=this.rulerGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.rulerGroup);const e=v.getDataLenTimes(t,((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(e)}scrollArrow(t){var e,a;(e=this.arrowGroup)==null||e.removeAll(),(a=this.sceneIns)==null||a.remove(this.arrowGroup),this.drawLoopArrow(t),this.drawHeardBeatLine(t)}};c([g.Prop({required:!0,type:Number,validator:t=>typeof t=="number"})],exports.default.prototype,"width",2);c([g.Prop({required:!0,type:Number,validator:t=>typeof t=="number"})],exports.default.prototype,"height",2);c([g.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([g.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);c([g.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);c([g.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([g.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);c([g.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([g.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([g.Prop({default:()=>[1,6,10]})],exports.default.prototype,"longLeadConfig",2);c([g.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);c([g.Prop({default:()=>({isShow:!0,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"vuescrollConfig",2);c([g.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);c([g.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);c([g.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);c([g.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);c([g.Prop({default:60})],exports.default.prototype,"ventricularRate",2);c([g.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);c([g.Prop({default:()=>[]})],exports.default.prototype,"gains",2);c([g.Prop({default:()=>[]})],exports.default.prototype,"speeds",2);c([g.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);c([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([N.default({name:"Methods"})],exports.default);
1
+ "use strict";var R=Object.defineProperty,T=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var k=(t,e,a)=>e in t?R(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,D=(t,e)=>{for(var a in e||(e={}))B.call(e,a)&&k(t,a,e[a]);if(M)for(var a of M(e))j.call(e,a)&&k(t,a,e[a]);return t},P=(t,e)=>T(t,z(e));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const N=require("vue"),_=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const g=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),v=require("@costy-plus/utils"),f=require("zrender"),$=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},q=$(N);var V=Object.defineProperty,X=Object.getOwnPropertyDescriptor,c=(t,e,a,i)=>{for(var s=i>1?void 0:i?X(e,a):e,o=t.length-1,n;o>=0;o--)(n=t[o])&&(s=(i?n(e,a,s):n(s))||s);return i&&s&&V(e,a,s),s};exports.default=class extends q.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(100),this.dataTotalTimes=Object.freeze(0),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({Data:{maxPoints:0,minPoints:0},ComplexData:{maxPoints:0,minPoints:0}}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=-1,this.activeLeadAnalyseValue=null,this.isShowEnlargeWave=!1}get canvasContainer(){var t;return{width:this.width,height:this.height-(this.vuescrollConfig.isShow&&parseInt(`${(t=this.vuescrollConfig.bar)==null?void 0:t.size}`)||0)||0}}get waveFromData(){var t,e,a;return((t=this.formatEcgData)==null?void 0:t.analysisValueMode)===v.AnalysisMode.CompoundWave?((e=this.formatEcgData)==null?void 0:e.processedData.handleData.ComplexData)||[]:((a=this.formatEcgData)==null?void 0:a.processedData.handleData.Data)||[]}get isSingleMode(){return this.leadModel.column===1&&this.leadModel.line===1}destroyed(){var t,e,a,i,s,o,n,l,r,p,d;(t=this.rowAndColwaveFromGroup)==null||t.removeAll(),(e=this.singleWaveFromGroup)==null||e.removeAll(),(a=this.addwaveFromGroup)==null||a.removeAll(),(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(p=this.heardBeatLineGroup)==null||p.removeAll(),(d=this.sceneIns)==null||d.dispose()}init(){var t;this.initWaveFormPeer(),this.combinationDrawing(),(t=this.formatEcgData)!=null&&t.processedData.otherParams.PosStart&&(this.vuescrollConfig.isShow?this.$nextTick(()=>{var e,a;this.$refs.vueScroll.scrollBy({dx:(((e=this.formatEcgData)==null?void 0:e.processedData.otherParams.PosStart)||0)*(((a=this.formatEcgData)==null?void 0:a.step)||0)})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){const t=document.getElementById("wave-from-box");this.sceneIns=f.init(t,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const e=document.getElementById("MXGrid");this.AssistCtx=e.getContext("2d")}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var e,a,i,s,o,n,l,r,p;this.rowAndColwaveFromGroup=new f.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new f.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new f.Group({name:"addwaveFrom"}),this.leadHeadGroup=new f.Group({name:"leadHead"}),this.splitLineGroup=new f.Group({name:"splitLine"}),this.leadHeadNameGroup=new f.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new f.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new f.Group({name:"ruler"}),this.arrowGroup=new f.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new f.Group({name:"heardBeatLine"}),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let t=this.canvasContainer.width;if(((a=(e=this.conventionalECGConfig)==null?void 0:e.ecgReviewSetting)==null?void 0:a.ecgareawidth)==="1"){const d=v.getPrintLengthToPx(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;d<=t&&(t=d)}this.drawArea={width:t,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=((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=(o=this.formatEcgData)==null?void 0:o.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.totalRows,this.dataTotalTimes=v.getDataLenTimes(this.waveFromData[0].length||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),this.rulerStep=(((r=this.formatEcgData)==null?void 0:r.step)||1)*(((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.SampleRate)||1)/(this.gridConfig.cellMg*2+2)}isLeadOff(t){var e;return!!(((e=this.formatEcgData)==null?void 0:e.processedData.otherParams.LeadOff)||[]).includes(t)}isLeadDel(t){var e;return!!(((e=this.formatEcgData)==null?void 0:e.processedData.otherParams.LeadDelete)||[]).includes(t)}onDbClickWaveFrom(t,e){console.log("onDbClickWaveFrom",t);const a=Date.now(),i=()=>{var w,u,m,y;const s=t.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let n=0,l=0;e==="single"?(n=t.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):e==="rowAndCol"?(n=t.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):e==="add"&&(n=t.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let r=v.getPointIdxForPx(n,((w=this.formatEcgData)==null?void 0:w.step)||1);r+=l;const p=((u=this.formatEcgData)==null?void 0:u.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(r<=p[1].KeyPosByBeat.Tend+.1*(((m=this.formatEcgData)==null?void 0:m.processedData.otherParams.SampleRate)||0))d=p[1];else for(let C=1;C<p.length;C++)if(r>p[C-1].KeyPosByBeat.Tend+1&&r<p[C].KeyPosByBeat.Tend+.1*(((y=this.formatEcgData)==null?void 0:y.processedData.otherParams.SampleRate)||0)){d=p[C];break}}else d=p[0];console.log("currentAnalyseValue",d,d==null?void 0:d.BeatID),d&&(this.activeLeadAnalyseValue=P(D({},d),{BeatCount:p.length-1}),d=null,this.isShowEnlargeWave=!0)};a-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,i()):this.dbClickWaveFromTime=a}createLeadHead(t,e){var s;const a=this.leadHeadConfig.leadHedeWidth/4,i=((s=this.formatEcgData)==null?void 0:s.sens)||0;return new f.Polyline({cursor:"",shape:{points:[[0+t,0+e],[a+t,0+e],[a+t,-i+e],[3*a+t,-i+e],[3*a+t,0+e],[4*a+t,0+e]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(t,e){var a;return new f.Line({cursor:"",shape:{x1:0+t,y1:0+e,x2:0+t,y2:(((a=this.formatEcgData)==null?void 0:a.sens)||0)+e},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var t,e;for(let a=1;a<=this.totalRows;a++)(t=this.leadHeadGroup)==null||t.add(this.createLeadHead(0,a*this.splitBlockHeight));(e=this.sceneIns)==null||e.add(this.leadHeadGroup)}drawColSplitLine(){var a,i,s,o,n;(a=this.splitLineGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.splitLineGroup);const t=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;this.splitPoint=t,this.isSingleMode&&(this.splitPoint-=80);let e=0;for(let l=1;l<=this.leadModel.column-1;l++){e=l*t+this.leadHeadConfig.leadHedeWidth;for(let r=1;r<=this.leadModel.line;r++)(o=this.splitLineGroup)==null||o.add(this.creatSplitLine(e,r*this.splitBlockHeight-(((s=this.formatEcgData)==null?void 0:s.sens)||0)*.5))}(n=this.sceneIns)==null||n.add(this.splitLineGroup)}initSlidingWindowInfo(){var i,s;const t=((i=this.formatEcgData)==null?void 0:i.step)||0,e=Math.ceil(this.splitPoint/t);this.slidingWindowInfo={points:e,startInd:0,endInd:e},this.vuescrollConfig.isShow&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint);const a=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/t);this.addSlidingWindowInfo={points:a,startInd:0,endInd:a}}getRednerSinglePoints(){let t=0,e=0;const a=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let i=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],n=Math.ceil(a.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){t=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,e=0;for(let r=1;r<=n;r++)e=r*this.splitBlockHeight,r>1&&(e*=.8,i=s,s=i+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=e),o.push({pos:[t,e],startInd:i,endInd:s,data:a.slice(i,s).map((p,d)=>{var w;return[d*(((w=this.formatEcgData)==null?void 0:w.step)||0),-p]})})}return o}getRednerPoints(){let t=0,e=0,a=0,i=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=[];for(let l=0;l<this.leadModel.column;l++){t=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,e=0,this.leadModel.isContinuous&&l>0&&(s=o,o=s+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(e=r*this.splitBlockHeight,!(a>(this.waveFromData||[]).length-1));r++)i=this.waveFromData[a]||[],a++,r===1&&(this.loopArrowY.rowAndCol=e),n.push({pos:[t,e],startInd:s,endInd:o,data:i.slice(s,o).map((p,d)=>{var w;return[d*(((w=this.formatEcgData)==null?void 0:w.step)||0),-p]})})}return n}getAddRednerPoints(){const t=[],e=this.leadHeadConfig.leadHedeWidth;let a=0,i=0,s=[];for(let o=0;o<this.leadModel.add;o++)i=this.longLeadConfig.leadIdxs[o],a=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[i]||[],o===0&&(this.loopArrowY.add=a),t.push({pos:[e,a],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((n,l)=>{var r;return[l*(((r=this.formatEcgData)==null?void 0:r.step)||0),-n]})});return t}createSingleWaveFrom(){var o,n,l,r,p,d,w;(o=this.singleWaveFromGroup)==null||o.removeAll();const t=(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let e=this.getRednerSinglePoints(),a=v.getDataLenTimes(this.slidingWindowInfo.points||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),i=0,s=0;for(let u=0;u<e.length&&!(e[u].pos[1]>this.drawArea.height+this.bottomAreaHeight);u++)this.isLeadDel(t)||(i=parseInt(`${a/1e3/60}`,10),s=parseInt(`${a/1e3%60}`,10),i=s===60?i+=1:i,i=i===0?"00":i<10?`0${i}`:i,s=s===0||s===60?"00":s<10?`0${s}`:s,(r=this.singleWaveFromGroup)==null||r.add(new f.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+u,shape:{points:e[u].data.map(([m,y])=>[m+e[u].pos[0],y+e[u].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:m=>{this.onDbClickWaveFrom(m,"single")}})),(d=this.singleWaveFromGroup)==null||d.add(new f.Text({cursor:"",style:{x:e[u].pos[0],y:e[u].pos[1]-(((p=this.formatEcgData)==null?void 0:p.sens)||0)/2,text:u===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),u>0&&(a+=a));this.createLeadName(t,e[0].pos[0]-10,e[0].pos[1]+10),this.createLeadOffAndDel(t,e[0].pos[0]-5,e[0].pos[1]-(((w=this.formatEcgData)==null?void 0:w.sens)||0)/2-15),this.singleWaveDataCopy=e,e=null}createAddWaveFrom(){var e,a;console.time("createAddWaveFrom");let t=this.getAddRednerPoints();for(let i=0;i<t.length;i++)this.isLeadDel(this.longLeadConfig.leadIdxs[i])||((e=this.addwaveFromGroup)==null||e.add(new f.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[i]+"_"+i,shape:{points:t[i].data.map(([s,o])=>[s+t[i].pos[0],o+t[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[i],t[i].pos[0],t[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[i],t[i].pos[0]-5,t[i].pos[1]-(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=t,t=null}createRowAndColWaveFrom(){var a,i,s,o,n,l;console.time("createRowAndColWaveFrom"),(a=this.rowAndColwaveFromGroup)==null||a.removeAll();let t=this.getRednerPoints(),e=0;for(let r=0;r<t.length;r++)e=(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.LeadName)||[])[r]||0,this.isLeadDel(e)||(s=this.rowAndColwaveFromGroup)==null||s.add(new f.Polyline({cursor:"",name:r+"_"+r,shape:{points:t[r].data.map(([p,d])=>[p+t[r].pos[0],d+t[r].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:p=>{this.onDbClickWaveFrom(p,"rowAndCol")}})),r<this.leadModel.line?(this.createLeadName(e,t[r].pos[0],t[r].pos[1]-15),this.createLeadOffAndDel(e,t[r].pos[0]-5,t[r].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(e,t[r].pos[0]+5,t[r].pos[1]-(((n=this.formatEcgData)==null?void 0:n.sens)||0)/2),this.createLeadOffAndDel(e,t[r].pos[0]-5,t[r].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=t,t=null}createLeadName(t,e,a,i=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new f.Text({style:{x:e,y:a,text:v.LeadNameTexts[t],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:P(D({},o),{name:v.LeadNameTexts[t],idx:t}),isAdd:i})},onclick:o=>{this.$emit("notiifyLeadName",{event:P(D({},o),{name:v.LeadNameTexts[t],idx:t}),isAdd:i})}}))}createLeadOffAndDel(t,e,a){var i;(this.isLeadOff(t)||this.isLeadDel(t))&&((i=this.leadHeadOffAndDelGroup)==null||i.add(new f.Text({cursor:"",style:{x:e,y:a,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var i,s,o,n;if(!this.rulerConfig.isShow)return;const t={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},e=new f.Text({cursor:"",style:D({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.drawArea.height+this.bottomAreaHeight-25},t)}),a=new f.Text({style:D({text:`${(i=this.formatEcgData)==null?void 0:i.gain}mm/mV ${(s=this.formatEcgData)==null?void 0:s.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.drawArea.height+this.bottomAreaHeight-40},t)});(o=this.sceneIns)==null||o.add(a),(n=this.sceneIns)==null||n.add(e)}drawRuler(t=0){var o,n,l,r,p;if(!this.rulerConfig.isShow)return;const e=this.dataTotalTimes/1e3;let a=this.leadHeadConfig.leadHedeWidth,i=0,s=e;if(this.leadModel.isContinuous)s=e*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=v.getPointIdxForPx(this.splitPoint,this.formatEcgData.step),w=v.getDataLenTimes(d,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)/1e3;s=t+w}for(let d=t;d<=s;d=+(d+.1).toFixed(1))d!==t&&(a+=this.rulerStep),d%1===0?(i=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new f.Text({cursor:"",style:{x:a,y:i-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):i=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new f.Line({cursor:"",shape:{x1:a,y1:i,x2:a,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(p=this.sceneIns)==null||p.add(this.rulerGroup)}drawWaveFrom(){var t,e,a;this.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(t=this.sceneIns)==null||t.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(e=this.sceneIns)==null||e.add(this.rowAndColwaveFromGroup),(a=this.sceneIns)==null||a.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(),this.drawLoopArrow()}drawLeadHeadNameAndOffOrDel(){var t,e;(t=this.sceneIns)==null||t.add(this.leadHeadNameGroup),(e=this.sceneIns)==null||e.add(this.leadHeadOffAndDelGroup)}drawLoopArrow(t=0){var l,r,p,d,w,u,m,y,C,A,F,H,G,S,x,b,E;if(this.drawLoopArrowStartPosIdx=t,!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 e=0,a=0;this.leadModel.add?a=this.loopArrowY.add-(((r=this.formatEcgData)==null?void 0:r.sens)||0)-this.splitBlockHeight/3.5:a=20;let i=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let n=0;for(let L=0;L<(((p=this.formatEcgData)==null?void 0:p.heartBeatPosition)||[]).length;L++){const h=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[L];if(n=((h==null?void 0:h.position)||0)-t,!(t>((h==null?void 0:h.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&n>(this.slidingWindowInfo.points||0))){if(((h==null?void 0:h.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;e=n*(((w=this.formatEcgData)==null?void 0:w.step)||0)+this.leadHeadConfig.leadHedeWidth-9.5,s=0,(y=this.arrowGroup)==null||y.add(new f.Polygon({name:"arrow_box",shape:{points:[[4+e,0+a],[15+e,0+a],[15+e,10+a],[19+e,10+a],[9.5+e,22+a],[0+e,10+a],[4+e,10+a],[4+e,0+a]]},style:{fill:((m=(u=this.currentHeardBeat)==null?void 0:u.heardBeat)==null?void 0:m.index)===(h==null?void 0:h.index)?"blue":"#ccc"},onclick:I=>{var O;!this.heartFight.mode||(I.target.attr({style:{fill:"blue"}}),(O=this.arrowGroup)==null||O.children().filter(W=>W.name==="arrow_box").forEach(W=>{W.id!==I.target.id&&W.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(h,I.target))}})),this.heartFight.heartrate&&(i=((C=this.AssistCtx)==null?void 0:C.measureText(`${(h==null?void 0:h.heartrate)||""}`).width)||0,(A=this.arrowGroup)==null||A.add(new f.Text({cursor:"",style:D({x:4+e-i*1.5,y:s+a,text:`${(h==null?void 0:h.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(i=((F=this.AssistCtx)==null?void 0:F.measureText(`${(h==null?void 0:h.interval)||""}`).width)||0,(H=this.arrowGroup)==null||H.add(new f.Text({cursor:"",style:D({x:4+e-i*1.5,y:s+a,text:`${(h==null?void 0:h.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(i=((G=this.AssistCtx)==null?void 0:G.measureText(`${(h==null?void 0:h.qrstCompany)||""}`).width)||0,(S=this.arrowGroup)==null||S.add(new f.Text({cursor:"",style:D({x:4+e-i*1.5,y:s+a,text:`${(h==null?void 0:h.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(i=((x=this.AssistCtx)==null?void 0:x.measureText(`${(h==null?void 0:h.telectricalaxis)||""}`).width)||0,(b=this.arrowGroup)==null||b.add(new f.Text({cursor:"",style:D({x:4+e-i*1.5,y:s+a,text:`${(h==null?void 0:h.telectricalaxis)||""}`},o)})))}}(E=this.sceneIns)==null||E.add(this.arrowGroup)}arrowLoopClick(t,e){this.$emit("notifyHeardBeat",f.util.clone(t)),this.currentHeardBeat.heardBeat=t,this.currentHeardBeat.ele=e,this.drawHeardBeatLine()}drawHeardBeatLine(t=0){var n,l,r,p,d,w;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let e=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,a=0,i=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const u in e)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(u)&&Object.prototype.hasOwnProperty.call(e,u)){a=(e[u]-this.slidingWindowInfo.startInd)*(((r=this.formatEcgData)==null?void 0:r.step)||0);e:for(let m=0;m<i.length;m++)if(!(this.isLeadOff(m)||this.isLeadDel(m))){if(t>e[u]||!this.leadModel.isContinuous&&e[u]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=i[m],this.leadModel.isContinuous&&m>this.leadModel.line-1))break e;(p=this.heardBeatLineGroup)==null||p.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}e:for(let m=0;m<s.length;m++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[m])&&this.isLeadDel(this.longLeadConfig.leadIdxs[m]))){if(t>e[u])break e;o=s[m],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}}(w=this.sceneIns)==null||w.add(this.heardBeatLineGroup),e=null,i=null,s=null}createHeardBeatLine(t,e){return new f.Line({cursor:"",shape:{x1:t,y1:e-10,x2:t,y2:e+10},style:{stroke:"blue",lineWidth:1}})}handleScroll(t,e,a){var i;if(e.type==="horizontal"){e.scrollLeft=e.scrollLeft||0;const s=v.getPointIdxForPx(e.scrollLeft,((i=this.formatEcgData)==null?void 0:i.step)||1);this.scrollWaveFrom(s),this.scrollRuler(s),this.scrollArrow(s),this.$emit("notifyScrollPointIdx",s)}}scrollWaveFrom(t){var i,s;this.slidingWindowInfo.startInd=t,this.slidingWindowInfo.endInd=t+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=t,this.addSlidingWindowInfo.endInd=t+(this.addSlidingWindowInfo.points||0);let e=this.getRednerPoints(),a=this.getAddRednerPoints();this.waveDataCopy=e,this.addWaveDataCopy=a,(i=this.rowAndColwaveFromGroup)==null||i.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:e[n].data.map(([l,r])=>[l+e[n].pos[0],r+e[n].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:a[n].data.map(([l,r])=>[l+a[n].pos[0],r+a[n].pos[1]])}})}),e=null,a=null}scrollRuler(t){var a,i,s;(a=this.rulerGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.rulerGroup);const e=v.getDataLenTimes(t,((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(e)}scrollArrow(t){var e,a;(e=this.arrowGroup)==null||e.removeAll(),(a=this.sceneIns)==null||a.remove(this.arrowGroup),this.drawLoopArrow(t),this.drawHeardBeatLine(t)}};c([g.Prop({required:!0,type:Number,validator:t=>typeof t=="number"})],exports.default.prototype,"width",2);c([g.Prop({required:!0,type:Number,validator:t=>typeof t=="number"})],exports.default.prototype,"height",2);c([g.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([g.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);c([g.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);c([g.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([g.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);c([g.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([g.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([g.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([g.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);c([g.Prop({default:()=>({isShow:!0,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"vuescrollConfig",2);c([g.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);c([g.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);c([g.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);c([g.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);c([g.Prop({default:60})],exports.default.prototype,"ventricularRate",2);c([g.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);c([g.Prop({default:()=>[]})],exports.default.prototype,"gains",2);c([g.Prop({default:()=>[]})],exports.default.prototype,"speeds",2);c([g.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);c([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([_.default({name:"Methods"})],exports.default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "costy-plus",
3
- "version": "1.0.10-0",
3
+ "version": "1.0.12-0",
4
4
  "main": "dist/lib/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "scripts": {
@@ -19,7 +19,7 @@
19
19
  "description": "",
20
20
  "typings": "lib/index.d.ts",
21
21
  "dependencies": {
22
- "@costy-plus/utils": "workspace:0.0.3-0",
22
+ "@costy-plus/utils": "0.0.3-0",
23
23
  "element-ui": "~2.15.11",
24
24
  "vuescroll": "~4.17.5",
25
25
  "zrender": "5.4.0"