costy-plus 1.0.39-0 → 1.0.41-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.
@@ -67,6 +67,7 @@ export default class Methods extends Vue {
67
67
  protected rulerGroup: Readonly<Group | null>;
68
68
  protected arrowGroup: Readonly<Group | null>;
69
69
  protected heardBeatLineGroup: Readonly<Group | null>;
70
+ protected pacingGroup: Readonly<Group | null>;
70
71
  protected bottomAreaHeight: number;
71
72
  protected dataTotalTimes: number;
72
73
  protected totalRows: number;
@@ -82,6 +83,16 @@ export default class Methods extends Vue {
82
83
  rowAndCol: number;
83
84
  }>;
84
85
  protected fontFamily: string;
86
+ /** 标尺底部高度 */
87
+ protected ruleH: number;
88
+ /** 起搏通道高度(固定值)一个大格的高度(起搏导联高度) */
89
+ protected bottomPacH: number;
90
+ /** 起搏通道实际画图位置高度 */
91
+ protected drawBottomPacH: number;
92
+ /** 起搏钉高度 */
93
+ protected pacingh: number;
94
+ /** 起搏标识 P 的 fontSize */
95
+ protected pacingPFontSize: number;
85
96
  /** 每个波形区域块高度 */
86
97
  protected splitBlockHeight: number;
87
98
  /** 分割点(也就是每个波形展示区域的 width px) */
@@ -182,6 +193,10 @@ export default class Methods extends Vue {
182
193
  protected sceneInsMouseDown(event: ElementEvent): void;
183
194
  /** 场景画布抬起事件 */
184
195
  protected sceneInsMouseUp(event: ElementEvent): void;
196
+ /** 绘制起搏通道 */
197
+ protected drawPacing(): void;
198
+ /** 获取 起搏 点位 */
199
+ protected getPacinfPoints(X: number, Y: number): number[][];
185
200
  /** 创建 导联头 图形 */
186
201
  protected createLeadHead(x: number, y: number, isHalve?: boolean): Polyline;
187
202
  /** 创建 导联分割线 图形 */
@@ -2,35 +2,35 @@ var V = Object.defineProperty, _ = Object.defineProperties;
2
2
  var q = Object.getOwnPropertyDescriptors;
3
3
  var $ = Object.getOwnPropertySymbols;
4
4
  var Y = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
5
- var X = (e, t, i) => t in e ? V(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, W = (e, t) => {
5
+ var X = (e, t, i) => t in e ? V(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, y = (e, t) => {
6
6
  for (var i in t || (t = {}))
7
7
  Y.call(t, i) && X(e, i, t[i]);
8
8
  if ($)
9
9
  for (var i of $(t))
10
10
  K.call(t, i) && X(e, i, t[i]);
11
11
  return e;
12
- }, P = (e, t) => _(e, q(t));
12
+ }, E = (e, t) => _(e, q(t));
13
13
  import U from "vue";
14
14
  import Q from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
15
15
  import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
16
16
  import { Prop as w } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
17
- import { AnalysisMode as M, throttling as T, getPrintLengthToPx as Z, getDataLenTimes as L, LeadNameTexts as F, getPointIdxForPx as x } from "@costy-plus/utils";
17
+ import { AnalysisMode as G, throttling as T, getPrintLengthToPx as Z, getDataLenTimes as A, LeadNameTexts as F, getPointIdxForPx as x } from "@costy-plus/utils";
18
18
  import * as J from "zrender";
19
- import { Group as y, Polyline as E, Line as O, Text as I, Polygon as ee, util as te } from "zrender";
20
- var ie = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, m = (e, t, i, a) => {
21
- for (var s = a > 1 ? void 0 : a ? ae(t, i) : t, o = e.length - 1, n; o >= 0; o--)
22
- (n = e[o]) && (s = (a ? n(t, i, s) : n(s)) || s);
19
+ import { Group as v, Text as C, Polyline as S, Line as O, Polygon as ee, util as te } from "zrender";
20
+ var ie = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, u = (e, t, i, a) => {
21
+ for (var s = a > 1 ? void 0 : a ? ae(t, i) : t, o = e.length - 1, r; o >= 0; o--)
22
+ (r = e[o]) && (s = (a ? r(t, i, s) : r(s)) || s);
23
23
  return a && s && ie(t, i, s), s;
24
24
  };
25
- let p = class extends U {
25
+ let m = class extends U {
26
26
  constructor() {
27
- super(...arguments), this.AssistCtx = Object.freeze(null), this.sceneIns = Object.freeze(null), this.layerBgGroup = Object.freeze(null), this.leadHeadGroup = Object.freeze(null), this.splitLineGroup = Object.freeze(null), this.rowAndColwaveFromGroup = Object.freeze(null), this.singleWaveFromGroup = Object.freeze(null), this.addwaveFromGroup = Object.freeze(null), this.leadHeadNameGroup = Object.freeze(null), this.leadHeadOffAndDelGroup = Object.freeze(null), this.rulerGroup = Object.freeze(null), this.arrowGroup = Object.freeze(null), this.heardBeatLineGroup = Object.freeze(null), this.bottomAreaHeight = Object.freeze(55), this.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 = {
27
+ super(...arguments), this.AssistCtx = Object.freeze(null), this.sceneIns = Object.freeze(null), this.layerBgGroup = Object.freeze(null), this.leadHeadGroup = Object.freeze(null), this.splitLineGroup = Object.freeze(null), this.rowAndColwaveFromGroup = Object.freeze(null), this.singleWaveFromGroup = Object.freeze(null), this.addwaveFromGroup = Object.freeze(null), this.leadHeadNameGroup = Object.freeze(null), this.leadHeadOffAndDelGroup = Object.freeze(null), this.rulerGroup = Object.freeze(null), this.arrowGroup = Object.freeze(null), this.heardBeatLineGroup = Object.freeze(null), this.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 = {
28
28
  heardBeat: null,
29
29
  ele: null
30
30
  }, this.loopArrowY = Object.freeze({
31
31
  add: 0,
32
32
  rowAndCol: 0
33
- }), this.fontFamily = Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"), this.splitBlockHeight = 0, this.splitPoint = 0, this.slidingWindowInfo = Object.freeze({}), this.addSlidingWindowInfo = Object.freeze({}), this.highestAndLowestPoint = Object.freeze({
33
+ }), 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({
34
34
  Data: {
35
35
  maxPoints: 0,
36
36
  minPoints: 0
@@ -56,7 +56,7 @@ let p = 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) === M.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) === G.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 p = class extends U {
69
69
  };
70
70
  }
71
71
  destroyed() {
72
- var e, t, i, a, s, o, n, l, r, h, d;
73
- this.sceneInsEventOff(), (e = this.rowAndColwaveFromGroup) == null || e.removeAll(), (t = this.singleWaveFromGroup) == null || t.removeAll(), (i = this.addwaveFromGroup) == null || i.removeAll(), (a = this.leadHeadGroup) == null || a.removeAll(), (s = this.splitLineGroup) == null || s.removeAll(), (o = this.leadHeadNameGroup) == null || o.removeAll(), (n = this.leadHeadOffAndDelGroup) == null || n.removeAll(), (l = this.rulerGroup) == null || l.removeAll(), (r = this.arrowGroup) == null || r.removeAll(), (h = this.heardBeatLineGroup) == null || h.removeAll(), (d = this.sceneIns) == null || d.dispose();
72
+ var e, t, i, a, s, o, r, l, n, h, d, p;
73
+ this.sceneInsEventOff(), (e = this.rowAndColwaveFromGroup) == null || e.removeAll(), (t = this.singleWaveFromGroup) == null || t.removeAll(), (i = this.addwaveFromGroup) == null || i.removeAll(), (a = this.leadHeadGroup) == null || a.removeAll(), (s = this.splitLineGroup) == null || s.removeAll(), (o = this.leadHeadNameGroup) == null || o.removeAll(), (r = this.leadHeadOffAndDelGroup) == null || r.removeAll(), (l = this.rulerGroup) == null || l.removeAll(), (n = this.arrowGroup) == null || n.removeAll(), (h = this.heardBeatLineGroup) == null || h.removeAll(), (d = this.pacingGroup) == null || d.removeAll(), (p = this.sceneIns) == null || p.dispose();
74
74
  }
75
75
  init() {
76
76
  var e;
@@ -101,30 +101,32 @@ let p = class extends U {
101
101
  (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);
102
102
  }
103
103
  combinationDrawing() {
104
- this.initConfig(), this.drawLeadHead(), this.drawColSplitLine(), this.initSlidingWindowInfo(), this.drawRulerNotes(), this.drawWaveFrom();
104
+ this.initConfig(), this.drawLeadHead(), this.drawColSplitLine(), this.initSlidingWindowInfo(), this.drawPacing(), this.drawRulerNotes(), this.drawWaveFrom();
105
105
  }
106
106
  initConfig() {
107
- var t, i, a, s, o, n, l, r, h, d, u;
108
- this.rowAndColwaveFromGroup = new y({
107
+ var t, i, a, s, o, r, l, n, h, d, p;
108
+ this.rowAndColwaveFromGroup = new v({
109
109
  name: "rowAndColwaveFrom"
110
- }), this.singleWaveFromGroup = new y({
110
+ }), this.singleWaveFromGroup = new v({
111
111
  name: "singleWaveFrom"
112
- }), this.addwaveFromGroup = new y({
112
+ }), this.addwaveFromGroup = new v({
113
113
  name: "addwaveFrom"
114
- }), this.leadHeadGroup = new y({
114
+ }), this.leadHeadGroup = new v({
115
115
  name: "leadHead"
116
- }), this.splitLineGroup = new y({
116
+ }), this.splitLineGroup = new v({
117
117
  name: "splitLine"
118
- }), this.leadHeadNameGroup = new y({
118
+ }), this.leadHeadNameGroup = new v({
119
119
  name: "leadHeadName"
120
- }), this.leadHeadOffAndDelGroup = new y({
120
+ }), this.leadHeadOffAndDelGroup = new v({
121
121
  name: "leadHeadOffAndDel"
122
- }), this.rulerGroup = new y({
122
+ }), this.rulerGroup = new v({
123
123
  name: "ruler"
124
- }), this.arrowGroup = new y({
124
+ }), this.arrowGroup = new v({
125
125
  name: "arrowLoop"
126
- }), this.heardBeatLineGroup = new y({
126
+ }), this.heardBeatLineGroup = new v({
127
127
  name: "heardBeatLine"
128
+ }), this.pacingGroup = new v({
129
+ name: "pacing"
128
130
  }), this.vuescrollWH.width = this.width, this.vuescrollWH.height = this.height;
129
131
  let e = this.canvasContainer.width;
130
132
  if (((i = (t = this.conventionalECGConfig) == null ? void 0 : t.ecgReviewSetting) == null ? void 0 : i.ecgareawidth) === "1") {
@@ -132,7 +134,7 @@ let p = class extends U {
132
134
  c <= e && (e = c);
133
135
  } else
134
136
  this.leadModel.isContinuous && !this.isSingleMode && (((s = this.formatEcgData) == null ? void 0 : s.dataPxLen) || 0) < e - this.leadHeadConfig.leadHedeWidth && (e = (((o = this.formatEcgData) == null ? void 0 : o.dataPxLen) || 0) + this.leadHeadConfig.leadHedeWidth);
135
- this.drawArea = {
137
+ if (this.drawArea = {
136
138
  width: e,
137
139
  height: this.canvasContainer.height - this.bottomAreaHeight
138
140
  }, this.slidingWindowInfo = {
@@ -149,10 +151,16 @@ let p = class extends U {
149
151
  }, this.currentHeardBeat = {
150
152
  heardBeat: null,
151
153
  ele: null
152
- }, this.leadNameList = ((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.LeadName) || [], this.totalRows = this.leadModel.line + this.leadModel.add || 1, this.highestAndLowestPoint = (l = this.formatEcgData) == null ? void 0 : l.calcHighestAndLowestPoint(), this.isSingleMode ? (this.splitBlockHeight = (((r = this.formatEcgData) == null ? void 0 : r.analysisValueMode) === M.CompoundWave ? Math.abs(this.highestAndLowestPoint.ComplexData.maxPoints) + Math.abs(this.highestAndLowestPoint.ComplexData.minPoints) : Math.abs(this.highestAndLowestPoint.Data.maxPoints) + Math.abs(this.highestAndLowestPoint.Data.minPoints)) + 22, this.splitBlockHeight > this.drawArea.height && (this.splitBlockHeight = this.drawArea.height / 6)) : this.splitBlockHeight = this.drawArea.height / this.totalRows, this.dataTotalTimes = L(
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) === G.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
+ else {
157
+ let c = this.drawArea.height;
158
+ this.leadModel.isShowPacing && (c = this.drawArea.height - this.drawBottomPacH), this.splitBlockHeight = c / this.totalRows;
159
+ }
160
+ this.dataTotalTimes = A(
153
161
  this.waveFromData[0].length || 0,
154
162
  ((h = this.formatEcgData) == null ? void 0 : h.processedData.otherParams.SampleRate) || 0
155
- ), this.rulerStep = (((d = this.formatEcgData) == null ? void 0 : d.step) || 1) * (((u = this.formatEcgData) == null ? void 0 : u.processedData.otherParams.SampleRate) || 1) / (this.gridConfig.cellMg * 2 + 2);
163
+ ), this.rulerStep = (((d = this.formatEcgData) == null ? void 0 : d.step) || 1) * (((p = this.formatEcgData) == null ? void 0 : p.processedData.otherParams.SampleRate) || 1) / (this.gridConfig.cellMg * 2 + 2);
156
164
  }
157
165
  isLeadOff(e) {
158
166
  var t;
@@ -165,28 +173,28 @@ let p = class extends U {
165
173
  onDbClickWaveFrom(e, t) {
166
174
  console.log("onDbClickWaveFrom", e);
167
175
  const i = Date.now(), a = () => {
168
- var u, c, g, v;
176
+ var p, c, g, W;
169
177
  const s = e.target.name.split("_");
170
178
  this.activeLeadIdx = +s[0];
171
179
  const o = +s[1];
172
- let n = 0, l = 0;
173
- t === "single" ? (n = e.offsetX - this.singleWaveDataCopy[o].pos[0], l = this.singleWaveDataCopy[o].startInd) : t === "rowAndCol" ? (n = e.offsetX - this.waveDataCopy[o].pos[0], l = this.waveDataCopy[o].startInd || 0) : t === "add" && (n = e.offsetX - this.addWaveDataCopy[o].pos[0], l = this.addWaveDataCopy[o].startInd || 0);
174
- let r = x(n, ((u = this.formatEcgData) == null ? void 0 : u.step) || 1);
175
- r += l;
180
+ let r = 0, l = 0;
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
+ let n = x(r, ((p = this.formatEcgData) == null ? void 0 : p.step) || 1);
183
+ n += l;
176
184
  const h = ((c = this.formatEcgData) == null ? void 0 : c.processedData.otherParams.AnalyseValue) || [];
177
185
  let d = null;
178
- if (this.enlargeWaveMode === M.SelectedHeartbeat) {
179
- if (r <= h[1].KeyPosByBeat.Tend + 0.1 * (((g = this.formatEcgData) == null ? void 0 : g.processedData.otherParams.SampleRate) || 0))
186
+ if (this.enlargeWaveMode === G.SelectedHeartbeat) {
187
+ if (n <= h[1].KeyPosByBeat.Tend + 0.1 * (((g = this.formatEcgData) == null ? void 0 : g.processedData.otherParams.SampleRate) || 0))
180
188
  d = h[1];
181
189
  else
182
190
  for (let D = 1; D < h.length; D++)
183
- if (r > h[D - 1].KeyPosByBeat.Tend + 1 && r < h[D].KeyPosByBeat.Tend + 0.1 * (((v = this.formatEcgData) == null ? void 0 : v.processedData.otherParams.SampleRate) || 0)) {
191
+ if (n > h[D - 1].KeyPosByBeat.Tend + 1 && n < h[D].KeyPosByBeat.Tend + 0.1 * (((W = this.formatEcgData) == null ? void 0 : W.processedData.otherParams.SampleRate) || 0)) {
184
192
  d = h[D];
185
193
  break;
186
194
  }
187
195
  } else
188
196
  d = h[0];
189
- !d || (this.activeLeadAnalyseValue = P(W({}, d), {
197
+ !d || (this.activeLeadAnalyseValue = E(y({}, d), {
190
198
  BeatCount: h.length - 1
191
199
  }), d = null, this.$emit("notifyActiveEnlargr"), this.isShowEnlargeWave = !0);
192
200
  };
@@ -207,11 +215,49 @@ let p = class extends U {
207
215
  sceneInsMouseUp(e) {
208
216
  this.sceneIsMouseDown = !1;
209
217
  }
218
+ drawPacing() {
219
+ var i, a, s, o, r, l, n;
220
+ if (!this.leadModel.isShowPacing || !((a = (i = this.formatEcgData) == null ? void 0 : i.processedData.otherParams.PacingData) != null && a.length))
221
+ return;
222
+ (s = this.pacingGroup) == null || s.removeAll(), (o = this.sceneIns) == null || o.remove(this.pacingGroup);
223
+ const e = this.leadHeadConfig.leadHedeWidth, t = this.canvasContainer.height - this.drawBottomPacH;
224
+ (r = this.pacingGroup) == null || r.add(new C({
225
+ cursor: "",
226
+ style: {
227
+ x: e,
228
+ y: t,
229
+ text: "P",
230
+ fontSize: this.pacingPFontSize,
231
+ fill: this.leadConfig.lineColor,
232
+ fontFamily: this.fontFamily
233
+ }
234
+ })), (l = this.pacingGroup) == null || l.add(new S({
235
+ cursor: "",
236
+ name: "0_0",
237
+ shape: {
238
+ points: this.getPacinfPoints(e, t)
239
+ },
240
+ style: {
241
+ stroke: this.leadConfig.lineColor,
242
+ lineWidth: this.leadConfig.lineWidth
243
+ }
244
+ })), (n = this.sceneIns) == null || n.add(this.pacingGroup);
245
+ }
246
+ getPacinfPoints(e, t) {
247
+ var i;
248
+ return (((i = this.formatEcgData) == null ? void 0 : i.processedData.otherParams.PacingData) || []).slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((a, s) => {
249
+ var o;
250
+ return [
251
+ e + s * (((o = this.formatEcgData) == null ? void 0 : o.step) || 0),
252
+ (a === 1 ? t - this.pacingh : t) + this.pacingPFontSize
253
+ ];
254
+ });
255
+ }
210
256
  createLeadHead(e, t, i) {
211
257
  var o;
212
258
  const a = this.leadHeadConfig.leadHedeWidth / 4;
213
259
  let s = ((o = this.formatEcgData) == null ? void 0 : o.sens) || 0;
214
- return s = i ? s / 2 : s, new E({
260
+ return s = i ? s / 2 : s, new S({
215
261
  cursor: "",
216
262
  shape: {
217
263
  points: [
@@ -264,29 +310,29 @@ let p = class extends U {
264
310
  });
265
311
  }
266
312
  drawLeadHead() {
267
- var i, a, s, o, n, l;
313
+ var i, a, s, o, r, l;
268
314
  (i = this.leadHeadGroup) == null || i.removeAll(), (a = this.sceneIns) == null || a.remove(this.leadHeadGroup);
269
315
  let e = 0, t = !1;
270
- for (let r = 1; r <= this.totalRows; r++)
271
- e = 0, t = !1, r <= this.leadModel.line ? e = (((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.LeadName) || [])[r - 1] || 0 : r > this.leadModel.line && r - this.leadModel.line <= this.leadModel.add && (e = this.longLeadConfig.leadNames[r - this.leadModel.line - 1]), ((o = this.formatEcgData) == null ? void 0 : o.gainName) === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(F[e]) && (t = !0), (n = this.leadHeadGroup) == null || n.add(this.createLeadHead(0, r * this.splitBlockHeight, t));
316
+ for (let n = 1; n <= this.totalRows; n++)
317
+ e = 0, t = !1, n <= this.leadModel.line ? e = (((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.LeadName) || [])[n - 1] || 0 : n > this.leadModel.line && n - this.leadModel.line <= this.leadModel.add && (e = this.longLeadConfig.leadNames[n - this.leadModel.line - 1]), ((o = this.formatEcgData) == null ? void 0 : o.gainName) === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(F[e]) && (t = !0), (r = this.leadHeadGroup) == null || r.add(this.createLeadHead(0, n * this.splitBlockHeight, t));
272
318
  (l = this.sceneIns) == null || l.add(this.leadHeadGroup);
273
319
  }
274
320
  drawColSplitLine() {
275
- var s, o, n, l, r, h, d, u, c, g, v, D, H;
321
+ var s, o, r, l, n, h, d, p, c, g, W, D, H;
276
322
  (s = this.splitLineGroup) == null || s.removeAll(), (o = this.sceneIns) == null || o.remove(this.splitLineGroup);
277
323
  const e = (this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / this.leadModel.column;
278
324
  if (this.splitPoint = e, this.isSingleMode) {
279
- const A = L(
280
- Math.ceil(this.splitPoint / (((n = this.formatEcgData) == null ? void 0 : n.step) || 1)) || 0,
325
+ const P = A(
326
+ Math.ceil(this.splitPoint / (((r = this.formatEcgData) == null ? void 0 : r.step) || 1)) || 0,
281
327
  ((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.SampleRate) || 0
282
- ), C = parseInt(`${A / 1e3 % 60}`, 10);
283
- this.splitPoint = C * (((r = this.formatEcgData) == null ? void 0 : r.processedData.otherParams.SampleRate) || 0) * (((h = this.formatEcgData) == null ? void 0 : h.step) || 0);
328
+ ), I = parseInt(`${P / 1e3 % 60}`, 10);
329
+ this.splitPoint = I * (((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0) * (((h = this.formatEcgData) == null ? void 0 : h.step) || 0);
284
330
  }
285
331
  let t = 0, i = 0, a = 0;
286
- for (let A = 1; A <= this.leadModel.column - 1; A++) {
287
- t = A * e + this.leadHeadConfig.leadHedeWidth, i = A * this.leadModel.line;
288
- for (let C = 1; C <= this.leadModel.line && (a = (((d = this.formatEcgData) == null ? void 0 : d.processedData.otherParams.LeadName) || [])[C - 1 + i], a !== void 0); C++)
289
- ((u = this.formatEcgData) == null ? void 0 : u.gainName) === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(F[a]) ? (g = this.splitLineGroup) == null || g.add(this.creatSplitLine(t, C * this.splitBlockHeight - (((c = this.formatEcgData) == null ? void 0 : c.sens) || 0) / 2 * 0.5, !0)) : (D = this.splitLineGroup) == null || D.add(this.creatSplitLine(t, C * this.splitBlockHeight - (((v = this.formatEcgData) == null ? void 0 : v.sens) || 0) * 0.5));
332
+ for (let P = 1; P <= this.leadModel.column - 1; P++) {
333
+ t = P * e + this.leadHeadConfig.leadHedeWidth, i = P * this.leadModel.line;
334
+ for (let I = 1; I <= this.leadModel.line && (a = (((d = this.formatEcgData) == null ? void 0 : d.processedData.otherParams.LeadName) || [])[I - 1 + i], a !== void 0); I++)
335
+ ((p = this.formatEcgData) == null ? void 0 : p.gainName) === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(F[a]) ? (g = this.splitLineGroup) == null || g.add(this.creatSplitLine(t, I * this.splitBlockHeight - (((c = this.formatEcgData) == null ? void 0 : c.sens) || 0) / 2 * 0.5, !0)) : (D = this.splitLineGroup) == null || D.add(this.creatSplitLine(t, I * this.splitBlockHeight - (((W = this.formatEcgData) == null ? void 0 : W.sens) || 0) * 0.5));
290
336
  }
291
337
  (H = this.sceneIns) == null || H.add(this.splitLineGroup);
292
338
  }
@@ -309,17 +355,17 @@ let p = class extends U {
309
355
  let e = 0, t = 0;
310
356
  const i = this.waveFromData[this.singleModeInfo.defaultSelect] || [];
311
357
  let a = this.slidingWindowInfo.startInd || 0, s = this.slidingWindowInfo.endInd || 0;
312
- const o = [], n = Math.ceil(i.length / (this.slidingWindowInfo.points || 1));
358
+ const o = [], r = Math.ceil(i.length / (this.slidingWindowInfo.points || 1));
313
359
  for (let l = 0; l < 1; l++) {
314
360
  e = l * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0;
315
- for (let r = 1; r <= n; r++)
316
- t = r * this.splitBlockHeight, r > 1 && (t *= 0.8, a = s, s = a + (this.slidingWindowInfo.points || 0)), r === 1 && (this.loopArrowY.rowAndCol = t), o.push({
361
+ for (let n = 1; n <= r; n++)
362
+ t = n * this.splitBlockHeight, n > 1 && (t *= 0.8, a = s, s = a + (this.slidingWindowInfo.points || 0)), n === 1 && (this.loopArrowY.rowAndCol = t), o.push({
317
363
  pos: [e, t],
318
364
  startInd: a,
319
365
  endInd: s,
320
366
  data: i.slice(a, s).map((h, d) => {
321
- var u;
322
- return [d * (((u = this.formatEcgData) == null ? void 0 : u.step) || 0), -h];
367
+ var p;
368
+ return [d * (((p = this.formatEcgData) == null ? void 0 : p.step) || 0), -h];
323
369
  })
324
370
  });
325
371
  }
@@ -327,21 +373,21 @@ let p = class extends U {
327
373
  }
328
374
  getRednerPoints() {
329
375
  let e = 0, t = 0, i = 0, a = [], s = this.slidingWindowInfo.startInd || 0, o = this.slidingWindowInfo.endInd || 0;
330
- const n = [];
376
+ const r = [];
331
377
  for (let l = 0; l < this.leadModel.column; l++) {
332
378
  e = l * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0, this.leadModel.isContinuous && l > 0 && (s = o, o = s + (this.slidingWindowInfo.points || 0));
333
- for (let r = 1; r <= this.leadModel.line && (t = r * this.splitBlockHeight, !(i > (this.waveFromData || []).length - 1)); r++)
334
- a = this.waveFromData[i] || [], i++, r === 1 && (this.loopArrowY.rowAndCol = t), n.push({
379
+ for (let n = 1; n <= this.leadModel.line && (t = n * this.splitBlockHeight, !(i > (this.waveFromData || []).length - 1)); n++)
380
+ a = this.waveFromData[i] || [], i++, n === 1 && (this.loopArrowY.rowAndCol = t), r.push({
335
381
  pos: [e, t],
336
382
  startInd: s,
337
383
  endInd: o,
338
384
  data: a.slice(s, o).map((h, d) => {
339
- var u;
340
- return [d * (((u = this.formatEcgData) == null ? void 0 : u.step) || 0), -h];
385
+ var p;
386
+ return [d * (((p = this.formatEcgData) == null ? void 0 : p.step) || 0), -h];
341
387
  })
342
388
  });
343
389
  }
344
- return n;
390
+ return r;
345
391
  }
346
392
  getAddRednerPoints() {
347
393
  const e = [], t = this.leadHeadConfig.leadHedeWidth;
@@ -351,26 +397,26 @@ let p = class extends U {
351
397
  pos: [t, i],
352
398
  startInd: this.addSlidingWindowInfo.startInd || 0,
353
399
  endInd: this.addSlidingWindowInfo.endInd || 0,
354
- data: s.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((n, l) => {
355
- var r;
356
- return [l * (((r = this.formatEcgData) == null ? void 0 : r.step) || 0), -n];
400
+ data: s.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((r, l) => {
401
+ var n;
402
+ return [l * (((n = this.formatEcgData) == null ? void 0 : n.step) || 0), -r];
357
403
  })
358
404
  });
359
405
  return e;
360
406
  }
361
407
  createSingleWaveFrom() {
362
- var o, n, l, r, h, d, u;
408
+ var o, r, l, n, h, d, p;
363
409
  (o = this.singleWaveFromGroup) == null || o.removeAll();
364
- const e = (((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.LeadName) || [])[this.singleModeInfo.defaultSelect] || 0;
365
- let t = this.getRednerSinglePoints(), i = L(this.slidingWindowInfo.points || 0, ((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.SampleRate) || 0), a = 0, s = 0;
410
+ const e = (((r = this.formatEcgData) == null ? void 0 : r.processedData.otherParams.LeadName) || [])[this.singleModeInfo.defaultSelect] || 0;
411
+ let t = this.getRednerSinglePoints(), i = A(this.slidingWindowInfo.points || 0, ((l = this.formatEcgData) == null ? void 0 : l.processedData.otherParams.SampleRate) || 0), a = 0, s = 0;
366
412
  for (let c = 0; c < t.length && !(t[c].pos[1] > this.drawArea.height + this.bottomAreaHeight); c++)
367
- this.isLeadDel(e) || (a = parseInt(`${i / 1e3 / 60}`, 10), s = parseInt(`${i / 1e3 % 60}`, 10), a = s === 60 ? a += 1 : a, a = a === 0 ? "00" : a < 10 ? `0${a}` : a, s = s === 0 || s === 60 ? "00" : s < 10 ? `0${s}` : s, (r = this.singleWaveFromGroup) == null || r.add(new E({
413
+ this.isLeadDel(e) || (a = parseInt(`${i / 1e3 / 60}`, 10), s = parseInt(`${i / 1e3 % 60}`, 10), a = s === 60 ? a += 1 : a, a = a === 0 ? "00" : a < 10 ? `0${a}` : a, s = s === 0 || s === 60 ? "00" : s < 10 ? `0${s}` : s, (n = this.singleWaveFromGroup) == null || n.add(new S({
368
414
  cursor: "",
369
415
  name: this.singleModeInfo.defaultSelect + "_" + c,
370
416
  shape: {
371
- points: t[c].data.map(([g, v]) => [
417
+ points: t[c].data.map(([g, W]) => [
372
418
  g + t[c].pos[0],
373
- v + t[c].pos[1]
419
+ W + t[c].pos[1]
374
420
  ])
375
421
  },
376
422
  style: {
@@ -380,7 +426,7 @@ let p = class extends U {
380
426
  onclick: (g) => {
381
427
  this.onDbClickWaveFrom(g, "single");
382
428
  }
383
- })), (d = this.singleWaveFromGroup) == null || d.add(new I({
429
+ })), (d = this.singleWaveFromGroup) == null || d.add(new C({
384
430
  cursor: "",
385
431
  style: {
386
432
  x: t[c].pos[0],
@@ -392,14 +438,14 @@ let p = class extends U {
392
438
  fontFamily: this.fontFamily
393
439
  }
394
440
  })), c > 0 && (i += i));
395
- 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) / 2 - 15), this.singleWaveDataCopy = t, t = null;
441
+ 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] - (((p = this.formatEcgData) == null ? void 0 : p.sens) || 0) / 2 - 15), this.singleWaveDataCopy = t, t = null;
396
442
  }
397
443
  createAddWaveFrom() {
398
444
  var t, i;
399
445
  console.time("createAddWaveFrom");
400
446
  let e = this.getAddRednerPoints();
401
447
  for (let a = 0; a < e.length; a++)
402
- this.isLeadDel(this.longLeadConfig.leadIdxs[a]) || ((t = this.addwaveFromGroup) == null || t.add(new E({
448
+ this.isLeadDel(this.longLeadConfig.leadIdxs[a]) || ((t = this.addwaveFromGroup) == null || t.add(new S({
403
449
  cursor: "",
404
450
  name: this.longLeadConfig.leadIdxs[a] + "_" + a,
405
451
  shape: {
@@ -419,17 +465,17 @@ let p = class extends U {
419
465
  console.timeEnd("createAddWaveFrom"), this.addWaveDataCopy = e, e = null;
420
466
  }
421
467
  createRowAndColWaveFrom() {
422
- var i, a, s, o, n, l;
468
+ var i, a, s, o, r, l;
423
469
  console.time("createRowAndColWaveFrom"), (i = this.rowAndColwaveFromGroup) == null || i.removeAll();
424
470
  let e = this.getRednerPoints(), t = 0;
425
- for (let r = 0; r < e.length; r++)
426
- t = (((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.LeadName) || [])[r] || 0, this.isLeadDel(t) || (s = this.rowAndColwaveFromGroup) == null || s.add(new E({
471
+ for (let n = 0; n < e.length; n++)
472
+ t = (((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.LeadName) || [])[n] || 0, this.isLeadDel(t) || (s = this.rowAndColwaveFromGroup) == null || s.add(new S({
427
473
  cursor: "",
428
- name: r + "_" + r,
474
+ name: n + "_" + n,
429
475
  shape: {
430
- points: e[r].data.map(([h, d]) => [
431
- h + e[r].pos[0],
432
- d + e[r].pos[1]
476
+ points: e[n].data.map(([h, d]) => [
477
+ h + e[n].pos[0],
478
+ d + e[n].pos[1]
433
479
  ])
434
480
  },
435
481
  style: {
@@ -439,12 +485,12 @@ let p = class extends U {
439
485
  onclick: (h) => {
440
486
  this.onDbClickWaveFrom(h, "rowAndCol");
441
487
  }
442
- })), r < this.leadModel.line ? (this.createLeadName(t, e[r].pos[0], e[r].pos[1] - 15), this.createLeadOffAndDel(t, e[r].pos[0] - 5, e[r].pos[1] - (((o = this.formatEcgData) == null ? void 0 : o.sens) || 0) / 2 - 15)) : (this.createLeadName(t, e[r].pos[0] + 5, e[r].pos[1] - (((n = this.formatEcgData) == null ? void 0 : n.sens) || 0) / 2), this.createLeadOffAndDel(t, e[r].pos[0] - 5, e[r].pos[1] - (((l = this.formatEcgData) == null ? void 0 : l.sens) || 0) / 2 + 9));
488
+ })), n < this.leadModel.line ? (this.createLeadName(t, e[n].pos[0], e[n].pos[1] - 15), this.createLeadOffAndDel(t, e[n].pos[0] - 5, e[n].pos[1] - (((o = this.formatEcgData) == null ? void 0 : o.sens) || 0) / 2 - 15)) : (this.createLeadName(t, e[n].pos[0] + 5, e[n].pos[1] - (((r = this.formatEcgData) == null ? void 0 : r.sens) || 0) / 2), this.createLeadOffAndDel(t, e[n].pos[0] - 5, e[n].pos[1] - (((l = this.formatEcgData) == null ? void 0 : l.sens) || 0) / 2 + 9));
443
489
  this.waveDataCopy = e, e = null;
444
490
  }
445
491
  createLeadName(e, t, i, a = !1) {
446
492
  var s;
447
- (s = this.leadHeadNameGroup) == null || s.add(new I({
493
+ (s = this.leadHeadNameGroup) == null || s.add(new C({
448
494
  style: {
449
495
  x: t,
450
496
  y: i,
@@ -455,7 +501,7 @@ let p = class extends U {
455
501
  },
456
502
  oncontextmenu: (o) => {
457
503
  o.event.preventDefault(), this.$emit("notiifyLeadName", {
458
- event: P(W({}, o), {
504
+ event: E(y({}, o), {
459
505
  name: F[e],
460
506
  idx: e
461
507
  }),
@@ -464,7 +510,7 @@ let p = class extends U {
464
510
  },
465
511
  onclick: (o) => {
466
512
  this.$emit("notiifyLeadName", {
467
- event: P(W({}, o), {
513
+ event: E(y({}, o), {
468
514
  name: F[e],
469
515
  idx: e
470
516
  }),
@@ -475,7 +521,7 @@ let p = class extends U {
475
521
  }
476
522
  createLeadOffAndDel(e, t, i) {
477
523
  var a;
478
- (this.isLeadOff(e) || this.isLeadDel(e)) && ((a = this.leadHeadOffAndDelGroup) == null || a.add(new I({
524
+ (this.isLeadOff(e) || this.isLeadDel(e)) && ((a = this.leadHeadOffAndDelGroup) == null || a.add(new C({
479
525
  cursor: "",
480
526
  style: {
481
527
  x: t,
@@ -489,31 +535,31 @@ let p = class extends U {
489
535
  })));
490
536
  }
491
537
  drawRulerNotes() {
492
- var a, s, o, n, l, r;
538
+ var a, s, o, r, l, n;
493
539
  if (!this.rulerConfig.isShow)
494
540
  return;
495
541
  const e = {
496
542
  fill: "#FF0080",
497
543
  fontSize: 13,
498
544
  fontFamily: this.fontFamily
499
- }, t = new I({
545
+ }, t = new C({
500
546
  cursor: "",
501
- style: W({
547
+ style: y({
502
548
  text: "(s)",
503
549
  x: this.leadHeadConfig.leadHedeWidth / 2 - 8,
504
- y: this.drawArea.height + this.bottomAreaHeight - 25
550
+ y: this.canvasContainer.height - 25
505
551
  }, e)
506
- }), i = new I({
507
- style: W({
508
- text: `${((a = this.formatEcgData) == null ? void 0 : a.gainName) === "\u80F8\u5BFC\u51CF\u534A" ? (s = this.formatEcgData) == null ? void 0 : s.gainName : `${(o = this.formatEcgData) == null ? void 0 : o.gain}mm/mV`} ${(n = this.formatEcgData) == null ? void 0 : n.speed}mm/s`,
552
+ }), i = new C({
553
+ style: y({
554
+ text: `${((a = this.formatEcgData) == null ? void 0 : a.gainName) === "\u80F8\u5BFC\u51CF\u534A" ? (s = this.formatEcgData) == null ? void 0 : s.gainName : `${(o = this.formatEcgData) == null ? void 0 : o.gain}mm/mV`} ${(r = this.formatEcgData) == null ? void 0 : r.speed}mm/s`,
509
555
  x: this.leadHeadConfig.leadHedeWidth / 2 + 20,
510
- y: this.drawArea.height + this.bottomAreaHeight - 40
556
+ y: this.canvasContainer.height - this.ruleH
511
557
  }, e)
512
558
  });
513
- (l = this.sceneIns) == null || l.add(i), (r = this.sceneIns) == null || r.add(t);
559
+ (l = this.sceneIns) == null || l.add(i), (n = this.sceneIns) == null || n.add(t);
514
560
  }
515
561
  drawRuler(e = 0) {
516
- var o, n, l, r, h;
562
+ var o, r, l, n, h;
517
563
  if (!this.rulerConfig.isShow)
518
564
  return;
519
565
  const t = this.dataTotalTimes / 1e3;
@@ -521,11 +567,11 @@ let p = class extends U {
521
567
  if (this.leadModel.isContinuous)
522
568
  s = t * 5;
523
569
  else if (!this.leadModel.add && ((o = this.formatEcgData) == null ? void 0 : o.step)) {
524
- const d = x(this.splitPoint, this.formatEcgData.step), u = L(d, ((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.SampleRate) || 0) / 1e3;
525
- s = e + u;
570
+ const d = x(this.splitPoint, this.formatEcgData.step), p = A(d, ((r = this.formatEcgData) == null ? void 0 : r.processedData.otherParams.SampleRate) || 0) / 1e3;
571
+ s = e + p;
526
572
  }
527
573
  for (let d = e; d <= s; d = +(d + 0.1).toFixed(1))
528
- d !== e && (i += this.rulerStep), d % 1 === 0 ? (a = this.canvasContainer.height - 10, (l = this.rulerGroup) == null || l.add(new I({
574
+ d !== e && (i += this.rulerStep), d % 1 === 0 ? (a = this.canvasContainer.height - 10, (l = this.rulerGroup) == null || l.add(new C({
529
575
  cursor: "",
530
576
  style: {
531
577
  x: i,
@@ -535,7 +581,7 @@ let p = class extends U {
535
581
  fontFamily: this.fontFamily,
536
582
  fill: "#FF0080"
537
583
  }
538
- }))) : a = this.canvasContainer.height - 5, (r = this.rulerGroup) == null || r.add(new O({
584
+ }))) : a = this.canvasContainer.height - 5, (n = this.rulerGroup) == null || n.add(new O({
539
585
  cursor: "",
540
586
  shape: {
541
587
  x1: i,
@@ -559,25 +605,25 @@ let p = class extends U {
559
605
  (e = this.sceneIns) == null || e.add(this.leadHeadNameGroup), (t = this.sceneIns) == null || t.add(this.leadHeadOffAndDelGroup);
560
606
  }
561
607
  drawLoopArrow(e = 0) {
562
- var l, r, h, d, u, c, g, v, D, H, A, C, B, k, R, N, z;
608
+ var l, n, h, d, p, c, g, W, D, H, P, I, B, k, z, R, N;
563
609
  if (this.drawLoopArrowStartPosIdx = e, !this.heartFight.isShow)
564
610
  return;
565
611
  this.heartFight.mode && this.currentHeardBeat.heardBeat === null && (this.currentHeardBeat.heardBeat = ((l = this.formatEcgData) == null ? void 0 : l.heartBeatPosition[this.heartFight.defaultSelect]) || null, this.drawHeardBeatLine());
566
612
  let t = 0, i = 0;
567
- this.leadModel.add ? i = this.loopArrowY.add - (((r = this.formatEcgData) == null ? void 0 : r.sens) || 0) - this.splitBlockHeight / 3.5 : i = 20;
613
+ this.leadModel.add ? i = this.loopArrowY.add - (((n = this.formatEcgData) == null ? void 0 : n.sens) || 0) - this.splitBlockHeight / 3.5 : i = 20;
568
614
  let a = 0, s = 0;
569
615
  const o = {
570
616
  fontSize: 12,
571
617
  fill: "red",
572
618
  fontFamily: this.fontFamily
573
619
  };
574
- let n = 0;
575
- for (let G = 0; G < (((h = this.formatEcgData) == null ? void 0 : h.heartBeatPosition) || []).length; G++) {
576
- const f = (d = this.formatEcgData) == null ? void 0 : d.heartBeatPosition[G];
577
- if (n = ((f == null ? void 0 : f.position) || 0) - e, !(e > ((f == null ? void 0 : f.position) || 0)) && !(!this.leadModel.isContinuous && !this.leadModel.add && n > (this.slidingWindowInfo.points || 0)) && !(this.isSingleMode && this.singleModeInfo && n > (this.slidingWindowInfo.points || 0))) {
620
+ let r = 0;
621
+ for (let M = 0; M < (((h = this.formatEcgData) == null ? void 0 : h.heartBeatPosition) || []).length; M++) {
622
+ const f = (d = this.formatEcgData) == null ? void 0 : d.heartBeatPosition[M];
623
+ if (r = ((f == null ? void 0 : f.position) || 0) - e, !(e > ((f == null ? void 0 : f.position) || 0)) && !(!this.leadModel.isContinuous && !this.leadModel.add && r > (this.slidingWindowInfo.points || 0)) && !(this.isSingleMode && this.singleModeInfo && r > (this.slidingWindowInfo.points || 0))) {
578
624
  if (((f == null ? void 0 : f.position) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))
579
625
  break;
580
- t = n * (((u = this.formatEcgData) == null ? void 0 : u.step) || 0) + this.leadHeadConfig.leadHedeWidth - 9.5, s = 0, (v = this.arrowGroup) == null || v.add(new ee({
626
+ t = r * (((p = this.formatEcgData) == null ? void 0 : p.step) || 0) + this.leadHeadConfig.leadHedeWidth - 9.5, s = 0, (W = this.arrowGroup) == null || W.add(new ee({
581
627
  name: "arrow_box",
582
628
  shape: {
583
629
  points: [
@@ -598,36 +644,36 @@ let p = class extends U {
598
644
  var j;
599
645
  !this.heartFight.mode || (b.target.attr({
600
646
  style: { fill: "blue" }
601
- }), (j = this.arrowGroup) == null || j.children().filter((S) => S.name === "arrow_box").forEach((S) => {
602
- S.id !== b.target.id && S.attr({
647
+ }), (j = this.arrowGroup) == null || j.children().filter((L) => L.name === "arrow_box").forEach((L) => {
648
+ L.id !== b.target.id && L.attr({
603
649
  style: { fill: "#ccc" }
604
650
  });
605
651
  }), this.arrowLoopClick(f, b.target));
606
652
  }
607
- })), this.heartFight.heartrate && (a = ((D = this.AssistCtx) == null ? void 0 : D.measureText(`${(f == null ? void 0 : f.heartrate) || ""}`).width) || 0, (H = this.arrowGroup) == null || H.add(new I({
653
+ })), this.heartFight.heartrate && (a = ((D = this.AssistCtx) == null ? void 0 : D.measureText(`${(f == null ? void 0 : f.heartrate) || ""}`).width) || 0, (H = this.arrowGroup) == null || H.add(new C({
608
654
  cursor: "",
609
- style: W({
655
+ style: y({
610
656
  x: 4 + t - a * 1.5,
611
657
  y: s + i,
612
658
  text: `${(f == null ? void 0 : f.heartrate) || ""}`
613
659
  }, o)
614
- })), s += 12), this.heartFight.interval && (a = ((A = this.AssistCtx) == null ? void 0 : A.measureText(`${(f == null ? void 0 : f.interval) || ""}`).width) || 0, (C = this.arrowGroup) == null || C.add(new I({
660
+ })), s += 12), this.heartFight.interval && (a = ((P = this.AssistCtx) == null ? void 0 : P.measureText(`${(f == null ? void 0 : f.interval) || ""}`).width) || 0, (I = this.arrowGroup) == null || I.add(new C({
615
661
  cursor: "",
616
- style: W({
662
+ style: y({
617
663
  x: 4 + t - a * 1.5,
618
664
  y: s + i,
619
665
  text: `${(f == null ? void 0 : f.interval) || ""}`
620
666
  }, o)
621
- })), s += 12), this.heartFight.qrstCompany && (a = ((B = this.AssistCtx) == null ? void 0 : B.measureText(`${(f == null ? void 0 : f.qrstCompany) || ""}`).width) || 0, (k = this.arrowGroup) == null || k.add(new I({
667
+ })), s += 12), this.heartFight.qrstCompany && (a = ((B = this.AssistCtx) == null ? void 0 : B.measureText(`${(f == null ? void 0 : f.qrstCompany) || ""}`).width) || 0, (k = this.arrowGroup) == null || k.add(new C({
622
668
  cursor: "",
623
- style: W({
669
+ style: y({
624
670
  x: 4 + t - a * 1.5,
625
671
  y: s + i,
626
672
  text: `${(f == null ? void 0 : f.qrstCompany) || ""}`
627
673
  }, o)
628
- })), s += 12), this.heartFight.telectricalaxis && (a = ((R = this.AssistCtx) == null ? void 0 : R.measureText(`${(f == null ? void 0 : f.telectricalaxis) || ""}`).width) || 0, (N = this.arrowGroup) == null || N.add(new I({
674
+ })), s += 12), this.heartFight.telectricalaxis && (a = ((z = this.AssistCtx) == null ? void 0 : z.measureText(`${(f == null ? void 0 : f.telectricalaxis) || ""}`).width) || 0, (R = this.arrowGroup) == null || R.add(new C({
629
675
  cursor: "",
630
- style: W({
676
+ style: y({
631
677
  x: 4 + t - a * 1.5,
632
678
  y: s + i,
633
679
  text: `${(f == null ? void 0 : f.telectricalaxis) || ""}`
@@ -635,20 +681,20 @@ let p = class extends U {
635
681
  })));
636
682
  }
637
683
  }
638
- (z = this.sceneIns) == null || z.add(this.arrowGroup);
684
+ (N = this.sceneIns) == null || N.add(this.arrowGroup);
639
685
  }
640
686
  arrowLoopClick(e, t) {
641
687
  this.$emit("notifyHeardBeat", te.clone(e)), this.currentHeardBeat.heardBeat = e, this.currentHeardBeat.ele = t, this.drawHeardBeatLine();
642
688
  }
643
689
  drawHeardBeatLine(e = 0) {
644
- var n, l, r, h, d, u;
690
+ var r, l, n, h, d, p;
645
691
  if (!this.currentHeardBeat.heardBeat)
646
692
  return;
647
- (n = this.heardBeatLineGroup) == null || n.removeAll(), (l = this.sceneIns) == null || l.remove(this.heardBeatLineGroup);
693
+ (r = this.heardBeatLineGroup) == null || r.removeAll(), (l = this.sceneIns) == null || l.remove(this.heardBeatLineGroup);
648
694
  let t = this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat, i = 0, a = this.getRednerPoints(), s = this.getAddRednerPoints(), o;
649
695
  for (const c in t)
650
696
  if (["Pstart", "Pend", "QRSstart", "QRSend", "Tstart", "Tend"].includes(c) && Object.prototype.hasOwnProperty.call(t, c)) {
651
- i = (t[c] - this.slidingWindowInfo.startInd) * (((r = this.formatEcgData) == null ? void 0 : r.step) || 0);
697
+ i = (t[c] - this.slidingWindowInfo.startInd) * (((n = this.formatEcgData) == null ? void 0 : n.step) || 0);
652
698
  e:
653
699
  for (let g = 0; g < a.length; g++)
654
700
  if (!(this.isLeadOff(g) || this.isLeadDel(g))) {
@@ -664,7 +710,7 @@ let p = class extends U {
664
710
  o = s[g], (d = this.heardBeatLineGroup) == null || d.add(this.createHeardBeatLine(o.pos[0] + i, o.pos[1]));
665
711
  }
666
712
  }
667
- (u = this.sceneIns) == null || u.add(this.heardBeatLineGroup), t = null, a = null, s = null;
713
+ (p = this.sceneIns) == null || p.add(this.heardBeatLineGroup), t = null, a = null, s = null;
668
714
  }
669
715
  createHeardBeatLine(e, t) {
670
716
  return new O({
@@ -693,33 +739,40 @@ let p = class extends U {
693
739
  this.scrollWaveFrom(t), this.scrollRuler(t), this.scrollArrow(t), this.$emit("notifyScrollPointIdx", t);
694
740
  }
695
741
  scrollWaveFrom(e) {
696
- var a, s;
742
+ var a, s, o, r, l, n;
697
743
  this.slidingWindowInfo.startInd = e, this.slidingWindowInfo.endInd = e + (this.slidingWindowInfo.points || 0), this.addSlidingWindowInfo.startInd = e, this.addSlidingWindowInfo.endInd = e + (this.addSlidingWindowInfo.points || 0);
698
744
  let t = this.getRednerPoints(), i = this.getAddRednerPoints();
699
- this.waveDataCopy = t, this.addWaveDataCopy = i, (a = this.rowAndColwaveFromGroup) == null || a.eachChild((o, n) => {
700
- n = n || 0, o.attr({
745
+ this.waveDataCopy = t, this.addWaveDataCopy = i, (a = this.rowAndColwaveFromGroup) == null || a.eachChild((h, d) => {
746
+ d = d || 0, h.attr({
701
747
  shape: {
702
- points: t[n].data.map(([l, r]) => [
703
- l + t[n].pos[0],
704
- r + t[n].pos[1]
748
+ points: t[d].data.map(([p, c]) => [
749
+ p + t[d].pos[0],
750
+ c + t[d].pos[1]
705
751
  ])
706
752
  }
707
753
  });
708
- }), (s = this.addwaveFromGroup) == null || s.eachChild((o, n) => {
709
- n = n || 0, o.attr({
754
+ }), (s = this.addwaveFromGroup) == null || s.eachChild((h, d) => {
755
+ d = d || 0, h.attr({
710
756
  shape: {
711
- points: i[n].data.map(([l, r]) => [
712
- l + i[n].pos[0],
713
- r + i[n].pos[1]
757
+ points: i[d].data.map(([p, c]) => [
758
+ p + i[d].pos[0],
759
+ c + i[d].pos[1]
714
760
  ])
715
761
  }
716
762
  });
717
- }), t = null, i = null;
763
+ }), 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({
764
+ shape: {
765
+ points: this.getPacinfPoints(
766
+ this.leadHeadConfig.leadHedeWidth,
767
+ this.canvasContainer.height - this.drawBottomPacH
768
+ )
769
+ }
770
+ })), t = null, i = null;
718
771
  }
719
772
  scrollRuler(e) {
720
773
  var i, a, s;
721
774
  (i = this.rulerGroup) == null || i.removeAll(), (a = this.sceneIns) == null || a.remove(this.rulerGroup);
722
- const t = L(this.isSingleMode ? 0 : e, ((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.SampleRate) || 0) / 1e3;
775
+ const t = A(this.isSingleMode ? 0 : e, ((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.SampleRate) || 0) / 1e3;
723
776
  this.drawRuler(t);
724
777
  }
725
778
  scrollArrow(e) {
@@ -727,50 +780,50 @@ let p = class extends U {
727
780
  (t = this.arrowGroup) == null || t.removeAll(), (i = this.sceneIns) == null || i.remove(this.arrowGroup), this.drawLoopArrow(e), this.drawHeardBeatLine(e);
728
781
  }
729
782
  };
730
- m([
783
+ u([
731
784
  w({
732
785
  required: !0,
733
786
  type: Number,
734
787
  validator: (e) => typeof e == "number"
735
788
  })
736
- ], p.prototype, "width", 2);
737
- m([
789
+ ], m.prototype, "width", 2);
790
+ u([
738
791
  w({
739
792
  required: !0,
740
793
  type: Number,
741
794
  validator: (e) => typeof e == "number"
742
795
  })
743
- ], p.prototype, "height", 2);
744
- m([
796
+ ], m.prototype, "height", 2);
797
+ u([
745
798
  w({
746
799
  default: 0,
747
800
  validator: (e) => typeof e == "number"
748
801
  })
749
- ], p.prototype, "MXEnlargeWaveWidth", 2);
750
- m([
802
+ ], m.prototype, "MXEnlargeWaveWidth", 2);
803
+ u([
751
804
  w({
752
805
  default: 0,
753
806
  type: Number,
754
807
  validator: (e) => typeof e == "number"
755
808
  })
756
- ], p.prototype, "MXEnlargeWaveHeight", 2);
757
- m([
809
+ ], m.prototype, "MXEnlargeWaveHeight", 2);
810
+ u([
758
811
  w({
759
812
  required: !0
760
813
  })
761
- ], p.prototype, "gridConfig", 2);
762
- m([
814
+ ], m.prototype, "gridConfig", 2);
815
+ u([
763
816
  w({
764
817
  default: 5,
765
818
  type: Number
766
819
  })
767
- ], p.prototype, "cellPoints", 2);
768
- m([
820
+ ], m.prototype, "cellPoints", 2);
821
+ u([
769
822
  w({
770
823
  required: !0
771
824
  })
772
- ], p.prototype, "conventionalECGConfig", 2);
773
- m([
825
+ ], m.prototype, "conventionalECGConfig", 2);
826
+ u([
774
827
  w({
775
828
  default: () => ({
776
829
  leadHedeWidth: 20,
@@ -778,18 +831,18 @@ m([
778
831
  leadHedeLineWidth: 2
779
832
  })
780
833
  })
781
- ], p.prototype, "leadHeadConfig", 2);
782
- m([
834
+ ], m.prototype, "leadHeadConfig", 2);
835
+ u([
783
836
  w({
784
837
  required: !0
785
838
  })
786
- ], p.prototype, "formatEcgData", 2);
787
- m([
839
+ ], m.prototype, "formatEcgData", 2);
840
+ u([
788
841
  w({
789
842
  required: !0
790
843
  })
791
- ], p.prototype, "leadModel", 2);
792
- m([
844
+ ], m.prototype, "leadModel", 2);
845
+ u([
793
846
  w({
794
847
  default: () => ({
795
848
  lineColor: "#000",
@@ -798,16 +851,16 @@ m([
798
851
  fontSize: 15
799
852
  })
800
853
  })
801
- ], p.prototype, "leadConfig", 2);
802
- m([
854
+ ], m.prototype, "leadConfig", 2);
855
+ u([
803
856
  w({
804
857
  default: () => ({
805
858
  leadIdxs: [1, 6, 10],
806
859
  leadNames: [1, 6, 10]
807
860
  })
808
861
  })
809
- ], p.prototype, "longLeadConfig", 2);
810
- m([
862
+ ], m.prototype, "longLeadConfig", 2);
863
+ u([
811
864
  w({
812
865
  default: () => ({
813
866
  isShow: !1,
@@ -819,8 +872,8 @@ m([
819
872
  telectricalaxis: !1
820
873
  })
821
874
  })
822
- ], p.prototype, "heartFight", 2);
823
- m([
875
+ ], m.prototype, "heartFight", 2);
876
+ u([
824
877
  w({
825
878
  default: () => ({
826
879
  isShow: !0,
@@ -834,78 +887,78 @@ m([
834
887
  }
835
888
  })
836
889
  })
837
- ], p.prototype, "scrollConfig", 2);
838
- m([
890
+ ], m.prototype, "scrollConfig", 2);
891
+ u([
839
892
  w({
840
893
  default: () => ({
841
894
  isShow: !1
842
895
  })
843
896
  })
844
- ], p.prototype, "rulerConfig", 2);
845
- m([
897
+ ], m.prototype, "rulerConfig", 2);
898
+ u([
846
899
  w({
847
900
  default: () => ({
848
901
  isShow: !1
849
902
  })
850
903
  })
851
- ], p.prototype, "measurRulerConfig", 2);
852
- m([
904
+ ], m.prototype, "measurRulerConfig", 2);
905
+ u([
853
906
  w({
854
907
  default: () => ({
855
908
  isShow: !1
856
909
  })
857
910
  })
858
- ], p.prototype, "paralleRulerConfig", 2);
859
- m([
911
+ ], m.prototype, "paralleRulerConfig", 2);
912
+ u([
860
913
  w({
861
914
  default: () => ({
862
915
  isShow: !1
863
916
  })
864
917
  })
865
- ], p.prototype, "magnifierRulerConfig", 2);
866
- m([
918
+ ], m.prototype, "magnifierRulerConfig", 2);
919
+ u([
867
920
  w({
868
921
  default: 60
869
922
  })
870
- ], p.prototype, "ventricularRate", 2);
871
- m([
923
+ ], m.prototype, "ventricularRate", 2);
924
+ u([
872
925
  w({
873
- default: M.CompoundWave
926
+ default: G.CompoundWave
874
927
  })
875
- ], p.prototype, "enlargeWaveMode", 2);
876
- m([
928
+ ], m.prototype, "enlargeWaveMode", 2);
929
+ u([
877
930
  w({
878
931
  default: () => []
879
932
  })
880
- ], p.prototype, "enlargeGains", 2);
881
- m([
933
+ ], m.prototype, "enlargeGains", 2);
934
+ u([
882
935
  w({
883
936
  default: () => []
884
937
  })
885
- ], p.prototype, "enlargeSpeeds", 2);
886
- m([
938
+ ], m.prototype, "enlargeSpeeds", 2);
939
+ u([
887
940
  w({
888
941
  default: () => ({
889
942
  defaultSelect: 1
890
943
  })
891
944
  })
892
- ], p.prototype, "singleModeInfo", 2);
893
- m([
945
+ ], m.prototype, "singleModeInfo", 2);
946
+ u([
894
947
  w({
895
948
  default: !1
896
949
  })
897
- ], p.prototype, "isSyncAnalyseValueCheck", 2);
898
- m([
950
+ ], m.prototype, "isSyncAnalyseValueCheck", 2);
951
+ u([
899
952
  T(200)
900
- ], p.prototype, "nativeScrollFunc", 1);
901
- m([
953
+ ], m.prototype, "nativeScrollFunc", 1);
954
+ u([
902
955
  T(200)
903
- ], p.prototype, "handleScroll", 1);
904
- p = m([
956
+ ], m.prototype, "handleScroll", 1);
957
+ m = u([
905
958
  Q({
906
959
  name: "Methods"
907
960
  })
908
- ], p);
961
+ ], m);
909
962
  export {
910
- p as default
963
+ m as default
911
964
  };
@@ -24,10 +24,10 @@ export default class Methods extends Vue {
24
24
  dRate_Y: number;
25
25
  scale: number;
26
26
  } | undefined;
27
- dataInfo: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.PowerSpectrumItem[] | undefined;
27
+ dataInfo: import("@costy-plus/utils/types/fcgTools").Fcg.PowerSpectrumItem[] | undefined;
28
28
  };
29
29
  /** 获取 功率谱直方图 */
30
- protected get powerHistogramInfo(): import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.HistogramValue | undefined;
30
+ protected get powerHistogramInfo(): import("@costy-plus/utils/types/fcgTools").Fcg.HistogramValue | undefined;
31
31
  /** 获取 II和V5导功率谱 */
32
32
  protected get powerIIV5Info(): {
33
33
  config: {
@@ -40,11 +40,11 @@ export default class Methods extends Vue {
40
40
  scale: number;
41
41
  } | undefined;
42
42
  dataInfo: {
43
- AutoPowerSpectrum: (import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.PowerSpectrumItem | undefined)[];
44
- Phase: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.Phase | undefined;
45
- RF: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.RF | undefined;
46
- CrossCorrelation: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.CrossCorrelation | undefined;
47
- ImpluseResponse: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.ImpluseResponse | undefined;
43
+ AutoPowerSpectrum: (import("@costy-plus/utils/types/fcgTools").Fcg.PowerSpectrumItem | undefined)[];
44
+ Phase: import("@costy-plus/utils/types/fcgTools").Fcg.Phase | undefined;
45
+ RF: import("@costy-plus/utils/types/fcgTools").Fcg.RF | undefined;
46
+ CrossCorrelation: import("@costy-plus/utils/types/fcgTools").Fcg.CrossCorrelation | undefined;
47
+ ImpluseResponse: import("@costy-plus/utils/types/fcgTools").Fcg.ImpluseResponse | undefined;
48
48
  };
49
49
  };
50
50
  protected FcgAnalysisMode: typeof FcgAnalysisMode;
@@ -101,6 +101,8 @@ export interface LeadModel {
101
101
  type: string | number;
102
102
  /** 是否连续 */
103
103
  isContinuous: boolean;
104
+ /** 是否展示起搏通道 */
105
+ isShowPacing: boolean;
104
106
  }
105
107
 
106
108
  /** 数据 最大 最小点 */
@@ -67,6 +67,7 @@ export default class Methods extends Vue {
67
67
  protected rulerGroup: Readonly<Group | null>;
68
68
  protected arrowGroup: Readonly<Group | null>;
69
69
  protected heardBeatLineGroup: Readonly<Group | null>;
70
+ protected pacingGroup: Readonly<Group | null>;
70
71
  protected bottomAreaHeight: number;
71
72
  protected dataTotalTimes: number;
72
73
  protected totalRows: number;
@@ -82,6 +83,16 @@ export default class Methods extends Vue {
82
83
  rowAndCol: number;
83
84
  }>;
84
85
  protected fontFamily: string;
86
+ /** 标尺底部高度 */
87
+ protected ruleH: number;
88
+ /** 起搏通道高度(固定值)一个大格的高度(起搏导联高度) */
89
+ protected bottomPacH: number;
90
+ /** 起搏通道实际画图位置高度 */
91
+ protected drawBottomPacH: number;
92
+ /** 起搏钉高度 */
93
+ protected pacingh: number;
94
+ /** 起搏标识 P 的 fontSize */
95
+ protected pacingPFontSize: number;
85
96
  /** 每个波形区域块高度 */
86
97
  protected splitBlockHeight: number;
87
98
  /** 分割点(也就是每个波形展示区域的 width px) */
@@ -182,6 +193,10 @@ export default class Methods extends Vue {
182
193
  protected sceneInsMouseDown(event: ElementEvent): void;
183
194
  /** 场景画布抬起事件 */
184
195
  protected sceneInsMouseUp(event: ElementEvent): void;
196
+ /** 绘制起搏通道 */
197
+ protected drawPacing(): void;
198
+ /** 获取 起搏 点位 */
199
+ protected getPacinfPoints(X: number, Y: number): number[][];
185
200
  /** 创建 导联头 图形 */
186
201
  protected createLeadHead(x: number, y: number, isHalve?: boolean): Polyline;
187
202
  /** 创建 导联分割线 图形 */
@@ -1 +1 @@
1
- "use strict";var B=Object.defineProperty,N=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var k=(e,t,a)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,W=(e,t)=>{for(var a in t||(t={}))T.call(t,a)&&k(e,a,t[a]);if(O)for(var a of O(t))j.call(t,a)&&k(e,a,t[a]);return e},A=(e,t)=>N(e,R(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=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"),v=require("@costy-plus/utils"),p=require("zrender"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function X(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const q=$(z),V=X(p);var Y=Object.defineProperty,K=Object.getOwnPropertyDescriptor,u=(e,t,a,i)=>{for(var s=i>1?void 0:i?K(t,a):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,a,s):n(s))||s);return i&&s&&Y(t,a,s),s};exports.default=class extends q.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(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.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({Data:{maxPoints:0,minPoints:0},ComplexData:{maxPoints:0,minPoints:0}}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=-1,this.activeLeadAnalyseValue=null,this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0),this.isShowEnlargeWave=!1}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}get waveFromData(){var e,t,a;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===v.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((a=this.formatEcgData)==null?void 0:a.processedData.handleData.Data)||[[]]}get isSingleMode(){return this.leadModel.column===1&&this.leadModel.line===1}get MXEnlargeWaveWH(){let e=this.width,t=this.height;return this.MXEnlargeWaveWidth&&(e=this.MXEnlargeWaveWidth),this.MXEnlargeWaveHeight&&(t=this.MXEnlargeWaveHeight),{width:e,height:t}}destroyed(){var e,t,a,i,s,o,n,l,r,h,d;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(a=this.addwaveFromGroup)==null||a.removeAll(),(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.sceneIns)==null||d.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.scrollConfig.isShow?this.$nextTick(()=>{var t,a,i,s,o;this.scrollConfig.isNativeScroll?(i=this.$refs.nativeScroll)==null||i.scrollBy({left:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((a=this.formatEcgData)==null?void 0:a.step)||0),top:0}):this.$refs.vueScroll.scrollBy({dx:(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.PosStart)||0)*(((o=this.formatEcgData)==null?void 0:o.step)||0)})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){var a;(a=this.sceneIns)==null||a.dispose(),this.AssistCtx=null;const e=document.getElementById("wave-from-box");this.sceneIns=V.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById("MXGrid");this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp)}sceneInsEventOff(){var e,t,a;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(a=this.sceneIns)==null||a.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,a,i,s,o,n,l,r,h,d,m;this.rowAndColwaveFromGroup=new p.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new p.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new p.Group({name:"addwaveFrom"}),this.leadHeadGroup=new p.Group({name:"leadHead"}),this.splitLineGroup=new p.Group({name:"splitLine"}),this.leadHeadNameGroup=new p.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new p.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new p.Group({name:"ruler"}),this.arrowGroup=new p.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new p.Group({name:"heardBeatLine"}),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.ecgareawidth)==="1"){const c=v.getPrintLengthToPx(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;c<=e&&(e=c)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||0)+this.leadHeadConfig.leadHedeWidth);this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:0,startInd:0,endInd:0},this.addSlidingWindowInfo={points:0,startInd:0,endInd:0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=(l=this.formatEcgData)==null?void 0:l.calcHighestAndLowestPoint(),this.isSingleMode?(this.splitBlockHeight=(((r=this.formatEcgData)==null?void 0:r.analysisValueMode)===v.AnalysisMode.CompoundWave?Math.abs(this.highestAndLowestPoint.ComplexData.maxPoints)+Math.abs(this.highestAndLowestPoint.ComplexData.minPoints):Math.abs(this.highestAndLowestPoint.Data.maxPoints)+Math.abs(this.highestAndLowestPoint.Data.minPoints))+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6)):this.splitBlockHeight=this.drawArea.height/this.totalRows,this.dataTotalTimes=v.getDataLenTimes(this.waveFromData[0].length||0,((h=this.formatEcgData)==null?void 0:h.processedData.otherParams.SampleRate)||0),this.rulerStep=(((d=this.formatEcgData)==null?void 0:d.step)||1)*(((m=this.formatEcgData)==null?void 0:m.processedData.otherParams.SampleRate)||1)/(this.gridConfig.cellMg*2+2)}isLeadOff(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadOff)||[]).includes(e)}isLeadDel(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadDelete)||[]).includes(e)}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const a=Date.now(),i=()=>{var m,c,g,C;const s=e.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let n=0,l=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let r=v.getPointIdxForPx(n,((m=this.formatEcgData)==null?void 0:m.step)||1);r+=l;const h=((c=this.formatEcgData)==null?void 0:c.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(r<=h[1].KeyPosByBeat.Tend+.1*(((g=this.formatEcgData)==null?void 0:g.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(r>h[D-1].KeyPosByBeat.Tend+1&&r<h[D].KeyPosByBeat.Tend+.1*(((C=this.formatEcgData)==null?void 0:C.processedData.otherParams.SampleRate)||0)){d=h[D];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=A(W({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};a-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,i()):this.dbClickWaveFromTime=a}sceneInsMousemove(e){var t;this.sceneIsMouseDown&&(this.scrollConfig.isNativeScroll?(t=this.$refs.nativeScroll)==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs.vueScroll.scrollBy({dx:e.offsetX-this.sceneIsMouseDownX}))}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}createLeadHead(e,t,a){var o;const i=this.leadHeadConfig.leadHedeWidth/4;let s=((o=this.formatEcgData)==null?void 0:o.sens)||0;return s=a?s/2:s,new p.Polyline({cursor:"",shape:{points:[[0+e,0+t],[i+e,0+t],[i+e,-s+t],[3*i+e,-s+t],[3*i+e,0+t],[4*i+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,a){var i,s;return new p.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(a?(((i=this.formatEcgData)==null?void 0:i.sens)||0)/2:((s=this.formatEcgData)==null?void 0:s.sens)||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var a,i,s,o,n,l;(a=this.leadHeadGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.leadHeadGroup);let e=0,t=!1;for(let r=1;r<=this.totalRows;r++)e=0,t=!1,r<=this.leadModel.line?e=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[r-1]||0:r>this.leadModel.line&&r-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[r-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[e])&&(t=!0),(n=this.leadHeadGroup)==null||n.add(this.createLeadHead(0,r*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var s,o,n,l,r,h,d,m,c,g,C,D,P;(s=this.splitLineGroup)==null||s.removeAll(),(o=this.sceneIns)==null||o.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;if(this.splitPoint=e,this.isSingleMode){const I=v.getDataLenTimes(Math.ceil(this.splitPoint/(((n=this.formatEcgData)==null?void 0:n.step)||1))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),y=parseInt(`${I/1e3%60}`,10);this.splitPoint=y*(((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)}let t=0,a=0,i=0;for(let I=1;I<=this.leadModel.column-1;I++){t=I*e+this.leadHeadConfig.leadHedeWidth,a=I*this.leadModel.line;for(let y=1;y<=this.leadModel.line&&(i=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[y-1+a],i!==void 0);y++)((m=this.formatEcgData)==null?void 0:m.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[i])?(g=this.splitLineGroup)==null||g.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((c=this.formatEcgData)==null?void 0:c.sens)||0)/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((C=this.formatEcgData)==null?void 0:C.sens)||0)*.5))}(P=this.sceneIns)==null||P.add(this.splitLineGroup)}initSlidingWindowInfo(){var i,s;const e=((i=this.formatEcgData)==null?void 0:i.step)||0,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint);const a=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:a,startInd:0,endInd:a}}getRednerSinglePoints(){let e=0,t=0;const a=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let i=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],n=Math.ceil(a.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let r=1;r<=n;r++)t=r*this.splitBlockHeight,r>1&&(t*=.8,i=s,s=i+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:i,endInd:s,data:a.slice(i,s).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return o}getRednerPoints(){let e=0,t=0,a=0,i=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(s=o,o=s+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(t=r*this.splitBlockHeight,!(a>(this.waveFromData||[]).length-1));r++)i=this.waveFromData[a]||[],a++,r===1&&(this.loopArrowY.rowAndCol=t),n.push({pos:[e,t],startInd:s,endInd:o,data:i.slice(s,o).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return n}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let a=0,i=0,s=[];for(let o=0;o<this.leadModel.add;o++)i=this.longLeadConfig.leadIdxs[o],a=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[i]||[],o===0&&(this.loopArrowY.add=a),e.push({pos:[t,a],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((n,l)=>{var r;return[l*(((r=this.formatEcgData)==null?void 0:r.step)||0),-n]})});return e}createSingleWaveFrom(){var o,n,l,r,h,d,m;(o=this.singleWaveFromGroup)==null||o.removeAll();const e=(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),a=v.getDataLenTimes(this.slidingWindowInfo.points||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),i=0,s=0;for(let c=0;c<t.length&&!(t[c].pos[1]>this.drawArea.height+this.bottomAreaHeight);c++)this.isLeadDel(e)||(i=parseInt(`${a/1e3/60}`,10),s=parseInt(`${a/1e3%60}`,10),i=s===60?i+=1:i,i=i===0?"00":i<10?`0${i}`:i,s=s===0||s===60?"00":s<10?`0${s}`:s,(r=this.singleWaveFromGroup)==null||r.add(new p.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+c,shape:{points:t[c].data.map(([g,C])=>[g+t[c].pos[0],C+t[c].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:g=>{this.onDbClickWaveFrom(g,"single")}})),(d=this.singleWaveFromGroup)==null||d.add(new p.Text({cursor:"",style:{x:t[c].pos[0],y:t[c].pos[1]-(((h=this.formatEcgData)==null?void 0:h.sens)||0)/2,text:c===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),c>0&&(a+=a));this.createLeadName(e,t[0].pos[0]-10,t[0].pos[1]+10),this.createLeadOffAndDel(e,t[0].pos[0]-5,t[0].pos[1]-(((m=this.formatEcgData)==null?void 0:m.sens)||0)/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,a;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let i=0;i<e.length;i++)this.isLeadDel(this.longLeadConfig.leadIdxs[i])||((t=this.addwaveFromGroup)==null||t.add(new p.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[i]+"_"+i,shape:{points:e[i].data.map(([s,o])=>[s+e[i].pos[0],o+e[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[i],e[i].pos[0],e[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[i],e[i].pos[0]-5,e[i].pos[1]-(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var a,i,s,o,n,l;console.time("createRowAndColWaveFrom"),(a=this.rowAndColwaveFromGroup)==null||a.removeAll();let e=this.getRednerPoints(),t=0;for(let r=0;r<e.length;r++)t=(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.LeadName)||[])[r]||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new p.Polyline({cursor:"",name:r+"_"+r,shape:{points:e[r].data.map(([h,d])=>[h+e[r].pos[0],d+e[r].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),r<this.leadModel.line?(this.createLeadName(t,e[r].pos[0],e[r].pos[1]-15),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(t,e[r].pos[0]+5,e[r].pos[1]-(((n=this.formatEcgData)==null?void 0:n.sens)||0)/2),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,a,i=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new p.Text({style:{x:t,y:a,text:v.LeadNameTexts[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})},onclick:o=>{this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})}}))}createLeadOffAndDel(e,t,a){var i;(this.isLeadOff(e)||this.isLeadDel(e))&&((i=this.leadHeadOffAndDelGroup)==null||i.add(new p.Text({cursor:"",style:{x:t,y:a,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var i,s,o,n,l,r;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new p.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.drawArea.height+this.bottomAreaHeight-25},e)}),a=new p.Text({style:W({text:`${((i=this.formatEcgData)==null?void 0:i.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(s=this.formatEcgData)==null?void 0:s.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(n=this.formatEcgData)==null?void 0:n.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.drawArea.height+this.bottomAreaHeight-40},e)});(l=this.sceneIns)==null||l.add(a),(r=this.sceneIns)==null||r.add(t)}drawRuler(e=0){var o,n,l,r,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let a=this.leadHeadConfig.leadHedeWidth,i=0,s=t;if(this.leadModel.isContinuous)s=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=v.getPointIdxForPx(this.splitPoint,this.formatEcgData.step),m=v.getDataLenTimes(d,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)/1e3;s=e+m}for(let d=e;d<=s;d=+(d+.1).toFixed(1))d!==e&&(a+=this.rulerStep),d%1===0?(i=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new p.Text({cursor:"",style:{x:a,y:i-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):i=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new p.Line({cursor:"",shape:{x1:a,y1:i,x2:a,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,a;this.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(e=this.sceneIns)==null||e.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(t=this.sceneIns)==null||t.add(this.rowAndColwaveFromGroup),(a=this.sceneIns)==null||a.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(),this.drawLoopArrow()}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}drawLoopArrow(e=0){var l,r,h,d,m,c,g,C,D,P,I,y,S,E,x,b,G;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=((l=this.formatEcgData)==null?void 0:l.heartBeatPosition[this.heartFight.defaultSelect])||null,this.drawHeardBeatLine());let t=0,a=0;this.leadModel.add?a=this.loopArrowY.add-(((r=this.formatEcgData)==null?void 0:r.sens)||0)-this.splitBlockHeight/3.5:a=20;let i=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let n=0;for(let H=0;H<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;H++){const f=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[H];if(n=((f==null?void 0:f.position)||0)-e,!(e>((f==null?void 0:f.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&n>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&n>(this.slidingWindowInfo.points||0))){if(((f==null?void 0:f.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=n*(((m=this.formatEcgData)==null?void 0:m.step)||0)+this.leadHeadConfig.leadHedeWidth-9.5,s=0,(C=this.arrowGroup)==null||C.add(new p.Polygon({name:"arrow_box",shape:{points:[[4+t,0+a],[15+t,0+a],[15+t,10+a],[19+t,10+a],[9.5+t,22+a],[0+t,10+a],[4+t,10+a],[4+t,0+a]]},style:{fill:((g=(c=this.currentHeardBeat)==null?void 0:c.heardBeat)==null?void 0:g.index)===(f==null?void 0:f.index)?"blue":"#ccc"},onclick:F=>{var M;!this.heartFight.mode||(F.target.attr({style:{fill:"blue"}}),(M=this.arrowGroup)==null||M.children().filter(L=>L.name==="arrow_box").forEach(L=>{L.id!==F.target.id&&L.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(f,F.target))}})),this.heartFight.heartrate&&(i=((D=this.AssistCtx)==null?void 0:D.measureText(`${(f==null?void 0:f.heartrate)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new p.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(i=((I=this.AssistCtx)==null?void 0:I.measureText(`${(f==null?void 0:f.interval)||""}`).width)||0,(y=this.arrowGroup)==null||y.add(new p.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(i=((S=this.AssistCtx)==null?void 0:S.measureText(`${(f==null?void 0:f.qrstCompany)||""}`).width)||0,(E=this.arrowGroup)==null||E.add(new p.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(i=((x=this.AssistCtx)==null?void 0:x.measureText(`${(f==null?void 0:f.telectricalaxis)||""}`).width)||0,(b=this.arrowGroup)==null||b.add(new p.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.telectricalaxis)||""}`},o)})))}}(G=this.sceneIns)==null||G.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",p.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,l,r,h,d,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,a=0,i=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const c in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(c)&&Object.prototype.hasOwnProperty.call(t,c)){a=(t[c]-this.slidingWindowInfo.startInd)*(((r=this.formatEcgData)==null?void 0:r.step)||0);e:for(let g=0;g<i.length;g++)if(!(this.isLeadOff(g)||this.isLeadDel(g))){if(e>t[c]||!this.leadModel.isContinuous&&t[c]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=i[g],this.leadModel.isContinuous&&g>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}e:for(let g=0;g<s.length;g++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[g])&&this.isLeadDel(this.longLeadConfig.leadIdxs[g]))){if(e>t[c])break e;o=s[g],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}}(m=this.sceneIns)==null||m.add(this.heardBeatLineGroup),t=null,i=null,s=null}createHeardBeatLine(e,t){return new p.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,a){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){var a;const t=v.getPointIdxForPx(e,((a=this.formatEcgData)==null?void 0:a.step)||1);this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",t)}scrollWaveFrom(e){var i,s;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),a=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=a,(i=this.rowAndColwaveFromGroup)==null||i.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:t[n].data.map(([l,r])=>[l+t[n].pos[0],r+t[n].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:a[n].data.map(([l,r])=>[l+a[n].pos[0],r+a[n].pos[1]])}})}),t=null,a=null}scrollRuler(e){var a,i,s;(a=this.rulerGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.rulerGroup);const t=v.getDataLenTimes(this.isSingleMode?0:e,((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,a;(t=this.arrowGroup)==null||t.removeAll(),(a=this.sceneIns)==null||a.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};u([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);u([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);u([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);u([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);u([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);u([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);u([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);u([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);u([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);u([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);u([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);u([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);u([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);u([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);u([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);u([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);u([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);u([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);u([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);u([w.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);u([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);u([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);u([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);u([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);u([v.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);u([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=u([_.default({name:"Methods"})],exports.default);
1
+ "use strict";var z=Object.defineProperty,j=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var B=(e,t,a)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,y=(e,t)=>{for(var a in t||(t={}))N.call(t,a)&&B(e,a,t[a]);if(O)for(var a of O(t))R.call(t,a)&&B(e,a,t[a]);return e},L=(e,t)=>j(e,k(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=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"),v=require("@costy-plus/utils"),p=require("zrender"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function X(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const q=$(T),V=X(p);var Y=Object.defineProperty,K=Object.getOwnPropertyDescriptor,m=(e,t,a,i)=>{for(var s=i>1?void 0:i?K(t,a):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,a,s):n(s))||s);return i&&s&&Y(t,a,s),s};exports.default=class extends q.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.pacingGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(55),this.dataTotalTimes=Object.freeze(0),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.bottomPacH=Object.freeze(20),this.drawBottomPacH=Object.freeze(this.bottomPacH+40),this.pacingh=Object.freeze(12),this.pacingPFontSize=Object.freeze(14),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({Data:{maxPoints:0,minPoints:0},ComplexData:{maxPoints:0,minPoints:0}}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=-1,this.activeLeadAnalyseValue=null,this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0),this.isShowEnlargeWave=!1}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,a;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===v.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((a=this.formatEcgData)==null?void 0:a.processedData.handleData.Data)||[[]]}get isSingleMode(){return this.leadModel.column===1&&this.leadModel.line===1}get MXEnlargeWaveWH(){let e=this.width,t=this.height;return this.MXEnlargeWaveWidth&&(e=this.MXEnlargeWaveWidth),this.MXEnlargeWaveHeight&&(t=this.MXEnlargeWaveHeight),{width:e,height:t}}destroyed(){var e,t,a,i,s,o,n,l,r,h,d,u;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(a=this.addwaveFromGroup)==null||a.removeAll(),(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.pacingGroup)==null||d.removeAll(),(u=this.sceneIns)==null||u.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.scrollConfig.isShow?this.$nextTick(()=>{var t,a,i,s,o;this.scrollConfig.isNativeScroll?(i=this.$refs.nativeScroll)==null||i.scrollBy({left:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((a=this.formatEcgData)==null?void 0:a.step)||0),top:0}):this.$refs.vueScroll.scrollBy({dx:(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.PosStart)||0)*(((o=this.formatEcgData)==null?void 0:o.step)||0)})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){var a;(a=this.sceneIns)==null||a.dispose(),this.AssistCtx=null;const e=document.getElementById("wave-from-box");this.sceneIns=V.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById("MXGrid");this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp)}sceneInsEventOff(){var e,t,a;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(a=this.sceneIns)==null||a.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawPacing(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,a,i,s,o,n,l,r,h,d,u;this.rowAndColwaveFromGroup=new p.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new p.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new p.Group({name:"addwaveFrom"}),this.leadHeadGroup=new p.Group({name:"leadHead"}),this.splitLineGroup=new p.Group({name:"splitLine"}),this.leadHeadNameGroup=new p.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new p.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new p.Group({name:"ruler"}),this.arrowGroup=new p.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new p.Group({name:"heardBeatLine"}),this.pacingGroup=new p.Group({name:"pacing"}),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.ecgareawidth)==="1"){const c=v.getPrintLengthToPx(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;c<=e&&(e=c)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||0)+this.leadHeadConfig.leadHedeWidth);if(this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:0,startInd:0,endInd:0},this.addSlidingWindowInfo={points:0,startInd:0,endInd:0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=(l=this.formatEcgData)==null?void 0:l.calcHighestAndLowestPoint(),this.isSingleMode)this.splitBlockHeight=(((r=this.formatEcgData)==null?void 0:r.analysisValueMode)===v.AnalysisMode.CompoundWave?Math.abs(this.highestAndLowestPoint.ComplexData.maxPoints)+Math.abs(this.highestAndLowestPoint.ComplexData.minPoints):Math.abs(this.highestAndLowestPoint.Data.maxPoints)+Math.abs(this.highestAndLowestPoint.Data.minPoints))+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6);else{let c=this.drawArea.height;this.leadModel.isShowPacing&&(c=this.drawArea.height-this.drawBottomPacH),this.splitBlockHeight=c/this.totalRows}this.dataTotalTimes=v.getDataLenTimes(this.waveFromData[0].length||0,((h=this.formatEcgData)==null?void 0:h.processedData.otherParams.SampleRate)||0),this.rulerStep=(((d=this.formatEcgData)==null?void 0:d.step)||1)*(((u=this.formatEcgData)==null?void 0:u.processedData.otherParams.SampleRate)||1)/(this.gridConfig.cellMg*2+2)}isLeadOff(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadOff)||[]).includes(e)}isLeadDel(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadDelete)||[]).includes(e)}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const a=Date.now(),i=()=>{var u,c,g,C;const s=e.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let n=0,l=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let r=v.getPointIdxForPx(n,((u=this.formatEcgData)==null?void 0:u.step)||1);r+=l;const h=((c=this.formatEcgData)==null?void 0:c.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(r<=h[1].KeyPosByBeat.Tend+.1*(((g=this.formatEcgData)==null?void 0:g.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(r>h[D-1].KeyPosByBeat.Tend+1&&r<h[D].KeyPosByBeat.Tend+.1*(((C=this.formatEcgData)==null?void 0:C.processedData.otherParams.SampleRate)||0)){d=h[D];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=L(y({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};a-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,i()):this.dbClickWaveFromTime=a}sceneInsMousemove(e){var t;this.sceneIsMouseDown&&(this.scrollConfig.isNativeScroll?(t=this.$refs.nativeScroll)==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs.vueScroll.scrollBy({dx:e.offsetX-this.sceneIsMouseDownX}))}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}drawPacing(){var a,i,s,o,n,l,r;if(!this.leadModel.isShowPacing||!((i=(a=this.formatEcgData)==null?void 0:a.processedData.otherParams.PacingData)!=null&&i.length))return;(s=this.pacingGroup)==null||s.removeAll(),(o=this.sceneIns)==null||o.remove(this.pacingGroup);const e=this.leadHeadConfig.leadHedeWidth,t=this.canvasContainer.height-this.drawBottomPacH;(n=this.pacingGroup)==null||n.add(new p.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 p.Polyline({cursor:"",name:"0_0",shape:{points:this.getPacinfPoints(e,t)},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}})),(r=this.sceneIns)==null||r.add(this.pacingGroup)}getPacinfPoints(e,t){var a;return(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.PacingData)||[]).slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((i,s)=>{var o;return[e+s*(((o=this.formatEcgData)==null?void 0:o.step)||0),(i===1?t-this.pacingh:t)+this.pacingPFontSize]})}createLeadHead(e,t,a){var o;const i=this.leadHeadConfig.leadHedeWidth/4;let s=((o=this.formatEcgData)==null?void 0:o.sens)||0;return s=a?s/2:s,new p.Polyline({cursor:"",shape:{points:[[0+e,0+t],[i+e,0+t],[i+e,-s+t],[3*i+e,-s+t],[3*i+e,0+t],[4*i+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,a){var i,s;return new p.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(a?(((i=this.formatEcgData)==null?void 0:i.sens)||0)/2:((s=this.formatEcgData)==null?void 0:s.sens)||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var a,i,s,o,n,l;(a=this.leadHeadGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.leadHeadGroup);let e=0,t=!1;for(let r=1;r<=this.totalRows;r++)e=0,t=!1,r<=this.leadModel.line?e=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[r-1]||0:r>this.leadModel.line&&r-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[r-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[e])&&(t=!0),(n=this.leadHeadGroup)==null||n.add(this.createLeadHead(0,r*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var s,o,n,l,r,h,d,u,c,g,C,D,I;(s=this.splitLineGroup)==null||s.removeAll(),(o=this.sceneIns)==null||o.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;if(this.splitPoint=e,this.isSingleMode){const W=v.getDataLenTimes(Math.ceil(this.splitPoint/(((n=this.formatEcgData)==null?void 0:n.step)||1))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),P=parseInt(`${W/1e3%60}`,10);this.splitPoint=P*(((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)}let t=0,a=0,i=0;for(let W=1;W<=this.leadModel.column-1;W++){t=W*e+this.leadHeadConfig.leadHedeWidth,a=W*this.leadModel.line;for(let P=1;P<=this.leadModel.line&&(i=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[P-1+a],i!==void 0);P++)((u=this.formatEcgData)==null?void 0:u.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[i])?(g=this.splitLineGroup)==null||g.add(this.creatSplitLine(t,P*this.splitBlockHeight-(((c=this.formatEcgData)==null?void 0:c.sens)||0)/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,P*this.splitBlockHeight-(((C=this.formatEcgData)==null?void 0:C.sens)||0)*.5))}(I=this.sceneIns)==null||I.add(this.splitLineGroup)}initSlidingWindowInfo(){var i,s;const e=((i=this.formatEcgData)==null?void 0:i.step)||0,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint);const a=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:a,startInd:0,endInd:a}}getRednerSinglePoints(){let e=0,t=0;const a=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let i=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],n=Math.ceil(a.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let r=1;r<=n;r++)t=r*this.splitBlockHeight,r>1&&(t*=.8,i=s,s=i+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:i,endInd:s,data:a.slice(i,s).map((h,d)=>{var u;return[d*(((u=this.formatEcgData)==null?void 0:u.step)||0),-h]})})}return o}getRednerPoints(){let e=0,t=0,a=0,i=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(s=o,o=s+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(t=r*this.splitBlockHeight,!(a>(this.waveFromData||[]).length-1));r++)i=this.waveFromData[a]||[],a++,r===1&&(this.loopArrowY.rowAndCol=t),n.push({pos:[e,t],startInd:s,endInd:o,data:i.slice(s,o).map((h,d)=>{var u;return[d*(((u=this.formatEcgData)==null?void 0:u.step)||0),-h]})})}return n}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let a=0,i=0,s=[];for(let o=0;o<this.leadModel.add;o++)i=this.longLeadConfig.leadIdxs[o],a=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[i]||[],o===0&&(this.loopArrowY.add=a),e.push({pos:[t,a],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((n,l)=>{var r;return[l*(((r=this.formatEcgData)==null?void 0:r.step)||0),-n]})});return e}createSingleWaveFrom(){var o,n,l,r,h,d,u;(o=this.singleWaveFromGroup)==null||o.removeAll();const e=(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),a=v.getDataLenTimes(this.slidingWindowInfo.points||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),i=0,s=0;for(let c=0;c<t.length&&!(t[c].pos[1]>this.drawArea.height+this.bottomAreaHeight);c++)this.isLeadDel(e)||(i=parseInt(`${a/1e3/60}`,10),s=parseInt(`${a/1e3%60}`,10),i=s===60?i+=1:i,i=i===0?"00":i<10?`0${i}`:i,s=s===0||s===60?"00":s<10?`0${s}`:s,(r=this.singleWaveFromGroup)==null||r.add(new p.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+c,shape:{points:t[c].data.map(([g,C])=>[g+t[c].pos[0],C+t[c].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:g=>{this.onDbClickWaveFrom(g,"single")}})),(d=this.singleWaveFromGroup)==null||d.add(new p.Text({cursor:"",style:{x:t[c].pos[0],y:t[c].pos[1]-(((h=this.formatEcgData)==null?void 0:h.sens)||0)/2,text:c===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),c>0&&(a+=a));this.createLeadName(e,t[0].pos[0]-10,t[0].pos[1]+10),this.createLeadOffAndDel(e,t[0].pos[0]-5,t[0].pos[1]-(((u=this.formatEcgData)==null?void 0:u.sens)||0)/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,a;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let i=0;i<e.length;i++)this.isLeadDel(this.longLeadConfig.leadIdxs[i])||((t=this.addwaveFromGroup)==null||t.add(new p.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[i]+"_"+i,shape:{points:e[i].data.map(([s,o])=>[s+e[i].pos[0],o+e[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[i],e[i].pos[0],e[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[i],e[i].pos[0]-5,e[i].pos[1]-(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var a,i,s,o,n,l;console.time("createRowAndColWaveFrom"),(a=this.rowAndColwaveFromGroup)==null||a.removeAll();let e=this.getRednerPoints(),t=0;for(let r=0;r<e.length;r++)t=(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.LeadName)||[])[r]||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new p.Polyline({cursor:"",name:r+"_"+r,shape:{points:e[r].data.map(([h,d])=>[h+e[r].pos[0],d+e[r].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),r<this.leadModel.line?(this.createLeadName(t,e[r].pos[0],e[r].pos[1]-15),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(t,e[r].pos[0]+5,e[r].pos[1]-(((n=this.formatEcgData)==null?void 0:n.sens)||0)/2),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,a,i=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new p.Text({style:{x:t,y:a,text:v.LeadNameTexts[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:L(y({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})},onclick:o=>{this.$emit("notiifyLeadName",{event:L(y({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})}}))}createLeadOffAndDel(e,t,a){var i;(this.isLeadOff(e)||this.isLeadDel(e))&&((i=this.leadHeadOffAndDelGroup)==null||i.add(new p.Text({cursor:"",style:{x:t,y:a,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var i,s,o,n,l,r;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new p.Text({cursor:"",style:y({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),a=new p.Text({style:y({text:`${((i=this.formatEcgData)==null?void 0:i.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(s=this.formatEcgData)==null?void 0:s.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(n=this.formatEcgData)==null?void 0:n.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(l=this.sceneIns)==null||l.add(a),(r=this.sceneIns)==null||r.add(t)}drawRuler(e=0){var o,n,l,r,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let a=this.leadHeadConfig.leadHedeWidth,i=0,s=t;if(this.leadModel.isContinuous)s=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=v.getPointIdxForPx(this.splitPoint,this.formatEcgData.step),u=v.getDataLenTimes(d,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)/1e3;s=e+u}for(let d=e;d<=s;d=+(d+.1).toFixed(1))d!==e&&(a+=this.rulerStep),d%1===0?(i=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new p.Text({cursor:"",style:{x:a,y:i-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):i=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new p.Line({cursor:"",shape:{x1:a,y1:i,x2:a,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,a;this.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(e=this.sceneIns)==null||e.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(t=this.sceneIns)==null||t.add(this.rowAndColwaveFromGroup),(a=this.sceneIns)==null||a.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(),this.drawLoopArrow()}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}drawLoopArrow(e=0){var l,r,h,d,u,c,g,C,D,I,W,P,F,E,G,b,x;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=((l=this.formatEcgData)==null?void 0:l.heartBeatPosition[this.heartFight.defaultSelect])||null,this.drawHeardBeatLine());let t=0,a=0;this.leadModel.add?a=this.loopArrowY.add-(((r=this.formatEcgData)==null?void 0:r.sens)||0)-this.splitBlockHeight/3.5:a=20;let i=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let n=0;for(let A=0;A<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;A++){const f=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[A];if(n=((f==null?void 0:f.position)||0)-e,!(e>((f==null?void 0:f.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&n>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&n>(this.slidingWindowInfo.points||0))){if(((f==null?void 0:f.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=n*(((u=this.formatEcgData)==null?void 0:u.step)||0)+this.leadHeadConfig.leadHedeWidth-9.5,s=0,(C=this.arrowGroup)==null||C.add(new p.Polygon({name:"arrow_box",shape:{points:[[4+t,0+a],[15+t,0+a],[15+t,10+a],[19+t,10+a],[9.5+t,22+a],[0+t,10+a],[4+t,10+a],[4+t,0+a]]},style:{fill:((g=(c=this.currentHeardBeat)==null?void 0:c.heardBeat)==null?void 0:g.index)===(f==null?void 0:f.index)?"blue":"#ccc"},onclick:S=>{var M;!this.heartFight.mode||(S.target.attr({style:{fill:"blue"}}),(M=this.arrowGroup)==null||M.children().filter(H=>H.name==="arrow_box").forEach(H=>{H.id!==S.target.id&&H.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(f,S.target))}})),this.heartFight.heartrate&&(i=((D=this.AssistCtx)==null?void 0:D.measureText(`${(f==null?void 0:f.heartrate)||""}`).width)||0,(I=this.arrowGroup)==null||I.add(new p.Text({cursor:"",style:y({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(i=((W=this.AssistCtx)==null?void 0:W.measureText(`${(f==null?void 0:f.interval)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new p.Text({cursor:"",style:y({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(i=((F=this.AssistCtx)==null?void 0:F.measureText(`${(f==null?void 0:f.qrstCompany)||""}`).width)||0,(E=this.arrowGroup)==null||E.add(new p.Text({cursor:"",style:y({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(i=((G=this.AssistCtx)==null?void 0:G.measureText(`${(f==null?void 0:f.telectricalaxis)||""}`).width)||0,(b=this.arrowGroup)==null||b.add(new p.Text({cursor:"",style:y({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.telectricalaxis)||""}`},o)})))}}(x=this.sceneIns)==null||x.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",p.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,l,r,h,d,u;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,a=0,i=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const c in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(c)&&Object.prototype.hasOwnProperty.call(t,c)){a=(t[c]-this.slidingWindowInfo.startInd)*(((r=this.formatEcgData)==null?void 0:r.step)||0);e:for(let g=0;g<i.length;g++)if(!(this.isLeadOff(g)||this.isLeadDel(g))){if(e>t[c]||!this.leadModel.isContinuous&&t[c]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=i[g],this.leadModel.isContinuous&&g>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}e:for(let g=0;g<s.length;g++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[g])&&this.isLeadDel(this.longLeadConfig.leadIdxs[g]))){if(e>t[c])break e;o=s[g],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}}(u=this.sceneIns)==null||u.add(this.heardBeatLineGroup),t=null,i=null,s=null}createHeardBeatLine(e,t){return new p.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,a){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){var a;const t=v.getPointIdxForPx(e,((a=this.formatEcgData)==null?void 0:a.step)||1);this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",t)}scrollWaveFrom(e){var i,s,o,n,l,r;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),a=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=a,(i=this.rowAndColwaveFromGroup)==null||i.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:t[d].data.map(([u,c])=>[u+t[d].pos[0],c+t[d].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:a[d].data.map(([u,c])=>[u+a[d].pos[0],c+a[d].pos[1]])}})}),this.leadModel.isShowPacing&&((n=(o=this.formatEcgData)==null?void 0:o.processedData.otherParams.PacingData)==null?void 0:n.length)&&((r=(l=this.pacingGroup)==null?void 0:l.childOfName("0_0"))==null||r.attr({shape:{points:this.getPacinfPoints(this.leadHeadConfig.leadHedeWidth,this.canvasContainer.height-this.drawBottomPacH)}})),t=null,a=null}scrollRuler(e){var a,i,s;(a=this.rulerGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.rulerGroup);const t=v.getDataLenTimes(this.isSingleMode?0:e,((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,a;(t=this.arrowGroup)==null||t.removeAll(),(a=this.sceneIns)==null||a.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};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: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:v.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([v.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);m([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=m([_.default({name:"Methods"})],exports.default);
@@ -24,10 +24,10 @@ export default class Methods extends Vue {
24
24
  dRate_Y: number;
25
25
  scale: number;
26
26
  } | undefined;
27
- dataInfo: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.PowerSpectrumItem[] | undefined;
27
+ dataInfo: import("@costy-plus/utils/types/fcgTools").Fcg.PowerSpectrumItem[] | undefined;
28
28
  };
29
29
  /** 获取 功率谱直方图 */
30
- protected get powerHistogramInfo(): import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.HistogramValue | undefined;
30
+ protected get powerHistogramInfo(): import("@costy-plus/utils/types/fcgTools").Fcg.HistogramValue | undefined;
31
31
  /** 获取 II和V5导功率谱 */
32
32
  protected get powerIIV5Info(): {
33
33
  config: {
@@ -40,11 +40,11 @@ export default class Methods extends Vue {
40
40
  scale: number;
41
41
  } | undefined;
42
42
  dataInfo: {
43
- AutoPowerSpectrum: (import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.PowerSpectrumItem | undefined)[];
44
- Phase: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.Phase | undefined;
45
- RF: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.RF | undefined;
46
- CrossCorrelation: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.CrossCorrelation | undefined;
47
- ImpluseResponse: import("@costy-plus/utils/dist/es/types/fcgTools").Fcg.ImpluseResponse | undefined;
43
+ AutoPowerSpectrum: (import("@costy-plus/utils/types/fcgTools").Fcg.PowerSpectrumItem | undefined)[];
44
+ Phase: import("@costy-plus/utils/types/fcgTools").Fcg.Phase | undefined;
45
+ RF: import("@costy-plus/utils/types/fcgTools").Fcg.RF | undefined;
46
+ CrossCorrelation: import("@costy-plus/utils/types/fcgTools").Fcg.CrossCorrelation | undefined;
47
+ ImpluseResponse: import("@costy-plus/utils/types/fcgTools").Fcg.ImpluseResponse | undefined;
48
48
  };
49
49
  };
50
50
  protected FcgAnalysisMode: typeof FcgAnalysisMode;
@@ -101,6 +101,8 @@ export interface LeadModel {
101
101
  type: string | number;
102
102
  /** 是否连续 */
103
103
  isContinuous: boolean;
104
+ /** 是否展示起搏通道 */
105
+ isShowPacing: boolean;
104
106
  }
105
107
 
106
108
  /** 数据 最大 最小点 */
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "costy-plus",
3
- "version": "1.0.39-0",
3
+ "version": "1.0.41-0",
4
4
  "main": "dist/lib/index.js",
5
5
  "module": "dist/es/index.js",
6
- "types": "dist/es/index.d.ts",
6
+ "types": "dist/es/**/*.d.ts",
7
7
  "scripts": {
8
8
  "build": "vite build",
9
9
  "test": "vitest run"
@@ -18,9 +18,9 @@
18
18
  "author": "Wick Magic",
19
19
  "license": "MIT",
20
20
  "description": "",
21
- "typings": "lib/index.d.ts",
21
+ "typings": "dist/lib/**/*.d.ts",
22
22
  "dependencies": {
23
- "@costy-plus/utils": "0.0.9-0",
23
+ "@costy-plus/utils": "0.0.11-0",
24
24
  "element-ui": "~2.15.11",
25
25
  "vuescroll": "4.17.5",
26
26
  "zrender": "5.4.0"