costy-plus 1.0.97-0 → 1.0.99-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.
@@ -7,6 +7,8 @@ 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 zoomStep: number;
10
12
  /** 前缀 id */
11
13
  protected supportTwoFingerZoom: boolean;
12
14
  /** 前缀 id */
@@ -168,6 +170,9 @@ export default class Methods extends Vue {
168
170
  protected sceneIsMouseDown: Readonly<boolean>;
169
171
  protected sceneIsMouseDownX: number;
170
172
  protected sceneIsMouseDownY: number;
173
+ protected sceneIsStartX: number;
174
+ protected sceneIsStartY: number;
175
+ protected sceneIsMoveUpDown: Readonly<boolean>;
171
176
  protected isShowEnlargeWave: boolean;
172
177
  /** 双指缩放相关 */
173
178
  protected sceneFirstDistance: number;
@@ -1,22 +1,22 @@
1
1
  var $ = Object.defineProperty, Y = Object.defineProperties;
2
2
  var V = Object.getOwnPropertyDescriptors;
3
- var j = Object.getOwnPropertySymbols;
3
+ var T = Object.getOwnPropertySymbols;
4
4
  var _ = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
5
- var X = (e, t, i) => t in e ? $(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, M = (e, t) => {
5
+ var X = (e, t, i) => t in e ? $(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, F = (e, t) => {
6
6
  for (var i in t || (t = {}))
7
7
  _.call(t, i) && X(e, i, t[i]);
8
- if (j)
9
- for (var i of j(t))
8
+ if (T)
9
+ for (var i of T(t))
10
10
  q.call(t, i) && X(e, i, t[i]);
11
11
  return e;
12
- }, A = (e, t) => Y(e, V(t));
12
+ }, S = (e, t) => Y(e, V(t));
13
13
  import U from "vue";
14
14
  import K 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 S, throttling as B, getPrintLengthToPx as Z, getDataLenTimes as G, getDistance as Q, getPointIdxForPx as x, LeadNameTexts as J } from "@costy-plus/utils";
17
+ import { AnalysisMode as A, throttling as B, getPrintLengthToPx as Z, getDataLenTimes as G, getDistance as Q, getPointIdxForPx as x, LeadNameTexts as J } from "@costy-plus/utils";
18
18
  import * as ee from "zrender";
19
- import { Group as W, Text as I, Polyline as H, Line as b, Polygon as te, util as ie } from "zrender";
19
+ import { Group as I, Text as W, Polyline as H, Line as b, Polygon as te, util as ie } from "zrender";
20
20
  var se = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, m = (e, t, i, s) => {
21
21
  for (var a = s > 1 ? void 0 : s ? ae(t, i) : t, o = e.length - 1, r; o >= 0; o--)
22
22
  (r = e[o]) && (a = (s ? r(t, i, a) : r(a)) || a);
@@ -45,7 +45,7 @@ let u = class extends U {
45
45
  }), this.vuescrollWH = {
46
46
  width: 0,
47
47
  height: 0
48
- }, 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.sceneIsMouseDownY = Object.freeze(0), this.isShowEnlargeWave = !1, this.sceneFirstDistance = Object.freeze(0), this.sceneMagnification = 1, this.rulerHistorySlidIdxs = Object.freeze(0);
48
+ }, 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.sceneIsMouseDownY = Object.freeze(0), this.sceneIsStartX = Object.freeze(0), this.sceneIsStartY = Object.freeze(0), this.sceneIsMoveUpDown = Object.freeze(!1), this.isShowEnlargeWave = !1, this.sceneFirstDistance = Object.freeze(0), this.sceneMagnification = 1, this.rulerHistorySlidIdxs = Object.freeze(0);
49
49
  }
50
50
  get canvasContainer() {
51
51
  var e;
@@ -56,7 +56,7 @@ let u = class extends U {
56
56
  }
57
57
  get waveFromData() {
58
58
  var e, t, i;
59
- return ((e = this.formatEcgData) == null ? void 0 : e.analysisValueMode) === S.CompoundWave ? ((t = this.formatEcgData) == null ? void 0 : t.processedData.handleData.ComplexData) || [[]] : ((i = this.formatEcgData) == null ? void 0 : i.processedData.handleData.Data) || [[]];
59
+ return ((e = this.formatEcgData) == null ? void 0 : e.analysisValueMode) === A.CompoundWave ? ((t = this.formatEcgData) == null ? void 0 : t.processedData.handleData.ComplexData) || [[]] : ((i = this.formatEcgData) == null ? void 0 : i.processedData.handleData.Data) || [[]];
60
60
  }
61
61
  get isSingleMode() {
62
62
  return this.leadModel.column === 1 && this.leadModel.line === 1;
@@ -69,8 +69,8 @@ let u = class extends U {
69
69
  };
70
70
  }
71
71
  destroyed() {
72
- var e, t, i, s, a, o, r, l, n, h, d, c;
73
- this.sceneInsEventOff(), (e = this.rowAndColwaveFromGroup) == null || e.removeAll(), (t = this.singleWaveFromGroup) == null || t.removeAll(), (i = this.addwaveFromGroup) == null || i.removeAll(), (s = this.leadHeadGroup) == null || s.removeAll(), (a = this.splitLineGroup) == null || a.removeAll(), (o = this.leadHeadNameGroup) == null || o.removeAll(), (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(), (c = this.sceneIns) == null || c.dispose();
72
+ var e, t, i, s, a, o, r, l, n, d, h, c;
73
+ this.sceneInsEventOff(), (e = this.rowAndColwaveFromGroup) == null || e.removeAll(), (t = this.singleWaveFromGroup) == null || t.removeAll(), (i = this.addwaveFromGroup) == null || i.removeAll(), (s = this.leadHeadGroup) == null || s.removeAll(), (a = this.splitLineGroup) == null || a.removeAll(), (o = this.leadHeadNameGroup) == null || o.removeAll(), (r = this.leadHeadOffAndDelGroup) == null || r.removeAll(), (l = this.rulerGroup) == null || l.removeAll(), (n = this.arrowGroup) == null || n.removeAll(), (d = this.heardBeatLineGroup) == null || d.removeAll(), (h = this.pacingGroup) == null || h.removeAll(), (c = this.sceneIns) == null || c.dispose();
74
74
  }
75
75
  init() {
76
76
  var e;
@@ -104,28 +104,28 @@ let u = class extends U {
104
104
  this.initConfig(), this.drawLeadHead(), this.drawColSplitLine(), this.initSlidingWindowInfo(), this.drawPacing(), this.drawRulerNotes(), this.drawWaveFrom();
105
105
  }
106
106
  initConfig() {
107
- var t, i, s, a, o, r, l, n, h, d, c;
108
- this.rowAndColwaveFromGroup = new W({
107
+ var t, i, s, a, o, r, l, n, d, h, c;
108
+ this.rowAndColwaveFromGroup = new I({
109
109
  name: "rowAndColwaveFrom"
110
- }), this.singleWaveFromGroup = new W({
110
+ }), this.singleWaveFromGroup = new I({
111
111
  name: "singleWaveFrom"
112
- }), this.addwaveFromGroup = new W({
112
+ }), this.addwaveFromGroup = new I({
113
113
  name: "addwaveFrom"
114
- }), this.leadHeadGroup = new W({
114
+ }), this.leadHeadGroup = new I({
115
115
  name: "leadHead"
116
- }), this.splitLineGroup = new W({
116
+ }), this.splitLineGroup = new I({
117
117
  name: "splitLine"
118
- }), this.leadHeadNameGroup = new W({
118
+ }), this.leadHeadNameGroup = new I({
119
119
  name: "leadHeadName"
120
- }), this.leadHeadOffAndDelGroup = new W({
120
+ }), this.leadHeadOffAndDelGroup = new I({
121
121
  name: "leadHeadOffAndDel"
122
- }), this.rulerGroup = new W({
122
+ }), this.rulerGroup = new I({
123
123
  name: "ruler"
124
- }), this.arrowGroup = new W({
124
+ }), this.arrowGroup = new I({
125
125
  name: "arrowLoop"
126
- }), this.heardBeatLineGroup = new W({
126
+ }), this.heardBeatLineGroup = new I({
127
127
  name: "heardBeatLine"
128
- }), this.pacingGroup = new W({
128
+ }), this.pacingGroup = new I({
129
129
  name: "pacing"
130
130
  }), (this.leadModel.name === "12*1" || this.leadModel.name === "18*1" || this.leadModel.name === "15*1" || this.leadModel.name === "16*1") && (this.sceneMagnification = 0.8), this.vuescrollWH.width = this.width, this.vuescrollWH.height = this.height;
131
131
  let e = this.canvasContainer.width;
@@ -152,15 +152,15 @@ let u = class extends U {
152
152
  heardBeat: null,
153
153
  ele: null
154
154
  }, 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)
155
- this.splitBlockHeight = (((n = this.formatEcgData) == null ? void 0 : n.analysisValueMode) === S.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);
155
+ this.splitBlockHeight = (((n = this.formatEcgData) == null ? void 0 : n.analysisValueMode) === A.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);
156
156
  else {
157
157
  let g = this.drawArea.height;
158
158
  this.leadModel.isShowPacing && (g = this.drawArea.height - this.drawBottomPacH), this.splitBlockHeight = g / this.totalRows;
159
159
  }
160
160
  this.dataTotalTimes = G(
161
161
  this.waveFromData[0].length || 0,
162
- ((h = this.formatEcgData) == null ? void 0 : h.processedData.otherParams.SampleRate) || 0
163
- ), this.rulerStep = (((d = this.formatEcgData) == null ? void 0 : d.step) || 1) * (((c = this.formatEcgData) == null ? void 0 : c.processedData.otherParams.SampleRate) || 1) / (this.gridConfig.cellMg * 2 + 2);
162
+ ((d = this.formatEcgData) == null ? void 0 : d.processedData.otherParams.SampleRate) || 0
163
+ ), this.rulerStep = (((h = this.formatEcgData) == null ? void 0 : h.step) || 1) * (((c = this.formatEcgData) == null ? void 0 : c.processedData.otherParams.SampleRate) || 1) / (this.gridConfig.cellMg * 2 + 2);
164
164
  }
165
165
  isLeadOff(e) {
166
166
  var t;
@@ -181,36 +181,37 @@ let u = class extends U {
181
181
  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);
182
182
  let n = x(r, (((c = this.formatEcgData) == null ? void 0 : c.step) || 1) * this.sceneMagnification);
183
183
  n += l;
184
- const h = ((g = this.formatEcgData) == null ? void 0 : g.processedData.otherParams.AnalyseValue) || [];
185
- let d = null;
186
- if (this.enlargeWaveMode === S.SelectedHeartbeat) {
187
- if (n <= h[1].KeyPosByBeat.Tend + 0.1 * (((f = this.formatEcgData) == null ? void 0 : f.processedData.otherParams.SampleRate) || 0))
188
- d = h[1];
184
+ const d = ((g = this.formatEcgData) == null ? void 0 : g.processedData.otherParams.AnalyseValue) || [];
185
+ let h = null;
186
+ if (this.enlargeWaveMode === A.SelectedHeartbeat) {
187
+ if (n <= d[1].KeyPosByBeat.Tend + 0.1 * (((f = this.formatEcgData) == null ? void 0 : f.processedData.otherParams.SampleRate) || 0))
188
+ h = d[1];
189
189
  else
190
- for (let v = 1; v < h.length; v++)
191
- if (n > h[v - 1].KeyPosByBeat.Tend + 1 && n < h[v].KeyPosByBeat.Tend + 0.1 * (((D = this.formatEcgData) == null ? void 0 : D.processedData.otherParams.SampleRate) || 0)) {
192
- d = h[v];
190
+ for (let v = 1; v < d.length; v++)
191
+ if (n > d[v - 1].KeyPosByBeat.Tend + 1 && n < d[v].KeyPosByBeat.Tend + 0.1 * (((D = this.formatEcgData) == null ? void 0 : D.processedData.otherParams.SampleRate) || 0)) {
192
+ h = d[v];
193
193
  break;
194
194
  }
195
195
  } else
196
- d = h[0];
197
- !d || (this.activeLeadAnalyseValue = A(M({}, d), {
198
- BeatCount: h.length - 1
199
- }), d = null, this.$emit("notifyActiveEnlargr"), this.isShowEnlargeWave = !0);
196
+ h = d[0];
197
+ !h || (this.activeLeadAnalyseValue = S(F({}, h), {
198
+ BeatCount: d.length - 1
199
+ }), h = null, this.$emit("notifyActiveEnlargr"), this.isShowEnlargeWave = !0);
200
200
  };
201
201
  i - this.dbClickWaveFromTime < 400 ? (this.dbClickWaveFromTime = 0, s()) : this.dbClickWaveFromTime = i;
202
202
  }
203
203
  sceneInsMousemove(e) {
204
204
  var t;
205
205
  if (e.event.preventDefault(), e.event.stopPropagation(), this.sceneIsMouseDown) {
206
- if (!e.event.touches || e.event.touches.length === 1)
207
- Math.abs(e.offsetY - this.sceneIsMouseDownY) - Math.abs(e.offsetX - this.sceneIsMouseDownX) > 50 ? (this.moveUpAndDown(e.offsetY - this.sceneIsMouseDownY), this.sceneIsMouseDownY = e.offsetY) : (this.scrollConfig.isNativeScroll ? (t = this.$refs[this.prefixId + "nativeScroll"]) == null || t.scrollBy({
206
+ if (!e.event.touches || e.event.touches.length === 1) {
207
+ const i = e.offsetY - this.sceneIsStartY, s = e.offsetX - this.sceneIsStartY;
208
+ Math.abs(i) > Math.abs(s) ? (this.sceneIsMoveUpDown = !0, this.moveUpAndDown(e.offsetY - this.sceneIsMouseDownY), this.sceneIsMouseDownY = e.offsetY) : (this.sceneIsMoveUpDown = !1, this.scrollConfig.isNativeScroll ? (t = this.$refs[this.prefixId + "nativeScroll"]) == null || t.scrollBy({
208
209
  left: -(e.offsetX - this.sceneIsMouseDownX),
209
210
  top: 0
210
211
  }) : this.$refs[this.prefixId + "vueScroll"].scrollBy({
211
212
  dx: -(e.offsetX - this.sceneIsMouseDownX)
212
213
  }), this.sceneIsMouseDownX = e.offsetX);
213
- else if (this.supportTwoFingerZoom && e.event.touches.length === 2) {
214
+ } else if (this.supportTwoFingerZoom && e.event.touches.length === 2) {
214
215
  const i = Q({
215
216
  x: e.event.touches[0].pageX,
216
217
  y: e.event.touches[0].pageY
@@ -218,48 +219,46 @@ let u = class extends U {
218
219
  x: e.event.touches[1].pageX,
219
220
  y: e.event.touches[1].pageY
220
221
  });
221
- this.sceneFirstDistance === 0 && (this.sceneFirstDistance = i), i < this.sceneFirstDistance ? this.sceneMagnification -= 5e-3 : this.sceneMagnification += 5e-3, this.sceneFirstDistance = i, this.zoomWave();
222
+ this.sceneFirstDistance === 0 && (this.sceneFirstDistance = i), i < this.sceneFirstDistance ? this.sceneMagnification -= this.zoomStep : this.sceneMagnification += this.zoomStep, this.sceneFirstDistance = i, this.zoomWave();
222
223
  }
223
224
  }
224
225
  }
225
226
  moveUpAndDown(e) {
226
- window.requestAnimationFrame(() => {
227
- var t, i, s, a, o, r, l, n, h, d;
228
- if (this.isSingleMode) {
229
- const c = this.singleWaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e) + this.singleWaveFromGroup.getBoundingRect().height, g = this.arrowGroup.getBoundingRect().y + (this.arrowGroup.y + e) + this.arrowGroup.getBoundingRect().height, f = c < g ? g : c, D = this.singleWaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e), v = this.arrowGroup.getBoundingRect().y + (this.arrowGroup.y + e), F = D < v ? D : v;
230
- if (f < this.canvasContainer.height - 100 || F > this.canvasContainer.height - 100)
231
- return;
232
- } else {
233
- const c = this.rowAndColwaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e) + this.rowAndColwaveFromGroup.getBoundingRect().height, g = this.arrowGroup.getBoundingRect().y + (this.arrowGroup.y + e) + this.arrowGroup.getBoundingRect().height, f = this.addwaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e) + this.addwaveFromGroup.getBoundingRect().height;
234
- let D = c < g ? g : c;
235
- D = f < D ? D : f;
236
- const v = this.rowAndColwaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e), F = this.arrowGroup.getBoundingRect().y + (this.arrowGroup.y + e), y = this.addwaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e);
237
- let C = v < F ? v : F;
238
- if (C = y < C ? y : C, D < this.canvasContainer.height - 100 || C > this.canvasContainer.height - 100)
239
- return;
240
- }
241
- (t = this.rowAndColwaveFromGroup) == null || t.attr({
242
- y: this.rowAndColwaveFromGroup.y + e
243
- }), (i = this.leadHeadGroup) == null || i.attr({
244
- y: this.leadHeadGroup.y + e
245
- }), (s = this.addwaveFromGroup) == null || s.attr({
246
- y: this.addwaveFromGroup.y + e
247
- }), (a = this.splitLineGroup) == null || a.attr({
248
- y: this.splitLineGroup.y + e
249
- }), (o = this.singleWaveFromGroup) == null || o.attr({
250
- y: this.singleWaveFromGroup.y + e
251
- }), (r = this.leadHeadNameGroup) == null || r.attr({
252
- y: this.leadHeadNameGroup.y + e
253
- }), (l = this.leadHeadOffAndDelGroup) == null || l.attr({
254
- y: this.leadHeadOffAndDelGroup.y + e
255
- }), (n = this.arrowGroup) == null || n.attr({
256
- y: this.arrowGroup.y + e
257
- }), (h = this.heardBeatLineGroup) == null || h.attr({
258
- y: this.heardBeatLineGroup.y + e
259
- }), (d = this.pacingGroup) == null || d.attr({
260
- y: this.pacingGroup.y + e
261
- });
262
- });
227
+ var t, i, s, a, o, r, l, n, d, h;
228
+ if (this.isSingleMode) {
229
+ const c = this.singleWaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e) + this.singleWaveFromGroup.getBoundingRect().height, g = this.arrowGroup.getBoundingRect().y + (this.arrowGroup.y + e) + this.arrowGroup.getBoundingRect().height, f = c < g ? g : c, D = this.singleWaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e), v = this.arrowGroup.getBoundingRect().y + (this.arrowGroup.y + e), M = D < v ? D : v;
230
+ if (f < this.canvasContainer.height - 100 || M > this.canvasContainer.height - 100)
231
+ return;
232
+ } else {
233
+ const c = this.rowAndColwaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e) + this.rowAndColwaveFromGroup.getBoundingRect().height, g = this.arrowGroup.getBoundingRect().y + (this.arrowGroup.y + e) + this.arrowGroup.getBoundingRect().height, f = this.addwaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e) + this.addwaveFromGroup.getBoundingRect().height;
234
+ let D = c < g ? g : c;
235
+ D = f < D ? D : f;
236
+ const v = this.rowAndColwaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e), M = this.arrowGroup.getBoundingRect().y + (this.arrowGroup.y + e), y = this.addwaveFromGroup.getBoundingRect().y + (this.rowAndColwaveFromGroup.y + e);
237
+ let C = v < M ? v : M;
238
+ if (C = y < C ? y : C, D < this.canvasContainer.height - 100 || C > this.canvasContainer.height - 100)
239
+ return;
240
+ }
241
+ this.isSingleMode ? (t = this.singleWaveFromGroup) == null || t.attr({
242
+ y: this.singleWaveFromGroup.y + e
243
+ }) : ((i = this.rowAndColwaveFromGroup) == null || i.attr({
244
+ y: this.rowAndColwaveFromGroup.y + e
245
+ }), (s = this.leadHeadGroup) == null || s.attr({
246
+ y: this.leadHeadGroup.y + e
247
+ }), (a = this.addwaveFromGroup) == null || a.attr({
248
+ y: this.addwaveFromGroup.y + e
249
+ }), (o = this.splitLineGroup) == null || o.attr({
250
+ y: this.splitLineGroup.y + e
251
+ })), (r = this.leadHeadNameGroup) == null || r.attr({
252
+ y: this.leadHeadNameGroup.y + e
253
+ }), (l = this.leadHeadOffAndDelGroup) == null || l.attr({
254
+ y: this.leadHeadOffAndDelGroup.y + e
255
+ }), (n = this.arrowGroup) == null || n.attr({
256
+ y: this.arrowGroup.y + e
257
+ }), (d = this.heardBeatLineGroup) == null || d.attr({
258
+ y: this.heardBeatLineGroup.y + e
259
+ }), this.leadModel.isShowPacing && ((h = this.pacingGroup) == null || h.attr({
260
+ y: this.pacingGroup.y + e
261
+ }));
263
262
  }
264
263
  zoomWave() {
265
264
  var s, a, o;
@@ -270,10 +269,10 @@ let u = class extends U {
270
269
  this.addSlidingWindowInfo.points = i, this.drawLeadHead(), this.drawColSplitLine(), this.isSingleMode ? (this.slidingWindowInfo.endInd = t, this.addWaveDataCopy = [], this.waveDataCopy = [], this.createSingleWaveFrom(), (o = this.sceneIns) == null || o.add(this.singleWaveFromGroup)) : this.scrollWaveFrom(this.rulerHistorySlidIdxs), this.scrollRuler(this.rulerHistorySlidIdxs), this.scrollArrow(this.rulerHistorySlidIdxs);
271
270
  }
272
271
  sceneInsMouseDown(e) {
273
- e.event.preventDefault(), e.event.stopPropagation(), this.sceneIsMouseDown = !0, !e.event.touches || e.event.touches.length === 1 ? (this.sceneIsMouseDownX = e.offsetX, this.sceneIsMouseDownY = e.offsetY) : e.event.touches.length;
272
+ e.event.preventDefault(), e.event.stopPropagation(), this.sceneIsMouseDown = !0, !e.event.touches || e.event.touches.length === 1 ? (this.sceneIsMouseDownX = e.offsetX, this.sceneIsMouseDownY = e.offsetY, this.sceneIsStartX = e.offsetX, this.sceneIsStartY = e.offsetY) : e.event.touches.length;
274
273
  }
275
274
  sceneInsMouseUp(e) {
276
- e.event.preventDefault(), e.event.stopPropagation(), this.sceneIsMouseDown = !1;
275
+ e.event.preventDefault(), e.event.stopPropagation(), this.sceneIsMouseDown = !1, this.sceneIsMoveUpDown = !1;
277
276
  }
278
277
  drawPacing() {
279
278
  var i, s, a, o, r, l, n;
@@ -281,7 +280,7 @@ let u = class extends U {
281
280
  return;
282
281
  (a = this.pacingGroup) == null || a.removeAll(), (o = this.sceneIns) == null || o.remove(this.pacingGroup);
283
282
  const e = this.leadHeadConfig.leadHedeWidth, t = this.canvasContainer.height - this.drawBottomPacH;
284
- (r = this.pacingGroup) == null || r.add(new I({
283
+ (r = this.pacingGroup) == null || r.add(new W({
285
284
  cursor: "",
286
285
  style: {
287
286
  x: e,
@@ -378,7 +377,7 @@ let u = class extends U {
378
377
  (l = this.sceneIns) == null || l.add(this.leadHeadGroup);
379
378
  }
380
379
  drawColSplitLine() {
381
- var a, o, r, l, n, h, d, c, g, f, D, v, F;
380
+ var a, o, r, l, n, d, h, c, g, f, D, v, M;
382
381
  (a = this.splitLineGroup) == null || a.removeAll(), (o = this.sceneIns) == null || o.remove(this.splitLineGroup);
383
382
  const e = (this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / this.leadModel.column;
384
383
  if (this.splitPoint = e, this.isSingleMode) {
@@ -386,15 +385,15 @@ let u = class extends U {
386
385
  Math.ceil(this.splitPoint / ((((r = this.formatEcgData) == null ? void 0 : r.step) || 1) * this.sceneMagnification)) || 0,
387
386
  ((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.SampleRate) || 0
388
387
  ), C = parseInt(`${y / 1e3 % 60}`, 10);
389
- this.splitPoint = C * (((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0) * (((h = this.formatEcgData) == null ? void 0 : h.step) || 0) * this.sceneMagnification;
388
+ this.splitPoint = C * (((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0) * (((d = this.formatEcgData) == null ? void 0 : d.step) || 0) * this.sceneMagnification;
390
389
  }
391
390
  let t = 0, i = 0, s = 0;
392
391
  for (let y = 1; y <= this.leadModel.column - 1; y++) {
393
392
  t = y * e + this.leadHeadConfig.leadHedeWidth, i = y * this.leadModel.line;
394
- for (let C = 1; C <= this.leadModel.line && (s = (((d = this.formatEcgData) == null ? void 0 : d.processedData.otherParams.LeadName) || [])[C - 1 + i], s !== void 0); C++)
393
+ for (let C = 1; C <= this.leadModel.line && (s = (((h = this.formatEcgData) == null ? void 0 : h.processedData.otherParams.LeadName) || [])[C - 1 + i], s !== void 0); C++)
395
394
  ((c = this.formatEcgData) == null ? void 0 : c.gainName) === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.LeadNameTextsPorps[s]) ? (f = this.splitLineGroup) == null || f.add(this.creatSplitLine(t, C * this.splitBlockHeight - (((g = this.formatEcgData) == null ? void 0 : g.sens) || 0) * this.sceneMagnification / 2 * 0.5, !0)) : (v = this.splitLineGroup) == null || v.add(this.creatSplitLine(t, C * this.splitBlockHeight - (((D = this.formatEcgData) == null ? void 0 : D.sens) || 0) * this.sceneMagnification * 0.5));
396
395
  }
397
- (F = this.sceneIns) == null || F.add(this.splitLineGroup);
396
+ (M = this.sceneIns) == null || M.add(this.splitLineGroup);
398
397
  }
399
398
  initSlidingWindowInfo() {
400
399
  var s, a;
@@ -423,9 +422,9 @@ let u = class extends U {
423
422
  pos: [e, t],
424
423
  startInd: s,
425
424
  endInd: a,
426
- data: i.slice(s, a).map((h, d) => {
425
+ data: i.slice(s, a).map((d, h) => {
427
426
  var c;
428
- return [d * (((c = this.formatEcgData) == null ? void 0 : c.step) || 0) * this.sceneMagnification, -h * this.sceneMagnification];
427
+ return [h * (((c = this.formatEcgData) == null ? void 0 : c.step) || 0) * this.sceneMagnification, -d * this.sceneMagnification];
429
428
  })
430
429
  });
431
430
  }
@@ -441,9 +440,9 @@ let u = class extends U {
441
440
  pos: [e, t],
442
441
  startInd: a,
443
442
  endInd: o,
444
- data: s.slice(a, o).map((h, d) => {
443
+ data: s.slice(a, o).map((d, h) => {
445
444
  var c;
446
- return [d * (((c = this.formatEcgData) == null ? void 0 : c.step) || 0) * this.sceneMagnification, -h * this.sceneMagnification];
445
+ return [h * (((c = this.formatEcgData) == null ? void 0 : c.step) || 0) * this.sceneMagnification, -d * this.sceneMagnification];
447
446
  })
448
447
  });
449
448
  }
@@ -465,14 +464,14 @@ let u = class extends U {
465
464
  return e;
466
465
  }
467
466
  createSingleWaveFrom() {
468
- var r, l, n, h, d, c, g;
467
+ var r, l, n, d, h, c, g;
469
468
  (r = this.singleWaveFromGroup) == null || r.removeAll();
470
469
  const e = (((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.LeadName) || [])[this.singleModeInfo.defaultSelect] || 0;
471
470
  let t = this.getRednerSinglePoints(), i = G(this.slidingWindowInfo.points || 0, ((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0);
472
471
  const s = i;
473
472
  let a = 0, o = 0;
474
473
  for (let f = 0; f < t.length && !(t[f].pos[1] > this.drawArea.height + this.bottomAreaHeight); f++)
475
- this.isLeadDel(e) || (a = Math.floor(i / 1e3 / 60), o = Math.floor(i / 1e3 % 60), a = o === 60 ? a += 1 : a, a = a === 0 ? "00" : a < 10 ? `0${a}` : a, o = o === 0 || o === 60 ? "00" : o < 10 ? `0${o}` : o, (h = this.singleWaveFromGroup) == null || h.add(new H({
474
+ this.isLeadDel(e) || (a = Math.floor(i / 1e3 / 60), o = Math.floor(i / 1e3 % 60), a = o === 60 ? a += 1 : a, a = a === 0 ? "00" : a < 10 ? `0${a}` : a, o = o === 0 || o === 60 ? "00" : o < 10 ? `0${o}` : o, (d = this.singleWaveFromGroup) == null || d.add(new H({
476
475
  cursor: "",
477
476
  name: this.singleModeInfo.defaultSelect + "_" + f,
478
477
  shape: {
@@ -488,11 +487,11 @@ let u = class extends U {
488
487
  onclick: (D) => {
489
488
  this.onDbClickWaveFrom(D, "single");
490
489
  }
491
- })), (c = this.singleWaveFromGroup) == null || c.add(new I({
490
+ })), (c = this.singleWaveFromGroup) == null || c.add(new W({
492
491
  cursor: "",
493
492
  style: {
494
493
  x: t[f].pos[0],
495
- y: t[f].pos[1] - (((d = this.formatEcgData) == null ? void 0 : d.sens) || 0) * this.sceneMagnification / 2,
494
+ y: t[f].pos[1] - (((h = this.formatEcgData) == null ? void 0 : h.sens) || 0) * this.sceneMagnification / 2,
496
495
  text: f === 0 ? "00:00 \u5FC3\u7387" : `${a}:${o} \u5FC3\u7387`,
497
496
  fontWeight: "bold",
498
497
  fontSize: 14,
@@ -535,24 +534,24 @@ let u = class extends U {
535
534
  cursor: "",
536
535
  name: n + "_" + n,
537
536
  shape: {
538
- points: e[n].data.map(([h, d]) => [
539
- h + e[n].pos[0],
540
- d + e[n].pos[1]
537
+ points: e[n].data.map(([d, h]) => [
538
+ d + e[n].pos[0],
539
+ h + e[n].pos[1]
541
540
  ])
542
541
  },
543
542
  style: {
544
543
  stroke: this.leadConfig.lineColor,
545
544
  lineWidth: this.leadConfig.lineWidth
546
545
  },
547
- onclick: (h) => {
548
- this.onDbClickWaveFrom(h, "rowAndCol");
546
+ onclick: (d) => {
547
+ this.onDbClickWaveFrom(d, "rowAndCol");
549
548
  }
550
549
  })), 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) * this.sceneMagnification / 2 - 15)) : (this.createLeadName(t, e[n].pos[0] + 5, e[n].pos[1] - (((r = this.formatEcgData) == null ? void 0 : r.sens) || 0) * this.sceneMagnification / 2), this.createLeadOffAndDel(t, e[n].pos[0] - 5, e[n].pos[1] - (((l = this.formatEcgData) == null ? void 0 : l.sens) || 0) * this.sceneMagnification / 2 + 9));
551
550
  this.waveDataCopy = e, e = null;
552
551
  }
553
552
  createLeadName(e, t, i, s = !1) {
554
553
  var a;
555
- (a = this.leadHeadNameGroup) == null || a.add(new I({
554
+ (a = this.leadHeadNameGroup) == null || a.add(new W({
556
555
  style: {
557
556
  x: t,
558
557
  y: i,
@@ -563,7 +562,7 @@ let u = class extends U {
563
562
  },
564
563
  oncontextmenu: (o) => {
565
564
  o.event.preventDefault(), this.$emit("notiifyLeadName", {
566
- event: A(M({}, o), {
565
+ event: S(F({}, o), {
567
566
  name: this.LeadNameTextsPorps[e],
568
567
  idx: e
569
568
  }),
@@ -572,7 +571,7 @@ let u = class extends U {
572
571
  },
573
572
  onclick: (o) => {
574
573
  this.$emit("notiifyLeadName", {
575
- event: A(M({}, o), {
574
+ event: S(F({}, o), {
576
575
  name: this.LeadNameTextsPorps[e],
577
576
  idx: e
578
577
  }),
@@ -583,7 +582,7 @@ let u = class extends U {
583
582
  }
584
583
  createLeadOffAndDel(e, t, i) {
585
584
  var s;
586
- (this.isLeadOff(e) || this.isLeadDel(e)) && ((s = this.leadHeadOffAndDelGroup) == null || s.add(new I({
585
+ (this.isLeadOff(e) || this.isLeadDel(e)) && ((s = this.leadHeadOffAndDelGroup) == null || s.add(new W({
587
586
  cursor: "",
588
587
  style: {
589
588
  x: t,
@@ -604,15 +603,15 @@ let u = class extends U {
604
603
  fill: "#FF0080",
605
604
  fontSize: 13,
606
605
  fontFamily: this.fontFamily
607
- }, t = new I({
606
+ }, t = new W({
608
607
  cursor: "",
609
- style: M({
608
+ style: F({
610
609
  text: "(s)",
611
610
  x: this.leadHeadConfig.leadHedeWidth / 2 - 8,
612
611
  y: this.canvasContainer.height - 25
613
612
  }, e)
614
- }), i = new I({
615
- style: M({
613
+ }), i = new W({
614
+ style: F({
616
615
  text: `${((s = this.formatEcgData) == null ? void 0 : s.gainName) === "\u80F8\u5BFC\u51CF\u534A" ? (a = this.formatEcgData) == null ? void 0 : a.gainName : `${(o = this.formatEcgData) == null ? void 0 : o.gain}mm/mV`} ${(r = this.formatEcgData) == null ? void 0 : r.speed}mm/s`,
617
616
  x: this.leadHeadConfig.leadHedeWidth / 2 + 20,
618
617
  y: this.canvasContainer.height - this.ruleH
@@ -621,7 +620,7 @@ let u = class extends U {
621
620
  (l = this.sceneIns) == null || l.add(i), (n = this.sceneIns) == null || n.add(t);
622
621
  }
623
622
  drawRuler(e = 0) {
624
- var o, r, l, n, h;
623
+ var o, r, l, n, d;
625
624
  if (!this.rulerConfig.isShow)
626
625
  return;
627
626
  const t = this.dataTotalTimes / 1e3;
@@ -629,16 +628,16 @@ let u = class extends U {
629
628
  if (this.leadModel.isContinuous)
630
629
  a = t * 5;
631
630
  else if (!this.leadModel.add && ((o = this.formatEcgData) == null ? void 0 : o.step)) {
632
- const d = x(this.splitPoint, this.formatEcgData.step * this.sceneMagnification), c = G(d, ((r = this.formatEcgData) == null ? void 0 : r.processedData.otherParams.SampleRate) || 0) / 1e3;
631
+ const h = x(this.splitPoint, this.formatEcgData.step * this.sceneMagnification), c = G(h, ((r = this.formatEcgData) == null ? void 0 : r.processedData.otherParams.SampleRate) || 0) / 1e3;
633
632
  a = e + c;
634
633
  }
635
- for (let d = e; d <= a; d = +(d + 0.1).toFixed(1))
636
- d !== e && (i += this.rulerStep * this.sceneMagnification), d % 1 === 0 ? (s = this.canvasContainer.height - 10, (l = this.rulerGroup) == null || l.add(new I({
634
+ for (let h = e; h <= a; h = +(h + 0.1).toFixed(1))
635
+ h !== e && (i += this.rulerStep * this.sceneMagnification), h % 1 === 0 ? (s = this.canvasContainer.height - 10, (l = this.rulerGroup) == null || l.add(new W({
637
636
  cursor: "",
638
637
  style: {
639
638
  x: i,
640
639
  y: s - 15,
641
- text: d + "",
640
+ text: h + "",
642
641
  fontSize: 13,
643
642
  fontFamily: this.fontFamily,
644
643
  fill: "#FF0080"
@@ -656,7 +655,7 @@ let u = class extends U {
656
655
  lineWidth: 2
657
656
  }
658
657
  }));
659
- (h = this.sceneIns) == null || h.add(this.rulerGroup);
658
+ (d = this.sceneIns) == null || d.add(this.rulerGroup);
660
659
  }
661
660
  drawWaveFrom() {
662
661
  var e, t, i;
@@ -667,7 +666,7 @@ let u = class extends U {
667
666
  (e = this.sceneIns) == null || e.add(this.leadHeadNameGroup), (t = this.sceneIns) == null || t.add(this.leadHeadOffAndDelGroup);
668
667
  }
669
668
  drawLoopArrow(e = 0) {
670
- var l, n, h, d, c, g, f, D, v, F, y, C, O, R, z, N, k;
669
+ var l, n, d, h, c, g, f, D, v, M, y, C, O, R, z, N, k;
671
670
  if (this.drawLoopArrowStartPosIdx = e, !this.heartFight.isShow)
672
671
  return;
673
672
  this.heartFight.mode && this.currentHeardBeat.heardBeat === null && (this.currentHeardBeat.heardBeat = ((l = this.formatEcgData) == null ? void 0 : l.heartBeatPosition[this.heartFight.defaultSelect]) || null, this.drawHeardBeatLine());
@@ -680,8 +679,8 @@ let u = class extends U {
680
679
  fontFamily: this.fontFamily
681
680
  };
682
681
  let r = 0;
683
- for (let L = 0; L < (((h = this.formatEcgData) == null ? void 0 : h.heartBeatPosition) || []).length; L++) {
684
- const p = (d = this.formatEcgData) == null ? void 0 : d.heartBeatPosition[L];
682
+ for (let L = 0; L < (((d = this.formatEcgData) == null ? void 0 : d.heartBeatPosition) || []).length; L++) {
683
+ const p = (h = this.formatEcgData) == null ? void 0 : h.heartBeatPosition[L];
685
684
  if (r = ((p == null ? void 0 : p.position) || 0) - e, !(e > ((p == null ? void 0 : p.position) || 0)) && !(!this.leadModel.isContinuous && !this.leadModel.add && r > (this.slidingWindowInfo.points || 0)) && !(this.isSingleMode && this.singleModeInfo && r > (this.slidingWindowInfo.points || 0))) {
686
685
  if (((p == null ? void 0 : p.position) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))
687
686
  break;
@@ -703,39 +702,39 @@ let u = class extends U {
703
702
  fill: ((f = (g = this.currentHeardBeat) == null ? void 0 : g.heardBeat) == null ? void 0 : f.index) === (p == null ? void 0 : p.index) ? "blue" : "#ccc"
704
703
  },
705
704
  onclick: (E) => {
706
- var T;
705
+ var j;
707
706
  !this.heartFight.mode || (E.target.attr({
708
707
  style: { fill: "blue" }
709
- }), (T = this.arrowGroup) == null || T.children().filter((P) => P.name === "arrow_box").forEach((P) => {
708
+ }), (j = this.arrowGroup) == null || j.children().filter((P) => P.name === "arrow_box").forEach((P) => {
710
709
  P.id !== E.target.id && P.attr({
711
710
  style: { fill: "#ccc" }
712
711
  });
713
712
  }), this.arrowLoopClick(p, E.target));
714
713
  }
715
- })), this.heartFight.heartrate && (s = ((v = this.AssistCtx) == null ? void 0 : v.measureText(`${(p == null ? void 0 : p.heartrate) || ""}`).width) || 0, (F = this.arrowGroup) == null || F.add(new I({
714
+ })), this.heartFight.heartrate && (s = ((v = this.AssistCtx) == null ? void 0 : v.measureText(`${(p == null ? void 0 : p.heartrate) || ""}`).width) || 0, (M = this.arrowGroup) == null || M.add(new W({
716
715
  cursor: "",
717
- style: M({
716
+ style: F({
718
717
  x: 4 + t - s * 1.5,
719
718
  y: a + i,
720
719
  text: `${(p == null ? void 0 : p.heartrate) || ""}`
721
720
  }, o)
722
- })), a += 12), this.heartFight.interval && (s = ((y = this.AssistCtx) == null ? void 0 : y.measureText(`${(p == null ? void 0 : p.interval) || ""}`).width) || 0, (C = this.arrowGroup) == null || C.add(new I({
721
+ })), a += 12), this.heartFight.interval && (s = ((y = this.AssistCtx) == null ? void 0 : y.measureText(`${(p == null ? void 0 : p.interval) || ""}`).width) || 0, (C = this.arrowGroup) == null || C.add(new W({
723
722
  cursor: "",
724
- style: M({
723
+ style: F({
725
724
  x: 4 + t - s * 1.5,
726
725
  y: a + i,
727
726
  text: `${(p == null ? void 0 : p.interval) || ""}`
728
727
  }, o)
729
- })), a += 12), this.heartFight.qrstCompany && (s = ((O = this.AssistCtx) == null ? void 0 : O.measureText(`${(p == null ? void 0 : p.qrstCompany) || ""}`).width) || 0, (R = this.arrowGroup) == null || R.add(new I({
728
+ })), a += 12), this.heartFight.qrstCompany && (s = ((O = this.AssistCtx) == null ? void 0 : O.measureText(`${(p == null ? void 0 : p.qrstCompany) || ""}`).width) || 0, (R = this.arrowGroup) == null || R.add(new W({
730
729
  cursor: "",
731
- style: M({
730
+ style: F({
732
731
  x: 4 + t - s * 1.5,
733
732
  y: a + i,
734
733
  text: `${(p == null ? void 0 : p.qrstCompany) || ""}`
735
734
  }, o)
736
- })), a += 12), this.heartFight.telectricalaxis && (s = ((z = this.AssistCtx) == null ? void 0 : z.measureText(`${(p == null ? void 0 : p.telectricalaxis) || ""}`).width) || 0, (N = this.arrowGroup) == null || N.add(new I({
735
+ })), a += 12), this.heartFight.telectricalaxis && (s = ((z = this.AssistCtx) == null ? void 0 : z.measureText(`${(p == null ? void 0 : p.telectricalaxis) || ""}`).width) || 0, (N = this.arrowGroup) == null || N.add(new W({
737
736
  cursor: "",
738
- style: M({
737
+ style: F({
739
738
  x: 4 + t - s * 1.5,
740
739
  y: a + i,
741
740
  text: `${(p == null ? void 0 : p.telectricalaxis) || ""}`
@@ -749,7 +748,7 @@ let u = class extends U {
749
748
  this.$emit("notifyHeardBeat", ie.clone(e)), this.currentHeardBeat.heardBeat = e, this.currentHeardBeat.ele = t, this.drawHeardBeatLine();
750
749
  }
751
750
  drawHeardBeatLine(e = 0) {
752
- var r, l, n, h, d, c;
751
+ var r, l, n, d, h, c;
753
752
  if (!this.currentHeardBeat.heardBeat)
754
753
  return;
755
754
  (r = this.heardBeatLineGroup) == null || r.removeAll(), (l = this.sceneIns) == null || l.remove(this.heardBeatLineGroup);
@@ -762,14 +761,14 @@ let u = class extends U {
762
761
  if (!(this.isLeadOff(f) || this.isLeadDel(f))) {
763
762
  if (e > t[g] || !this.leadModel.isContinuous && t[g] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0) || (o = s[f], this.leadModel.isContinuous && f > this.leadModel.line - 1))
764
763
  break e;
765
- (h = this.heardBeatLineGroup) == null || h.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
764
+ (d = this.heardBeatLineGroup) == null || d.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
766
765
  }
767
766
  e:
768
767
  for (let f = 0; f < a.length; f++)
769
768
  if (!(this.isLeadOff(this.longLeadConfig.leadIdxs[f]) && this.isLeadDel(this.longLeadConfig.leadIdxs[f]))) {
770
769
  if (e > t[g])
771
770
  break e;
772
- o = a[f], (d = this.heardBeatLineGroup) == null || d.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
771
+ o = a[f], (h = this.heardBeatLineGroup) == null || h.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
773
772
  }
774
773
  }
775
774
  (c = this.sceneIns) == null || c.add(this.heardBeatLineGroup), t = null, s = null, a = null;
@@ -797,6 +796,8 @@ let u = class extends U {
797
796
  }
798
797
  scrollCommon(e) {
799
798
  var i;
799
+ if (this.sceneIsMoveUpDown)
800
+ return;
800
801
  const t = x(e, (((i = this.formatEcgData) == null ? void 0 : i.step) || 1) * this.sceneMagnification);
801
802
  this.rulerHistorySlidIdxs = t, this.scrollWaveFrom(t), this.scrollRuler(t), this.scrollArrow(t), this.$emit("notifyScrollPointIdx", t);
802
803
  }
@@ -804,21 +805,21 @@ let u = class extends U {
804
805
  var s, a, o, r, l, n;
805
806
  this.slidingWindowInfo.startInd = e, this.slidingWindowInfo.endInd = e + (this.slidingWindowInfo.points || 0), this.addSlidingWindowInfo.startInd = e, this.addSlidingWindowInfo.endInd = e + (this.addSlidingWindowInfo.points || 0);
806
807
  let t = this.getRednerPoints(), i = this.getAddRednerPoints();
807
- this.waveDataCopy = t, this.addWaveDataCopy = i, (s = this.rowAndColwaveFromGroup) == null || s.eachChild((h, d) => {
808
- d = d || 0, h.attr({
808
+ this.waveDataCopy = t, this.addWaveDataCopy = i, (s = this.rowAndColwaveFromGroup) == null || s.eachChild((d, h) => {
809
+ h = h || 0, d.attr({
809
810
  shape: {
810
- points: t[d].data.map(([c, g]) => [
811
- c + t[d].pos[0],
812
- g + t[d].pos[1]
811
+ points: t[h].data.map(([c, g]) => [
812
+ c + t[h].pos[0],
813
+ g + t[h].pos[1]
813
814
  ])
814
815
  }
815
816
  });
816
- }), (a = this.addwaveFromGroup) == null || a.eachChild((h, d) => {
817
- d = d || 0, h.attr({
817
+ }), (a = this.addwaveFromGroup) == null || a.eachChild((d, h) => {
818
+ h = h || 0, d.attr({
818
819
  shape: {
819
- points: i[d].data.map(([c, g]) => [
820
- c + i[d].pos[0],
821
- g + i[d].pos[1]
820
+ points: i[h].data.map(([c, g]) => [
821
+ c + i[h].pos[0],
822
+ g + i[h].pos[1]
822
823
  ])
823
824
  }
824
825
  });
@@ -842,6 +843,11 @@ let u = class extends U {
842
843
  (t = this.arrowGroup) == null || t.removeAll(), (i = this.sceneIns) == null || i.remove(this.arrowGroup), this.drawLoopArrow(e), this.drawHeardBeatLine(e);
843
844
  }
844
845
  };
846
+ m([
847
+ w({
848
+ default: () => 0.04
849
+ })
850
+ ], u.prototype, "zoomStep", 2);
845
851
  m([
846
852
  w({
847
853
  default: () => !0
@@ -1000,7 +1006,7 @@ m([
1000
1006
  ], u.prototype, "ventricularRate", 2);
1001
1007
  m([
1002
1008
  w({
1003
- default: S.CompoundWave
1009
+ default: A.CompoundWave
1004
1010
  })
1005
1011
  ], u.prototype, "enlargeWaveMode", 2);
1006
1012
  m([
@@ -1027,7 +1033,7 @@ m([
1027
1033
  ], u.prototype, "isSyncAnalyseValueCheck", 2);
1028
1034
  m([
1029
1035
  B(200)
1030
- ], u.prototype, "zoomWave", 1);
1036
+ ], u.prototype, "sceneInsMousemove", 1);
1031
1037
  m([
1032
1038
  B(200)
1033
1039
  ], u.prototype, "nativeScrollFunc", 1);
@@ -7,6 +7,8 @@ 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 zoomStep: number;
10
12
  /** 前缀 id */
11
13
  protected supportTwoFingerZoom: boolean;
12
14
  /** 前缀 id */
@@ -168,6 +170,9 @@ export default class Methods extends Vue {
168
170
  protected sceneIsMouseDown: Readonly<boolean>;
169
171
  protected sceneIsMouseDownX: number;
170
172
  protected sceneIsMouseDownY: number;
173
+ protected sceneIsStartX: number;
174
+ protected sceneIsStartY: number;
175
+ protected sceneIsMoveUpDown: Readonly<boolean>;
171
176
  protected isShowEnlargeWave: boolean;
172
177
  /** 双指缩放相关 */
173
178
  protected sceneFirstDistance: number;
@@ -1 +1 @@
1
- "use strict";var R=Object.defineProperty,T=Object.defineProperties;var z=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var B=(e,t,i)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,W=(e,t)=>{for(var i in t||(t={}))N.call(t,i)&&B(e,i,t[i]);if(O)for(var i of O(t))j.call(t,i)&&B(e,i,t[i]);return e},F=(e,t)=>T(e,z(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=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_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"),y=require("@costy-plus/utils"),g=require("zrender"),X=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function $(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const q=X(k),Y=$(g);var V=Object.defineProperty,U=Object.getOwnPropertyDescriptor,m=(e,t,i,s)=>{for(var a=s>1?void 0:s?U(t,i):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(a=(s?r(t,i,a):r(a))||a);return s&&a&&V(t,i,a),a};exports.default=class extends q.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.sceneIsMouseDownY=Object.freeze(0),this.isShowEnlargeWave=!1,this.sceneFirstDistance=Object.freeze(0),this.sceneMagnification=1,this.rulerHistorySlidIdxs=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)===y.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,s,a,o,r,l,n,h,d,c;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(a=this.splitLineGroup)==null||a.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(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(),(c=this.sceneIns)==null||c.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.scrollConfig.isShow?this.$nextTick(()=>{var t,i,s,a,o;this.scrollConfig.isNativeScroll?(s=this.$refs[this.prefixId+"nativeScroll"])==null||s.scrollBy({left:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((i=this.formatEcgData)==null?void 0:i.step)||0)*this.sceneMagnification,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({dx:(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.PosStart)||0)*(((o=this.formatEcgData)==null?void 0:o.step)||0)*this.sceneMagnification})}):(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=Y.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,s,a,o,r,l,n,h,d,c;this.rowAndColwaveFromGroup=new g.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new g.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new g.Group({name:"addwaveFrom"}),this.leadHeadGroup=new g.Group({name:"leadHead"}),this.splitLineGroup=new g.Group({name:"splitLine"}),this.leadHeadNameGroup=new g.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new g.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new g.Group({name:"ruler"}),this.arrowGroup=new g.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new g.Group({name:"heardBeatLine"}),this.pacingGroup=new g.Group({name:"pacing"}),(this.leadModel.name==="12*1"||this.leadModel.name==="18*1"||this.leadModel.name==="15*1"||this.leadModel.name==="16*1")&&(this.sceneMagnification=.8),this.vuescrollWH.width=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 u=y.getPrintLengthToPx(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;u<=e&&(e=u)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((a=this.formatEcgData)==null?void 0:a.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)===y.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 u=this.drawArea.height;this.leadModel.isShowPacing&&(u=this.drawArea.height-this.drawBottomPacH),this.splitBlockHeight=u/this.totalRows}this.dataTotalTimes=y.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)*(((c=this.formatEcgData)==null?void 0:c.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(),s=()=>{var c,u,f,D;const a=e.target.name.split("_");this.activeLeadIdx=+a[0];const o=+a[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=y.getPointIdxForPx(r,(((c=this.formatEcgData)==null?void 0:c.step)||1)*this.sceneMagnification);n+=l;const h=((u=this.formatEcgData)==null?void 0:u.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===y.AnalysisMode.SelectedHeartbeat){if(n<=h[1].KeyPosByBeat.Tend+.1*(((f=this.formatEcgData)==null?void 0:f.processedData.otherParams.SampleRate)||0))d=h[1];else for(let v=1;v<h.length;v++)if(n>h[v-1].KeyPosByBeat.Tend+1&&n<h[v].KeyPosByBeat.Tend+.1*(((D=this.formatEcgData)==null?void 0:D.processedData.otherParams.SampleRate)||0)){d=h[v];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=F(W({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):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)Math.abs(e.offsetY-this.sceneIsMouseDownY)-Math.abs(e.offsetX-this.sceneIsMouseDownX)>50?(this.moveUpAndDown(e.offsetY-this.sceneIsMouseDownY),this.sceneIsMouseDownY=e.offsetY):(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)}),this.sceneIsMouseDownX=e.offsetX);else if(this.supportTwoFingerZoom&&e.event.touches.length===2){const i=y.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===0&&(this.sceneFirstDistance=i),i<this.sceneFirstDistance?this.sceneMagnification-=.005:this.sceneMagnification+=.005,this.sceneFirstDistance=i,this.zoomWave()}}}moveUpAndDown(e){window.requestAnimationFrame(()=>{var t,i,s,a,o,r,l,n,h,d;if(this.isSingleMode){const c=this.singleWaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.singleWaveFromGroup.getBoundingRect().height,u=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e)+this.arrowGroup.getBoundingRect().height,f=c<u?u:c,D=this.singleWaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e),v=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e),I=D<v?D:v;if(f<this.canvasContainer.height-100||I>this.canvasContainer.height-100)return}else{const c=this.rowAndColwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.rowAndColwaveFromGroup.getBoundingRect().height,u=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e)+this.arrowGroup.getBoundingRect().height,f=this.addwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.addwaveFromGroup.getBoundingRect().height;let D=c<u?u:c;D=f<D?D:f;const v=this.rowAndColwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e),I=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e),P=this.addwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e);let C=v<I?v:I;if(C=P<C?P:C,D<this.canvasContainer.height-100||C>this.canvasContainer.height-100)return}(t=this.rowAndColwaveFromGroup)==null||t.attr({y:this.rowAndColwaveFromGroup.y+e}),(i=this.leadHeadGroup)==null||i.attr({y:this.leadHeadGroup.y+e}),(s=this.addwaveFromGroup)==null||s.attr({y:this.addwaveFromGroup.y+e}),(a=this.splitLineGroup)==null||a.attr({y:this.splitLineGroup.y+e}),(o=this.singleWaveFromGroup)==null||o.attr({y:this.singleWaveFromGroup.y+e}),(r=this.leadHeadNameGroup)==null||r.attr({y:this.leadHeadNameGroup.y+e}),(l=this.leadHeadOffAndDelGroup)==null||l.attr({y:this.leadHeadOffAndDelGroup.y+e}),(n=this.arrowGroup)==null||n.attr({y:this.arrowGroup.y+e}),(h=this.heardBeatLineGroup)==null||h.attr({y:this.heardBeatLineGroup.y+e}),(d=this.pacingGroup)==null||d.attr({y:this.pacingGroup.y+e})})}zoomWave(){var s,a,o;this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)*this.sceneMagnification-this.splitPoint);const e=(((a=this.formatEcgData)==null?void 0:a.step)||0)*this.sceneMagnification,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo.points=t;const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo.points=i,this.drawLeadHead(),this.drawColSplitLine(),this.isSingleMode?(this.slidingWindowInfo.endInd=t,this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(o=this.sceneIns)==null||o.add(this.singleWaveFromGroup)):this.scrollWaveFrom(this.rulerHistorySlidIdxs),this.scrollRuler(this.rulerHistorySlidIdxs),this.scrollArrow(this.rulerHistorySlidIdxs)}sceneInsMouseDown(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!0,!e.event.touches||e.event.touches.length===1?(this.sceneIsMouseDownX=e.offsetX,this.sceneIsMouseDownY=e.offsetY):e.event.touches.length}sceneInsMouseUp(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!1}drawPacing(){var i,s,a,o,r,l,n;if(!this.leadModel.isShowPacing||!((s=(i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)!=null&&s.length))return;(a=this.pacingGroup)==null||a.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 g.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 g.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((s,a)=>{var o;return[e+a*(((o=this.formatEcgData)==null?void 0:o.step)||0)*this.sceneMagnification,(s===1?t-this.pacingh:t)+this.pacingPFontSize]})}createLeadHead(e,t,i){var o;const s=this.leadHeadConfig.leadHedeWidth/4;let a=(((o=this.formatEcgData)==null?void 0:o.sens)||0)*this.sceneMagnification;return a=i?a/2:a,new g.Polyline({cursor:"",shape:{points:[[0+e,0+t],[s+e,0+t],[s+e,-a+t],[3*s+e,-a+t],[3*s+e,0+t],[4*s+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,i){var s,a;return new g.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(i?(((s=this.formatEcgData)==null?void 0:s.sens)||0)*this.sceneMagnification/2:(((a=this.formatEcgData)==null?void 0:a.sens)||0)*this.sceneMagnification)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var i,s,a,o,r,l;(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.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=(((a=this.formatEcgData)==null?void 0:a.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 a,o,r,l,n,h,d,c,u,f,D,v,I;(a=this.splitLineGroup)==null||a.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 P=y.getDataLenTimes(Math.ceil(this.splitPoint/((((r=this.formatEcgData)==null?void 0:r.step)||1)*this.sceneMagnification))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),C=parseInt(`${P/1e3%60}`,10);this.splitPoint=C*(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)*this.sceneMagnification}let t=0,i=0,s=0;for(let P=1;P<=this.leadModel.column-1;P++){t=P*e+this.leadHeadConfig.leadHedeWidth,i=P*this.leadModel.line;for(let C=1;C<=this.leadModel.line&&(s=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[C-1+i],s!==void 0);C++)((c=this.formatEcgData)==null?void 0:c.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[s])?(f=this.splitLineGroup)==null||f.add(this.creatSplitLine(t,C*this.splitBlockHeight-(((u=this.formatEcgData)==null?void 0:u.sens)||0)*this.sceneMagnification/2*.5,!0)):(v=this.splitLineGroup)==null||v.add(this.creatSplitLine(t,C*this.splitBlockHeight-(((D=this.formatEcgData)==null?void 0:D.sens)||0)*this.sceneMagnification*.5))}(I=this.sceneIns)==null||I.add(this.splitLineGroup)}initSlidingWindowInfo(){var s,a;const e=(((s=this.formatEcgData)==null?void 0:s.step)||0)*this.sceneMagnification,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+(((a=this.formatEcgData)==null?void 0:a.dataPxLen)||0)*this.sceneMagnification-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 s=this.slidingWindowInfo.startInd||0,a=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,s=a,a=s+(this.slidingWindowInfo.points||0)),n===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:s,endInd:a,data:i.slice(s,a).map((h,d)=>{var c;return[d*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification,-h*this.sceneMagnification]})})}return o}getRednerPoints(){let e=0,t=0,i=0,s=[],a=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&&(a=o,o=a+(this.slidingWindowInfo.points||0));for(let n=1;n<=this.leadModel.line&&(t=n*this.splitBlockHeight,!(i>(this.waveFromData||[]).length-1));n++)s=this.waveFromData[i]||[],i++,n===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:a,endInd:o,data:s.slice(a,o).map((h,d)=>{var c;return[d*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification,-h*this.sceneMagnification]})})}return r}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let i=0,s=0,a=[];for(let o=0;o<this.leadModel.add;o++)s=this.longLeadConfig.leadIdxs[o],i=(o+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveFromData[s]||[],o===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:a.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((r,l)=>{var n;return[l*(((n=this.formatEcgData)==null?void 0:n.step)||0)*this.sceneMagnification,-r*this.sceneMagnification]})});return e}createSingleWaveFrom(){var r,l,n,h,d,c,u;(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=y.getDataLenTimes(this.slidingWindowInfo.points||0,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0);const s=i;let a=0,o=0;for(let f=0;f<t.length&&!(t[f].pos[1]>this.drawArea.height+this.bottomAreaHeight);f++)this.isLeadDel(e)||(a=Math.floor(i/1e3/60),o=Math.floor(i/1e3%60),a=o===60?a+=1:a,a=a===0?"00":a<10?`0${a}`:a,o=o===0||o===60?"00":o<10?`0${o}`:o,(h=this.singleWaveFromGroup)==null||h.add(new g.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+f,shape:{points:t[f].data.map(([D,v])=>[D+t[f].pos[0],v+t[f].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:D=>{this.onDbClickWaveFrom(D,"single")}})),(c=this.singleWaveFromGroup)==null||c.add(new g.Text({cursor:"",style:{x:t[f].pos[0],y:t[f].pos[1]-(((d=this.formatEcgData)==null?void 0:d.sens)||0)*this.sceneMagnification/2,text:f===0?"00:00 \u5FC3\u7387":`${a}:${o} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),f>0&&(i+=s));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]-(((u=this.formatEcgData)==null?void 0:u.sens)||0)*this.sceneMagnification/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,i;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let s=0;s<e.length;s++)this.isLeadDel(this.longLeadConfig.leadIdxs[s])||((t=this.addwaveFromGroup)==null||t.add(new g.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[s]+"_"+s,shape:{points:e[s].data.map(([a,o])=>[a+e[s].pos[0],o+e[s].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:a=>{this.onDbClickWaveFrom(a,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[s],e[s].pos[0],e[s].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[s],e[s].pos[0]-5,e[s].pos[1]-(((i=this.formatEcgData)==null?void 0:i.sens)||0)*this.sceneMagnification/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var i,s,a,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=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[n]||0,this.isLeadDel(t)||(a=this.rowAndColwaveFromGroup)==null||a.add(new g.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)*this.sceneMagnification/2-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-(((r=this.formatEcgData)==null?void 0:r.sens)||0)*this.sceneMagnification/2),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)*this.sceneMagnification/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var a;(a=this.leadHeadNameGroup)==null||a.add(new g.Text({style:{x:t,y:i,text:this.LeadNameTextsPorps[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:F(W({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:s})},onclick:o=>{this.$emit("notiifyLeadName",{event:F(W({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new g.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var s,a,o,r,l,n;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new g.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new g.Text({style:W({text:`${((s=this.formatEcgData)==null?void 0:s.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(a=this.formatEcgData)==null?void 0:a.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,s=0,a=t;if(this.leadModel.isContinuous)a=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=y.getPointIdxForPx(this.splitPoint,this.formatEcgData.step*this.sceneMagnification),c=y.getDataLenTimes(d,((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)/1e3;a=e+c}for(let d=e;d<=a;d=+(d+.1).toFixed(1))d!==e&&(i+=this.rulerStep*this.sceneMagnification),d%1===0?(s=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(n=this.rulerGroup)==null||n.add(new g.Line({cursor:"",shape:{x1:i,y1:s,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,c,u,f,D,v,I,P,C,A,L,S,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.sceneMagnification-this.splitBlockHeight/3.5:i=20;let s=0,a=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let r=0;for(let M=0;M<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;M++){const p=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[M];if(r=((p==null?void 0:p.position)||0)-e,!(e>((p==null?void 0:p.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&r>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&r>(this.slidingWindowInfo.points||0))){if(((p==null?void 0:p.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=r*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification+this.leadHeadConfig.leadHedeWidth-9.5,a=0,(D=this.arrowGroup)==null||D.add(new g.Polygon({name:"arrow_box",shape:{points:[[4+t,0+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((f=(u=this.currentHeardBeat)==null?void 0:u.heardBeat)==null?void 0:f.index)===(p==null?void 0:p.index)?"blue":"#ccc"},onclick:H=>{var b;!this.heartFight.mode||(H.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(G=>G.name==="arrow_box").forEach(G=>{G.id!==H.target.id&&G.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(p,H.target))}})),this.heartFight.heartrate&&(s=((v=this.AssistCtx)==null?void 0:v.measureText(`${(p==null?void 0:p.heartrate)||""}`).width)||0,(I=this.arrowGroup)==null||I.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.heartrate)||""}`},o)})),a+=12),this.heartFight.interval&&(s=((P=this.AssistCtx)==null?void 0:P.measureText(`${(p==null?void 0:p.interval)||""}`).width)||0,(C=this.arrowGroup)==null||C.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.interval)||""}`},o)})),a+=12),this.heartFight.qrstCompany&&(s=((A=this.AssistCtx)==null?void 0:A.measureText(`${(p==null?void 0:p.qrstCompany)||""}`).width)||0,(L=this.arrowGroup)==null||L.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.qrstCompany)||""}`},o)})),a+=12),this.heartFight.telectricalaxis&&(s=((S=this.AssistCtx)==null?void 0:S.measureText(`${(p==null?void 0:p.telectricalaxis)||""}`).width)||0,(x=this.arrowGroup)==null||x.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.telectricalaxis)||""}`},o)})))}}(E=this.sceneIns)==null||E.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",g.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var r,l,n,h,d,c;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,s=this.getRednerPoints(),a=this.getAddRednerPoints(),o;for(const u in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(u)&&Object.prototype.hasOwnProperty.call(t,u)){i=(t[u]-this.slidingWindowInfo.startInd)*(((n=this.formatEcgData)==null?void 0:n.step)||0)*this.sceneMagnification;e:for(let f=0;f<s.length;f++)if(!(this.isLeadOff(f)||this.isLeadDel(f))){if(e>t[u]||!this.leadModel.isContinuous&&t[u]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=s[f],this.leadModel.isContinuous&&f>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}e:for(let f=0;f<a.length;f++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[f])&&this.isLeadDel(this.longLeadConfig.leadIdxs[f]))){if(e>t[u])break e;o=a[f],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}(c=this.sceneIns)==null||c.add(this.heardBeatLineGroup),t=null,s=null,a=null}createHeardBeatLine(e,t){return new g.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}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=y.getPointIdxForPx(e,(((i=this.formatEcgData)==null?void 0:i.step)||1)*this.sceneMagnification);this.rulerHistorySlidIdxs=t,this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",t)}scrollWaveFrom(e){var s,a,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,(s=this.rowAndColwaveFromGroup)==null||s.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:t[d].data.map(([c,u])=>[c+t[d].pos[0],u+t[d].pos[1]])}})}),(a=this.addwaveFromGroup)==null||a.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:i[d].data.map(([c,u])=>[c+i[d].pos[0],u+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,s,a;(i=this.rulerGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.rulerGroup);const t=y.getDataLenTimes(this.isSingleMode?0:e,((a=this.formatEcgData)==null?void 0:a.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)}};m([w.Prop({default:()=>!0})],exports.default.prototype,"supportTwoFingerZoom",2);m([w.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);m([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);m([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);m([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);m([w.Prop({default:()=>y.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);m([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);m([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);m([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);m([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);m([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);m([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);m([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);m([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);m([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);m([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);m([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);m([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);m([w.Prop({default:y.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);m([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);m([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);m([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);m([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);m([y.throttling(200)],exports.default.prototype,"zoomWave",1);m([y.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);m([y.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=m([_.default({name:"Methods"})],exports.default);
1
+ "use strict";var R=Object.defineProperty,z=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var B=(e,t,i)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,W=(e,t)=>{for(var i in t||(t={}))j.call(t,i)&&B(e,i,t[i]);if(O)for(var i of O(t))N.call(t,i)&&B(e,i,t[i]);return e},G=(e,t)=>z(e,T(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=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_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"),y=require("@costy-plus/utils"),g=require("zrender"),X=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function $(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const Y=X(k),q=$(g);var V=Object.defineProperty,U=Object.getOwnPropertyDescriptor,m=(e,t,i,s)=>{for(var a=s>1?void 0:s?U(t,i):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(a=(s?r(t,i,a):r(a))||a);return s&&a&&V(t,i,a),a};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.sceneIsMouseDownY=Object.freeze(0),this.sceneIsStartX=Object.freeze(0),this.sceneIsStartY=Object.freeze(0),this.sceneIsMoveUpDown=Object.freeze(!1),this.isShowEnlargeWave=!1,this.sceneFirstDistance=Object.freeze(0),this.sceneMagnification=1,this.rulerHistorySlidIdxs=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)===y.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,s,a,o,r,l,n,h,d,c;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(a=this.splitLineGroup)==null||a.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(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(),(c=this.sceneIns)==null||c.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.scrollConfig.isShow?this.$nextTick(()=>{var t,i,s,a,o;this.scrollConfig.isNativeScroll?(s=this.$refs[this.prefixId+"nativeScroll"])==null||s.scrollBy({left:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((i=this.formatEcgData)==null?void 0:i.step)||0)*this.sceneMagnification,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({dx:(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.PosStart)||0)*(((o=this.formatEcgData)==null?void 0:o.step)||0)*this.sceneMagnification})}):(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,s,a,o,r,l,n,h,d,c;this.rowAndColwaveFromGroup=new g.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new g.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new g.Group({name:"addwaveFrom"}),this.leadHeadGroup=new g.Group({name:"leadHead"}),this.splitLineGroup=new g.Group({name:"splitLine"}),this.leadHeadNameGroup=new g.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new g.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new g.Group({name:"ruler"}),this.arrowGroup=new g.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new g.Group({name:"heardBeatLine"}),this.pacingGroup=new g.Group({name:"pacing"}),(this.leadModel.name==="12*1"||this.leadModel.name==="18*1"||this.leadModel.name==="15*1"||this.leadModel.name==="16*1")&&(this.sceneMagnification=.8),this.vuescrollWH.width=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 u=y.getPrintLengthToPx(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;u<=e&&(e=u)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((a=this.formatEcgData)==null?void 0:a.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)===y.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 u=this.drawArea.height;this.leadModel.isShowPacing&&(u=this.drawArea.height-this.drawBottomPacH),this.splitBlockHeight=u/this.totalRows}this.dataTotalTimes=y.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)*(((c=this.formatEcgData)==null?void 0:c.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(),s=()=>{var c,u,f,D;const a=e.target.name.split("_");this.activeLeadIdx=+a[0];const o=+a[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=y.getPointIdxForPx(r,(((c=this.formatEcgData)==null?void 0:c.step)||1)*this.sceneMagnification);n+=l;const h=((u=this.formatEcgData)==null?void 0:u.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===y.AnalysisMode.SelectedHeartbeat){if(n<=h[1].KeyPosByBeat.Tend+.1*(((f=this.formatEcgData)==null?void 0:f.processedData.otherParams.SampleRate)||0))d=h[1];else for(let v=1;v<h.length;v++)if(n>h[v-1].KeyPosByBeat.Tend+1&&n<h[v].KeyPosByBeat.Tend+.1*(((D=this.formatEcgData)==null?void 0:D.processedData.otherParams.SampleRate)||0)){d=h[v];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=G(W({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):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){const i=e.offsetY-this.sceneIsStartY,s=e.offsetX-this.sceneIsStartY;Math.abs(i)>Math.abs(s)?(this.sceneIsMoveUpDown=!0,this.moveUpAndDown(e.offsetY-this.sceneIsMouseDownY),this.sceneIsMouseDownY=e.offsetY):(this.sceneIsMoveUpDown=!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)}),this.sceneIsMouseDownX=e.offsetX)}else if(this.supportTwoFingerZoom&&e.event.touches.length===2){const i=y.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===0&&(this.sceneFirstDistance=i),i<this.sceneFirstDistance?this.sceneMagnification-=this.zoomStep:this.sceneMagnification+=this.zoomStep,this.sceneFirstDistance=i,this.zoomWave()}}}moveUpAndDown(e){var t,i,s,a,o,r,l,n,h,d;if(this.isSingleMode){const c=this.singleWaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.singleWaveFromGroup.getBoundingRect().height,u=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e)+this.arrowGroup.getBoundingRect().height,f=c<u?u:c,D=this.singleWaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e),v=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e),P=D<v?D:v;if(f<this.canvasContainer.height-100||P>this.canvasContainer.height-100)return}else{const c=this.rowAndColwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.rowAndColwaveFromGroup.getBoundingRect().height,u=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e)+this.arrowGroup.getBoundingRect().height,f=this.addwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.addwaveFromGroup.getBoundingRect().height;let D=c<u?u:c;D=f<D?D:f;const v=this.rowAndColwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e),P=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e),I=this.addwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e);let C=v<P?v:P;if(C=I<C?I:C,D<this.canvasContainer.height-100||C>this.canvasContainer.height-100)return}this.isSingleMode?(t=this.singleWaveFromGroup)==null||t.attr({y:this.singleWaveFromGroup.y+e}):((i=this.rowAndColwaveFromGroup)==null||i.attr({y:this.rowAndColwaveFromGroup.y+e}),(s=this.leadHeadGroup)==null||s.attr({y:this.leadHeadGroup.y+e}),(a=this.addwaveFromGroup)==null||a.attr({y:this.addwaveFromGroup.y+e}),(o=this.splitLineGroup)==null||o.attr({y:this.splitLineGroup.y+e})),(r=this.leadHeadNameGroup)==null||r.attr({y:this.leadHeadNameGroup.y+e}),(l=this.leadHeadOffAndDelGroup)==null||l.attr({y:this.leadHeadOffAndDelGroup.y+e}),(n=this.arrowGroup)==null||n.attr({y:this.arrowGroup.y+e}),(h=this.heardBeatLineGroup)==null||h.attr({y:this.heardBeatLineGroup.y+e}),this.leadModel.isShowPacing&&((d=this.pacingGroup)==null||d.attr({y:this.pacingGroup.y+e}))}zoomWave(){var s,a,o;this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)*this.sceneMagnification-this.splitPoint);const e=(((a=this.formatEcgData)==null?void 0:a.step)||0)*this.sceneMagnification,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo.points=t;const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo.points=i,this.drawLeadHead(),this.drawColSplitLine(),this.isSingleMode?(this.slidingWindowInfo.endInd=t,this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(o=this.sceneIns)==null||o.add(this.singleWaveFromGroup)):this.scrollWaveFrom(this.rulerHistorySlidIdxs),this.scrollRuler(this.rulerHistorySlidIdxs),this.scrollArrow(this.rulerHistorySlidIdxs)}sceneInsMouseDown(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!0,!e.event.touches||e.event.touches.length===1?(this.sceneIsMouseDownX=e.offsetX,this.sceneIsMouseDownY=e.offsetY,this.sceneIsStartX=e.offsetX,this.sceneIsStartY=e.offsetY):e.event.touches.length}sceneInsMouseUp(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!1,this.sceneIsMoveUpDown=!1}drawPacing(){var i,s,a,o,r,l,n;if(!this.leadModel.isShowPacing||!((s=(i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)!=null&&s.length))return;(a=this.pacingGroup)==null||a.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 g.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 g.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((s,a)=>{var o;return[e+a*(((o=this.formatEcgData)==null?void 0:o.step)||0)*this.sceneMagnification,(s===1?t-this.pacingh:t)+this.pacingPFontSize]})}createLeadHead(e,t,i){var o;const s=this.leadHeadConfig.leadHedeWidth/4;let a=(((o=this.formatEcgData)==null?void 0:o.sens)||0)*this.sceneMagnification;return a=i?a/2:a,new g.Polyline({cursor:"",shape:{points:[[0+e,0+t],[s+e,0+t],[s+e,-a+t],[3*s+e,-a+t],[3*s+e,0+t],[4*s+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,i){var s,a;return new g.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(i?(((s=this.formatEcgData)==null?void 0:s.sens)||0)*this.sceneMagnification/2:(((a=this.formatEcgData)==null?void 0:a.sens)||0)*this.sceneMagnification)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var i,s,a,o,r,l;(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.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=(((a=this.formatEcgData)==null?void 0:a.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 a,o,r,l,n,h,d,c,u,f,D,v,P;(a=this.splitLineGroup)==null||a.removeAll(),(o=this.sceneIns)==null||o.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;if(this.splitPoint=e,this.isSingleMode){const I=y.getDataLenTimes(Math.ceil(this.splitPoint/((((r=this.formatEcgData)==null?void 0:r.step)||1)*this.sceneMagnification))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),C=parseInt(`${I/1e3%60}`,10);this.splitPoint=C*(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)*this.sceneMagnification}let t=0,i=0,s=0;for(let I=1;I<=this.leadModel.column-1;I++){t=I*e+this.leadHeadConfig.leadHedeWidth,i=I*this.leadModel.line;for(let C=1;C<=this.leadModel.line&&(s=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[C-1+i],s!==void 0);C++)((c=this.formatEcgData)==null?void 0:c.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[s])?(f=this.splitLineGroup)==null||f.add(this.creatSplitLine(t,C*this.splitBlockHeight-(((u=this.formatEcgData)==null?void 0:u.sens)||0)*this.sceneMagnification/2*.5,!0)):(v=this.splitLineGroup)==null||v.add(this.creatSplitLine(t,C*this.splitBlockHeight-(((D=this.formatEcgData)==null?void 0:D.sens)||0)*this.sceneMagnification*.5))}(P=this.sceneIns)==null||P.add(this.splitLineGroup)}initSlidingWindowInfo(){var s,a;const e=(((s=this.formatEcgData)==null?void 0:s.step)||0)*this.sceneMagnification,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+(((a=this.formatEcgData)==null?void 0:a.dataPxLen)||0)*this.sceneMagnification-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 s=this.slidingWindowInfo.startInd||0,a=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,s=a,a=s+(this.slidingWindowInfo.points||0)),n===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:s,endInd:a,data:i.slice(s,a).map((h,d)=>{var c;return[d*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification,-h*this.sceneMagnification]})})}return o}getRednerPoints(){let e=0,t=0,i=0,s=[],a=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&&(a=o,o=a+(this.slidingWindowInfo.points||0));for(let n=1;n<=this.leadModel.line&&(t=n*this.splitBlockHeight,!(i>(this.waveFromData||[]).length-1));n++)s=this.waveFromData[i]||[],i++,n===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:a,endInd:o,data:s.slice(a,o).map((h,d)=>{var c;return[d*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification,-h*this.sceneMagnification]})})}return r}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let i=0,s=0,a=[];for(let o=0;o<this.leadModel.add;o++)s=this.longLeadConfig.leadIdxs[o],i=(o+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveFromData[s]||[],o===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:a.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((r,l)=>{var n;return[l*(((n=this.formatEcgData)==null?void 0:n.step)||0)*this.sceneMagnification,-r*this.sceneMagnification]})});return e}createSingleWaveFrom(){var r,l,n,h,d,c,u;(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=y.getDataLenTimes(this.slidingWindowInfo.points||0,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0);const s=i;let a=0,o=0;for(let f=0;f<t.length&&!(t[f].pos[1]>this.drawArea.height+this.bottomAreaHeight);f++)this.isLeadDel(e)||(a=Math.floor(i/1e3/60),o=Math.floor(i/1e3%60),a=o===60?a+=1:a,a=a===0?"00":a<10?`0${a}`:a,o=o===0||o===60?"00":o<10?`0${o}`:o,(h=this.singleWaveFromGroup)==null||h.add(new g.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+f,shape:{points:t[f].data.map(([D,v])=>[D+t[f].pos[0],v+t[f].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:D=>{this.onDbClickWaveFrom(D,"single")}})),(c=this.singleWaveFromGroup)==null||c.add(new g.Text({cursor:"",style:{x:t[f].pos[0],y:t[f].pos[1]-(((d=this.formatEcgData)==null?void 0:d.sens)||0)*this.sceneMagnification/2,text:f===0?"00:00 \u5FC3\u7387":`${a}:${o} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),f>0&&(i+=s));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]-(((u=this.formatEcgData)==null?void 0:u.sens)||0)*this.sceneMagnification/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,i;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let s=0;s<e.length;s++)this.isLeadDel(this.longLeadConfig.leadIdxs[s])||((t=this.addwaveFromGroup)==null||t.add(new g.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[s]+"_"+s,shape:{points:e[s].data.map(([a,o])=>[a+e[s].pos[0],o+e[s].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:a=>{this.onDbClickWaveFrom(a,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[s],e[s].pos[0],e[s].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[s],e[s].pos[0]-5,e[s].pos[1]-(((i=this.formatEcgData)==null?void 0:i.sens)||0)*this.sceneMagnification/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var i,s,a,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=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[n]||0,this.isLeadDel(t)||(a=this.rowAndColwaveFromGroup)==null||a.add(new g.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)*this.sceneMagnification/2-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-(((r=this.formatEcgData)==null?void 0:r.sens)||0)*this.sceneMagnification/2),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)*this.sceneMagnification/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var a;(a=this.leadHeadNameGroup)==null||a.add(new g.Text({style:{x:t,y:i,text:this.LeadNameTextsPorps[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:G(W({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:s})},onclick:o=>{this.$emit("notiifyLeadName",{event:G(W({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new g.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var s,a,o,r,l,n;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new g.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new g.Text({style:W({text:`${((s=this.formatEcgData)==null?void 0:s.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(a=this.formatEcgData)==null?void 0:a.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,s=0,a=t;if(this.leadModel.isContinuous)a=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=y.getPointIdxForPx(this.splitPoint,this.formatEcgData.step*this.sceneMagnification),c=y.getDataLenTimes(d,((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)/1e3;a=e+c}for(let d=e;d<=a;d=+(d+.1).toFixed(1))d!==e&&(i+=this.rulerStep*this.sceneMagnification),d%1===0?(s=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(n=this.rulerGroup)==null||n.add(new g.Line({cursor:"",shape:{x1:i,y1:s,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,c,u,f,D,v,P,I,C,H,A,L,x,b;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.sceneMagnification-this.splitBlockHeight/3.5:i=20;let s=0,a=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 p=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[F];if(r=((p==null?void 0:p.position)||0)-e,!(e>((p==null?void 0:p.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&r>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&r>(this.slidingWindowInfo.points||0))){if(((p==null?void 0:p.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=r*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification+this.leadHeadConfig.leadHedeWidth-9.5,a=0,(D=this.arrowGroup)==null||D.add(new g.Polygon({name:"arrow_box",shape:{points:[[4+t,0+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((f=(u=this.currentHeardBeat)==null?void 0:u.heardBeat)==null?void 0:f.index)===(p==null?void 0:p.index)?"blue":"#ccc"},onclick:S=>{var E;!this.heartFight.mode||(S.target.attr({style:{fill:"blue"}}),(E=this.arrowGroup)==null||E.children().filter(M=>M.name==="arrow_box").forEach(M=>{M.id!==S.target.id&&M.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(p,S.target))}})),this.heartFight.heartrate&&(s=((v=this.AssistCtx)==null?void 0:v.measureText(`${(p==null?void 0:p.heartrate)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.heartrate)||""}`},o)})),a+=12),this.heartFight.interval&&(s=((I=this.AssistCtx)==null?void 0:I.measureText(`${(p==null?void 0:p.interval)||""}`).width)||0,(C=this.arrowGroup)==null||C.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.interval)||""}`},o)})),a+=12),this.heartFight.qrstCompany&&(s=((H=this.AssistCtx)==null?void 0:H.measureText(`${(p==null?void 0:p.qrstCompany)||""}`).width)||0,(A=this.arrowGroup)==null||A.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.qrstCompany)||""}`},o)})),a+=12),this.heartFight.telectricalaxis&&(s=((L=this.AssistCtx)==null?void 0:L.measureText(`${(p==null?void 0:p.telectricalaxis)||""}`).width)||0,(x=this.arrowGroup)==null||x.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(p==null?void 0:p.telectricalaxis)||""}`},o)})))}}(b=this.sceneIns)==null||b.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",g.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var r,l,n,h,d,c;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,s=this.getRednerPoints(),a=this.getAddRednerPoints(),o;for(const u in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(u)&&Object.prototype.hasOwnProperty.call(t,u)){i=(t[u]-this.slidingWindowInfo.startInd)*(((n=this.formatEcgData)==null?void 0:n.step)||0)*this.sceneMagnification;e:for(let f=0;f<s.length;f++)if(!(this.isLeadOff(f)||this.isLeadDel(f))){if(e>t[u]||!this.leadModel.isContinuous&&t[u]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=s[f],this.leadModel.isContinuous&&f>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}e:for(let f=0;f<a.length;f++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[f])&&this.isLeadDel(this.longLeadConfig.leadIdxs[f]))){if(e>t[u])break e;o=a[f],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}(c=this.sceneIns)==null||c.add(this.heardBeatLineGroup),t=null,s=null,a=null}createHeardBeatLine(e,t){return new g.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}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;if(this.sceneIsMoveUpDown)return;const t=y.getPointIdxForPx(e,(((i=this.formatEcgData)==null?void 0:i.step)||1)*this.sceneMagnification);this.rulerHistorySlidIdxs=t,this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",t)}scrollWaveFrom(e){var s,a,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,(s=this.rowAndColwaveFromGroup)==null||s.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:t[d].data.map(([c,u])=>[c+t[d].pos[0],u+t[d].pos[1]])}})}),(a=this.addwaveFromGroup)==null||a.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:i[d].data.map(([c,u])=>[c+i[d].pos[0],u+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,s,a;(i=this.rulerGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.rulerGroup);const t=y.getDataLenTimes(this.isSingleMode?0:e,((a=this.formatEcgData)==null?void 0:a.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)}};m([w.Prop({default:()=>.04})],exports.default.prototype,"zoomStep",2);m([w.Prop({default:()=>!0})],exports.default.prototype,"supportTwoFingerZoom",2);m([w.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);m([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);m([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);m([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);m([w.Prop({default:()=>y.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);m([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);m([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);m([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);m([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);m([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);m([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);m([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);m([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);m([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);m([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);m([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);m([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);m([w.Prop({default:y.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);m([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);m([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);m([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);m([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);m([y.throttling(200)],exports.default.prototype,"sceneInsMousemove",1);m([y.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);m([y.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=m([_.default({name:"Methods"})],exports.default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "costy-plus",
3
- "version": "1.0.97-0",
3
+ "version": "1.0.99-0",
4
4
  "main": "dist/lib/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",