costy-plus 1.0.94-0 → 1.0.96-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/src/CommonWaveForm/method.js +118 -118
- package/dist/es/src/EcgWave/index.vue_vue_type_template_lang.js +26 -15
- package/dist/es/src/EcgWave/method.d.ts +3 -1
- package/dist/es/src/EcgWave/method.js +352 -348
- package/dist/lib/src/CommonWaveForm/method.js +1 -1
- package/dist/lib/src/EcgWave/index.vue_vue_type_template_lang.js +1 -1
- package/dist/lib/src/EcgWave/method.d.ts +3 -1
- package/dist/lib/src/EcgWave/method.js +1 -1
- package/package.json +1 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var X = Object.defineProperty, Y = Object.defineProperties;
|
|
2
|
+
var _ = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var $ = Object.getOwnPropertySymbols;
|
|
4
|
+
var E = Object.prototype.hasOwnProperty, K = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var V = (e, t, i) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, W = (e, t) => {
|
|
6
6
|
for (var i in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
10
|
-
|
|
7
|
+
E.call(t, i) && V(e, i, t[i]);
|
|
8
|
+
if ($)
|
|
9
|
+
for (var i of $(t))
|
|
10
|
+
K.call(t, i) && V(e, i, t[i]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
}, k = (e, t) => Y(e, _(t));
|
|
13
|
+
import q from "vue";
|
|
14
|
+
import Q from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
|
|
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 { flattenDeep as
|
|
18
|
-
import { throttling as
|
|
19
|
-
import * as
|
|
20
|
-
import { Group as y, Polyline as
|
|
21
|
-
var
|
|
22
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
17
|
+
import { flattenDeep as U, max as Z, min as J } from "lodash";
|
|
18
|
+
import { throttling as T, getStepForSpeed as H, getPrintLengthToPx as ee, getSens as M, getDataLenTimes as O, getPointIdxForPx as P, getActualY as L, calcMs as te, calcBpm as ie } from "@costy-plus/utils";
|
|
19
|
+
import * as se from "zrender";
|
|
20
|
+
import { Group as y, Polyline as R, Line as z, Text as S, Polygon as ae, util as oe } from "zrender";
|
|
21
|
+
var ne = Object.defineProperty, le = Object.getOwnPropertyDescriptor, c = (e, t, i, s) => {
|
|
22
|
+
for (var o = s > 1 ? void 0 : s ? le(t, i) : t, a = e.length - 1, n; a >= 0; a--)
|
|
23
23
|
(n = e[a]) && (o = (s ? n(t, i, o) : n(o)) || o);
|
|
24
|
-
return s && o &&
|
|
24
|
+
return s && o && ne(t, i, o), o;
|
|
25
25
|
};
|
|
26
|
-
let u = class extends
|
|
26
|
+
let u = class extends q {
|
|
27
27
|
constructor() {
|
|
28
28
|
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(60), this.totalRows = Object.freeze(0), this.rulerStep = Object.freeze(0), this.drawLoopArrowStartPosIdx = Object.freeze(0), this.dbClickWaveFromTime = Object.freeze(0), this.timersCopy = Object.freeze(0), this.range = Object.freeze(5e3), this.heartBeatPosition = [], this.currentHeardBeat = {
|
|
29
29
|
heardBeat: null,
|
|
@@ -110,7 +110,7 @@ let u = class extends Q {
|
|
|
110
110
|
startInd: this.slidingWindowInfo.startInd || 0,
|
|
111
111
|
endInd: this.slidingWindowInfo.endInd <= t || this.leadModel.isSingleMode ? t : this.slidingWindowInfo.endInd
|
|
112
112
|
}, this.scrollConfig.isShow && !this.leadModel.isSingleMode) {
|
|
113
|
-
const s =
|
|
113
|
+
const s = H(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), o = this.dataTotalLength * s;
|
|
114
114
|
this.vuescrollWH.width = this.canvasContainer.width + (o || 0) - this.splitPoint;
|
|
115
115
|
}
|
|
116
116
|
const i = Math.ceil((this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / e);
|
|
@@ -121,10 +121,10 @@ let u = class extends Q {
|
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
calcHighestAndLowestPoint() {
|
|
124
|
-
const e =
|
|
124
|
+
const e = U(this.waveLists);
|
|
125
125
|
return {
|
|
126
|
-
maxPoints:
|
|
127
|
-
minPoints:
|
|
126
|
+
maxPoints: Z(e) || 0,
|
|
127
|
+
minPoints: J(e) || 0
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
isLeadOff(e) {
|
|
@@ -158,10 +158,10 @@ let u = class extends Q {
|
|
|
158
158
|
});
|
|
159
159
|
let e = this.canvasContainer.width;
|
|
160
160
|
if (this.leadModel.ecgareawidth === 1) {
|
|
161
|
-
const i =
|
|
161
|
+
const i = ee(((t = this.waveConfigs[0]) == null ? void 0 : t.sampleRate) || 0) + this.leadHeadConfig.leadHedeWidth;
|
|
162
162
|
i <= e && (e = i);
|
|
163
163
|
} else if (this.leadModel.isContinuous) {
|
|
164
|
-
const i =
|
|
164
|
+
const i = H(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), s = this.dataTotalLength * i;
|
|
165
165
|
!this.leadModel.isSingleMode && (s || 0) < e - this.leadHeadConfig.leadHedeWidth && (e = (s || 0) + this.leadHeadConfig.leadHedeWidth);
|
|
166
166
|
}
|
|
167
167
|
this.drawArea = {
|
|
@@ -181,13 +181,13 @@ let u = class extends Q {
|
|
|
181
181
|
}, this.currentHeardBeat = {
|
|
182
182
|
heardBeat: null,
|
|
183
183
|
ele: null
|
|
184
|
-
}, this.leadNameList = this.leadNames.map((i, s) => s) || [], this.totalRows = this.leadModel.line + this.leadModel.add || 1, this.highestAndLowestPoint = this.calcHighestAndLowestPoint(), this.leadModel.isSingleMode ? (this.splitBlockHeight = Math.abs(this.highestAndLowestPoint.maxPoints) + Math.abs(this.highestAndLowestPoint.minPoints) + 22, this.splitBlockHeight > this.drawArea.height && (this.splitBlockHeight = this.drawArea.height / 6)) : this.splitBlockHeight = this.drawArea.height / this.totalRows, this.publicStep =
|
|
184
|
+
}, this.leadNameList = this.leadNames.map((i, s) => s) || [], this.totalRows = this.leadModel.line + this.leadModel.add || 1, this.highestAndLowestPoint = this.calcHighestAndLowestPoint(), this.leadModel.isSingleMode ? (this.splitBlockHeight = Math.abs(this.highestAndLowestPoint.maxPoints) + Math.abs(this.highestAndLowestPoint.minPoints) + 22, this.splitBlockHeight > this.drawArea.height && (this.splitBlockHeight = this.drawArea.height / 6)) : this.splitBlockHeight = this.drawArea.height / this.totalRows, this.publicStep = H(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), this.rulerStep = (this.publicStep || 1) * (this.leadModel.publicSampleRate || 1) / (this.gridConfig.cellMg * 2 + 2);
|
|
185
185
|
}
|
|
186
186
|
initWaveFormPeer() {
|
|
187
187
|
var i;
|
|
188
188
|
(i = this.sceneIns) == null || i.dispose(), this.AssistCtx = null;
|
|
189
189
|
const e = document.getElementById(`${this.prefixId}wave-from-box`);
|
|
190
|
-
this.sceneIns =
|
|
190
|
+
this.sceneIns = se.init(e, {
|
|
191
191
|
width: this.canvasContainer.width,
|
|
192
192
|
height: this.canvasContainer.height,
|
|
193
193
|
devicePixelRatio: 2
|
|
@@ -228,7 +228,7 @@ let u = class extends Q {
|
|
|
228
228
|
this.createLeadHead(
|
|
229
229
|
i,
|
|
230
230
|
this.waveConfigs[h - 1 + s].posY || h * this.splitBlockHeight,
|
|
231
|
-
|
|
231
|
+
M(this.waveConfigs[h - 1 + s].gain, this.gridConfig.cellMg),
|
|
232
232
|
t
|
|
233
233
|
)
|
|
234
234
|
)));
|
|
@@ -240,7 +240,7 @@ let u = class extends Q {
|
|
|
240
240
|
this.createLeadHead(
|
|
241
241
|
i,
|
|
242
242
|
o.posY || (d + 1 + this.leadModel.line) * this.splitBlockHeight,
|
|
243
|
-
|
|
243
|
+
M(o.gain, this.gridConfig.cellMg),
|
|
244
244
|
t
|
|
245
245
|
)
|
|
246
246
|
)));
|
|
@@ -248,7 +248,7 @@ let u = class extends Q {
|
|
|
248
248
|
}
|
|
249
249
|
createLeadHead(e, t, i, s) {
|
|
250
250
|
const o = this.leadHeadConfig.leadHedeWidth / 4;
|
|
251
|
-
return i = s ? i / 2 : i, new
|
|
251
|
+
return i = s ? i / 2 : i, new R({
|
|
252
252
|
cursor: "",
|
|
253
253
|
shape: {
|
|
254
254
|
points: [
|
|
@@ -289,15 +289,15 @@ let u = class extends Q {
|
|
|
289
289
|
(a = this.splitLineGroup) == null || a.removeAll(), (n = this.sceneIns) == null || n.remove(this.splitLineGroup);
|
|
290
290
|
const e = (this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / (this.leadModel.column || 1);
|
|
291
291
|
if (this.splitPoint = e, this.leadModel.isSingleMode) {
|
|
292
|
-
const d =
|
|
292
|
+
const d = H(
|
|
293
293
|
this.waveConfigs[this.singleModeConfig.defaultSelect].speed,
|
|
294
294
|
this.gridConfig.cellMg,
|
|
295
295
|
this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate
|
|
296
|
-
), h =
|
|
296
|
+
), h = O(
|
|
297
297
|
Math.ceil(this.splitPoint / (d || 1)) || 0,
|
|
298
298
|
this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0
|
|
299
|
-
),
|
|
300
|
-
this.splitPoint =
|
|
299
|
+
), m = parseInt(`${h / 1e3 % 60}`, 10);
|
|
300
|
+
this.splitPoint = m * (this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0) * (d || 0);
|
|
301
301
|
}
|
|
302
302
|
let t = 0, i = 0, s = 0, o = 0;
|
|
303
303
|
for (let d = 1; d <= this.leadModel.column - 1; d++) {
|
|
@@ -310,7 +310,7 @@ let u = class extends Q {
|
|
|
310
310
|
continue e;
|
|
311
311
|
if ((this.waveConfigs || [])[h - 1 + i].posX !== void 0 && (t = (this.waveConfigs || [])[h - 1 + i].posX), s = (this.waveConfigs || [])[h - 1 + i].leadIdx, s === void 0)
|
|
312
312
|
break;
|
|
313
|
-
o =
|
|
313
|
+
o = M((this.waveConfigs || [])[h - 1 + i].gain, this.gridConfig.cellMg), (this.waveConfigs || [])[h - 1 + i].gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.leadNames[s]) ? (r = this.splitLineGroup) == null || r.add(
|
|
314
314
|
this.creatSplitLine(
|
|
315
315
|
t,
|
|
316
316
|
((this.waveConfigs || [])[h - 1 + i].posY || h * this.splitBlockHeight) - (o || 0) / 2 * 0.5,
|
|
@@ -329,7 +329,7 @@ let u = class extends Q {
|
|
|
329
329
|
(l = this.sceneIns) == null || l.add(this.splitLineGroup);
|
|
330
330
|
}
|
|
331
331
|
creatSplitLine(e, t, i, s) {
|
|
332
|
-
return new
|
|
332
|
+
return new z({
|
|
333
333
|
cursor: "",
|
|
334
334
|
shape: {
|
|
335
335
|
x1: 0 + e,
|
|
@@ -353,13 +353,13 @@ let u = class extends Q {
|
|
|
353
353
|
fontFamily: this.fontFamily
|
|
354
354
|
}, t = new S({
|
|
355
355
|
cursor: "",
|
|
356
|
-
style:
|
|
356
|
+
style: W({
|
|
357
357
|
text: "(s)",
|
|
358
358
|
x: this.leadHeadConfig.leadHedeWidth / 2 - 8,
|
|
359
359
|
y: this.canvasContainer.height - 25
|
|
360
360
|
}, e)
|
|
361
361
|
}), i = new S({
|
|
362
|
-
style:
|
|
362
|
+
style: W({
|
|
363
363
|
text: this.rulerConfig.renderText || `${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,
|
|
364
364
|
x: this.leadHeadConfig.leadHedeWidth / 2 + 20,
|
|
365
365
|
y: this.canvasContainer.height - this.ruleH
|
|
@@ -373,11 +373,11 @@ let u = class extends Q {
|
|
|
373
373
|
return;
|
|
374
374
|
const t = this.dataTotalTimes / 1e3;
|
|
375
375
|
let i = this.leadHeadConfig.leadHedeWidth, s = 0, o = t;
|
|
376
|
-
const a =
|
|
376
|
+
const a = H(this.rulerConfig.speed, this.gridConfig.cellMg, this.rulerConfig.sampleRate);
|
|
377
377
|
if (this.leadModel.isContinuous)
|
|
378
378
|
o = t * 5;
|
|
379
379
|
else if (!this.leadModel.add && a) {
|
|
380
|
-
const l =
|
|
380
|
+
const l = P(this.splitPoint, a), d = O(l, this.rulerConfig.sampleRate || 0) / 1e3;
|
|
381
381
|
o = e + d;
|
|
382
382
|
}
|
|
383
383
|
for (let l = e; l <= o; l = +(l + 0.1).toFixed(1))
|
|
@@ -391,7 +391,7 @@ let u = class extends Q {
|
|
|
391
391
|
fontFamily: this.fontFamily,
|
|
392
392
|
fill: "#FF0080"
|
|
393
393
|
}
|
|
394
|
-
}))) : s = this.canvasContainer.height - 5, (r = this.rulerGroup) == null || r.add(new
|
|
394
|
+
}))) : s = this.canvasContainer.height - 5, (r = this.rulerGroup) == null || r.add(new z({
|
|
395
395
|
cursor: "",
|
|
396
396
|
shape: {
|
|
397
397
|
x1: i,
|
|
@@ -414,11 +414,11 @@ let u = class extends Q {
|
|
|
414
414
|
let e = 0, t = 0;
|
|
415
415
|
const i = this.waveLists[this.singleModeConfig.defaultSelect] || [];
|
|
416
416
|
let s = this.slidingWindowInfo.startInd || 0, o = this.slidingWindowInfo.endInd || 0;
|
|
417
|
-
const a =
|
|
417
|
+
const a = H(
|
|
418
418
|
this.waveConfigs[this.singleModeConfig.defaultSelect].speed,
|
|
419
419
|
this.gridConfig.cellMg,
|
|
420
420
|
this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate
|
|
421
|
-
), n =
|
|
421
|
+
), n = M(this.waveConfigs[this.singleModeConfig.defaultSelect].gain, this.gridConfig.cellMg), r = [], f = Math.ceil(i.length / (this.slidingWindowInfo.points || 1));
|
|
422
422
|
for (let l = 0; l < 1; l++) {
|
|
423
423
|
e = l * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0;
|
|
424
424
|
for (let d = 1; d <= f; d++)
|
|
@@ -428,7 +428,7 @@ let u = class extends Q {
|
|
|
428
428
|
endInd: o,
|
|
429
429
|
step: a,
|
|
430
430
|
sens: n,
|
|
431
|
-
data: i.slice(s, o).map((h,
|
|
431
|
+
data: i.slice(s, o).map((h, m) => this.waveConfigs[this.singleModeConfig.defaultSelect].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName) ? L(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, h, n / 2) : L(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, h, n)).map((h, m) => [m * (a || 0), -h])
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
434
|
return r;
|
|
@@ -436,15 +436,15 @@ let u = class extends Q {
|
|
|
436
436
|
createSingleWaveFrom() {
|
|
437
437
|
var n, r, f;
|
|
438
438
|
(n = this.singleWaveFromGroup) == null || n.removeAll();
|
|
439
|
-
let e = this.getRednerSinglePoints(), t =
|
|
439
|
+
let e = this.getRednerSinglePoints(), t = O(this.slidingWindowInfo.points || 0, this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0);
|
|
440
440
|
const i = t;
|
|
441
441
|
let s = 0, o = 0, a = 0;
|
|
442
442
|
for (let l = 0; l < e.length && !(e[l].pos[1] > this.drawArea.height + this.bottomAreaHeight); l++)
|
|
443
|
-
this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx) || (s = parseInt(`${t / 1e3 / 60}`, 10), o = parseInt(`${t / 1e3 % 60}`, 10), s = o === 60 ? s += 1 : s, s = s === 0 ? "00" : s < 10 ? `0${s}` : s, o = o === 0 || o === 60 ? "00" : o < 10 ? `0${o}` : o, (r = this.singleWaveFromGroup) == null || r.add(new
|
|
443
|
+
this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx) || (s = parseInt(`${t / 1e3 / 60}`, 10), o = parseInt(`${t / 1e3 % 60}`, 10), s = o === 60 ? s += 1 : s, s = s === 0 ? "00" : s < 10 ? `0${s}` : s, o = o === 0 || o === 60 ? "00" : o < 10 ? `0${o}` : o, (r = this.singleWaveFromGroup) == null || r.add(new R({
|
|
444
444
|
cursor: "",
|
|
445
445
|
name: this.singleModeConfig.defaultSelect + "_" + l,
|
|
446
446
|
shape: {
|
|
447
|
-
points: e[l].data.map(([d, h],
|
|
447
|
+
points: e[l].data.map(([d, h], m) => isNaN(h) ? (a === 0 && (a = m - 1, a = a < 0 ? 0 : a), [
|
|
448
448
|
e[l].data[a][0] + e[l].pos[0],
|
|
449
449
|
e[l].data[a][1] + e[l].pos[1]
|
|
450
450
|
]) : (a = 0, [
|
|
@@ -478,14 +478,14 @@ let u = class extends Q {
|
|
|
478
478
|
this.singleWaveDataCopy = e, e = null;
|
|
479
479
|
}
|
|
480
480
|
drawLoopArrow(e = 0) {
|
|
481
|
-
var h,
|
|
481
|
+
var d, h, m, A, F, x, b, B, D, I, v, g;
|
|
482
482
|
if (this.drawLoopArrowStartPosIdx = e, !this.heartFight.isShow)
|
|
483
483
|
return;
|
|
484
484
|
this.heartFight.mode && this.currentHeardBeat.heardBeat === null && (this.currentHeardBeat.heardBeat = this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect] || null, this.drawHeardBeatLine());
|
|
485
485
|
let t = 0, i = 0;
|
|
486
486
|
if (this.leadModel.add) {
|
|
487
|
-
const
|
|
488
|
-
i = this.loopArrowY.add - (
|
|
487
|
+
const C = M(this.waveConfigs[this.longLeadConfig.leadIdxs[0]].gain, this.gridConfig.cellMg);
|
|
488
|
+
i = this.loopArrowY.add - (C || 0) - this.splitBlockHeight / 3.5;
|
|
489
489
|
} else
|
|
490
490
|
i = 20;
|
|
491
491
|
let s = 0, o = 0;
|
|
@@ -494,19 +494,19 @@ let u = class extends Q {
|
|
|
494
494
|
fill: "red",
|
|
495
495
|
fontFamily: this.fontFamily
|
|
496
496
|
};
|
|
497
|
-
let n = 0, r = 0
|
|
498
|
-
const
|
|
497
|
+
let n = 0, r = 0;
|
|
498
|
+
const f = H(
|
|
499
499
|
this.waveConfigs[this.heartFight.showIdxPai].speed,
|
|
500
500
|
this.gridConfig.cellMg,
|
|
501
501
|
this.waveConfigs[this.heartFight.showIdxPai].sampleRate
|
|
502
502
|
);
|
|
503
|
-
let
|
|
504
|
-
for (let
|
|
505
|
-
const p = this.heartBeatPosition[this.heartFight.showIdxPai][
|
|
506
|
-
if (
|
|
503
|
+
let l = 0;
|
|
504
|
+
for (let C = 0; C < (this.heartBeatPosition[this.heartFight.showIdxPai] || []).length; C++) {
|
|
505
|
+
const p = this.heartBeatPosition[this.heartFight.showIdxPai][C];
|
|
506
|
+
if (l = ((p == null ? void 0 : p.position) || 0) - e, !(e > ((p == null ? void 0 : p.position) || 0)) && !(!this.leadModel.isContinuous && !this.leadModel.add && l > (this.slidingWindowInfo.points || 0)) && !(this.leadModel.isSingleMode && l > (this.slidingWindowInfo.points || 0))) {
|
|
507
507
|
if (((p == null ? void 0 : p.position) || 0) - this.addSlidingWindowInfo.startInd > (this.addSlidingWindowInfo.points || 0))
|
|
508
508
|
break;
|
|
509
|
-
t =
|
|
509
|
+
t = l * (f || 0) + this.leadHeadConfig.leadHedeWidth - 8.5, o = 0, (m = this.arrowGroup) == null || m.add(new ae({
|
|
510
510
|
name: "arrow_box",
|
|
511
511
|
shape: {
|
|
512
512
|
points: [
|
|
@@ -521,47 +521,47 @@ let u = class extends Q {
|
|
|
521
521
|
]
|
|
522
522
|
},
|
|
523
523
|
style: {
|
|
524
|
-
fill: ((
|
|
524
|
+
fill: ((h = (d = this.currentHeardBeat) == null ? void 0 : d.heardBeat) == null ? void 0 : h.index) === (p == null ? void 0 : p.index) ? "blue" : "#ccc"
|
|
525
525
|
},
|
|
526
|
-
onclick: (
|
|
527
|
-
var
|
|
528
|
-
!this.heartFight.mode && !this.heartFight.isClickArrow || (
|
|
526
|
+
onclick: (N) => {
|
|
527
|
+
var j;
|
|
528
|
+
!this.heartFight.mode && !this.heartFight.isClickArrow || (N.target.attr({
|
|
529
529
|
style: { fill: "blue" }
|
|
530
|
-
}), (
|
|
531
|
-
|
|
530
|
+
}), (j = this.arrowGroup) == null || j.children().filter((G) => G.name === "arrow_box").forEach((G) => {
|
|
531
|
+
G.id !== N.target.id && G.attr({
|
|
532
532
|
style: { fill: "#ccc" }
|
|
533
533
|
});
|
|
534
|
-
}), this.arrowLoopClick(p,
|
|
534
|
+
}), this.arrowLoopClick(p, N.target));
|
|
535
535
|
}
|
|
536
|
-
})), this.heartFight.heartrate && (
|
|
537
|
-
Math.abs((p == null ? void 0 : p.position) * (
|
|
536
|
+
})), this.heartFight.heartrate && (n = p == null ? void 0 : p.heartrate, this.heartFight.isHeartRateCalculatedBasedOnInterval && C !== 0 && (r = te(
|
|
537
|
+
Math.abs((p == null ? void 0 : p.position) * (f || 0) - this.heartBeatPosition[this.heartFight.showIdxPai][C - 1].position * (f || 0)),
|
|
538
538
|
this.waveConfigs[this.heartFight.showIdxPai].speed,
|
|
539
539
|
this.gridConfig.cellMg,
|
|
540
540
|
1
|
|
541
|
-
),
|
|
541
|
+
), n = r !== 0 && ie(r) || 0), s = ((A = this.AssistCtx) == null ? void 0 : A.measureText(`${n || ""}`).width) || 0, (F = this.arrowGroup) == null || F.add(new S({
|
|
542
542
|
cursor: "",
|
|
543
|
-
style:
|
|
543
|
+
style: W({
|
|
544
544
|
x: 4 + t - s * 1.4,
|
|
545
545
|
y: o + i,
|
|
546
|
-
text: `${
|
|
546
|
+
text: `${n || ""}`
|
|
547
547
|
}, a)
|
|
548
|
-
})), o += 12), this.heartFight.interval && (s = ((
|
|
548
|
+
})), o += 12), this.heartFight.interval && (s = ((x = this.AssistCtx) == null ? void 0 : x.measureText(`${(p == null ? void 0 : p.interval) || ""}`).width) || 0, (b = this.arrowGroup) == null || b.add(new S({
|
|
549
549
|
cursor: "",
|
|
550
|
-
style:
|
|
550
|
+
style: W({
|
|
551
551
|
x: 4 + t - s * 1.5,
|
|
552
552
|
y: o + i,
|
|
553
553
|
text: `${(p == null ? void 0 : p.interval) || ""}`
|
|
554
554
|
}, a)
|
|
555
|
-
})), o += 12), this.heartFight.qrstCompany && (s = ((
|
|
555
|
+
})), o += 12), this.heartFight.qrstCompany && (s = ((B = this.AssistCtx) == null ? void 0 : B.measureText(`${(p == null ? void 0 : p.qrstCompany) || ""}`).width) || 0, (D = this.arrowGroup) == null || D.add(new S({
|
|
556
556
|
cursor: "",
|
|
557
|
-
style:
|
|
557
|
+
style: W({
|
|
558
558
|
x: 4 + t - s * 1.5,
|
|
559
559
|
y: o + i,
|
|
560
560
|
text: `${(p == null ? void 0 : p.qrstCompany) || ""}`
|
|
561
561
|
}, a)
|
|
562
|
-
})), o += 12), this.heartFight.telectricalaxis && (s = ((
|
|
562
|
+
})), o += 12), this.heartFight.telectricalaxis && (s = ((I = this.AssistCtx) == null ? void 0 : I.measureText(`${(p == null ? void 0 : p.telectricalaxis) || ""}`).width) || 0, (v = this.arrowGroup) == null || v.add(new S({
|
|
563
563
|
cursor: "",
|
|
564
|
-
style:
|
|
564
|
+
style: W({
|
|
565
565
|
x: 4 + t - s * 1.5,
|
|
566
566
|
y: o + i,
|
|
567
567
|
text: `${(p == null ? void 0 : p.telectricalaxis) || ""}`
|
|
@@ -569,13 +569,13 @@ let u = class extends Q {
|
|
|
569
569
|
})));
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
(
|
|
572
|
+
(g = this.sceneIns) == null || g.add(this.arrowGroup);
|
|
573
573
|
}
|
|
574
574
|
arrowLoopClick(e, t) {
|
|
575
|
-
this.$emit("notifyHeardBeat",
|
|
575
|
+
this.$emit("notifyHeardBeat", oe.clone(e)), this.currentHeardBeat.heardBeat = e, this.currentHeardBeat.ele = t, this.drawHeardBeatLine();
|
|
576
576
|
}
|
|
577
577
|
drawHeardBeatLine(e = 0) {
|
|
578
|
-
var o, a, n, r, f, l, d, h,
|
|
578
|
+
var o, a, n, r, f, l, d, h, m, A, F, x, b, B, D;
|
|
579
579
|
if (!this.currentHeardBeat.heardBeat)
|
|
580
580
|
return;
|
|
581
581
|
(o = this.heardBeatLineGroup) == null || o.removeAll(), (a = this.sceneIns) == null || a.remove(this.heardBeatLineGroup);
|
|
@@ -583,15 +583,15 @@ let u = class extends Q {
|
|
|
583
583
|
if (this.leadModel.isSingleMode) {
|
|
584
584
|
let I = this.getRednerSinglePoints();
|
|
585
585
|
e:
|
|
586
|
-
for (let
|
|
587
|
-
if (
|
|
586
|
+
for (let v = 0; v < I.length; v++) {
|
|
587
|
+
if (v >= 1 || this.leadNames[this.singleModeConfig.defaultSelect] === "M")
|
|
588
588
|
break e;
|
|
589
589
|
if ((n = this.analyseValues[this.singleModeConfig.defaultSelect]) != null && n[this.currentHeardBeat.heardBeat.index])
|
|
590
590
|
t = ((l = (f = this.analyseValues[this.singleModeConfig.defaultSelect]) == null ? void 0 : f[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : l.KeyPosByBeat) || t;
|
|
591
591
|
else {
|
|
592
|
-
let g = this.analyseValues.find((
|
|
593
|
-
var
|
|
594
|
-
return (
|
|
592
|
+
let g = this.analyseValues.find((C) => {
|
|
593
|
+
var p;
|
|
594
|
+
return (p = C[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : p.KeyPosByBeat;
|
|
595
595
|
});
|
|
596
596
|
if (!g)
|
|
597
597
|
break e;
|
|
@@ -599,47 +599,47 @@ let u = class extends Q {
|
|
|
599
599
|
}
|
|
600
600
|
for (const g in t)
|
|
601
601
|
if (this.heardBeatLineKeys.includes(g)) {
|
|
602
|
-
if (i = (t[g] - this.slidingWindowInfo.startInd) * (I[
|
|
602
|
+
if (i = (t[g] - this.slidingWindowInfo.startInd) * (I[v].step || 0), this.isLeadOff(v) || this.isLeadDel(v))
|
|
603
603
|
continue;
|
|
604
604
|
if (!this.leadModel.isContinuous && t[g] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0))
|
|
605
605
|
break e;
|
|
606
|
-
s = I[
|
|
606
|
+
s = I[v], (d = this.heardBeatLineGroup) == null || d.add(this.createHeardBeatLine(s.pos[0] + i, s.pos[1]));
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
609
|
I = null;
|
|
610
610
|
} else {
|
|
611
|
-
let I = this.getRednerPoints(),
|
|
611
|
+
let I = this.getRednerPoints(), v = this.getAddRednerPoints();
|
|
612
612
|
e:
|
|
613
613
|
for (let g = 0; g < I.length; g++) {
|
|
614
|
-
t = ((
|
|
615
|
-
for (const
|
|
616
|
-
if (this.heardBeatLineKeys.includes(
|
|
617
|
-
if (i = (t[
|
|
614
|
+
t = ((m = (h = this.analyseValues[g]) == null ? void 0 : h[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : m.KeyPosByBeat) || t;
|
|
615
|
+
for (const C in t)
|
|
616
|
+
if (this.heardBeatLineKeys.includes(C) && Object.prototype.hasOwnProperty.call(t, C)) {
|
|
617
|
+
if (i = (t[C] - this.slidingWindowInfo.startInd) * (I[g].step || 0), this.isLeadOff(g) || this.isLeadDel(g))
|
|
618
618
|
continue;
|
|
619
|
-
if (e > t[
|
|
619
|
+
if (e > t[C] || !this.leadModel.isContinuous && t[C] - this.slidingWindowInfo.startInd > (this.slidingWindowInfo.points || 0) || (s = I[g], this.leadModel.isContinuous && g > this.leadModel.line - 1))
|
|
620
620
|
break e;
|
|
621
|
-
(
|
|
621
|
+
(A = this.heardBeatLineGroup) == null || A.add(this.createHeardBeatLine(s.pos[0] + i, s.pos[1]));
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
e:
|
|
625
|
-
for (let g = 0; g <
|
|
626
|
-
if (!!((
|
|
627
|
-
t = ((
|
|
628
|
-
for (const
|
|
629
|
-
if (this.heardBeatLineKeys.includes(
|
|
630
|
-
if (i = (t[
|
|
625
|
+
for (let g = 0; g < v.length; g++)
|
|
626
|
+
if (!!((F = this.analyseValues[g]) != null && F[this.currentHeardBeat.heardBeat.index])) {
|
|
627
|
+
t = ((b = (x = this.analyseValues[g]) == null ? void 0 : x[this.currentHeardBeat.heardBeat.index]) == null ? void 0 : b.KeyPosByBeat) || t;
|
|
628
|
+
for (const C in t)
|
|
629
|
+
if (this.heardBeatLineKeys.includes(C)) {
|
|
630
|
+
if (i = (t[C] - this.slidingWindowInfo.startInd) * (v[g].step || 0), this.isLeadOff(this.longLeadConfig.leadIdxs[g]) && this.isLeadDel(this.longLeadConfig.leadIdxs[g]))
|
|
631
631
|
continue;
|
|
632
|
-
if (e > t[
|
|
632
|
+
if (e > t[C])
|
|
633
633
|
break e;
|
|
634
|
-
s =
|
|
634
|
+
s = v[g], (B = this.heardBeatLineGroup) == null || B.add(this.createHeardBeatLine(s.pos[0] + i, s.pos[1]));
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
I = null,
|
|
637
|
+
I = null, v = null;
|
|
638
638
|
}
|
|
639
|
-
(
|
|
639
|
+
(D = this.sceneIns) == null || D.add(this.heardBeatLineGroup), t = null;
|
|
640
640
|
}
|
|
641
641
|
createHeardBeatLine(e, t) {
|
|
642
|
-
return new
|
|
642
|
+
return new z({
|
|
643
643
|
cursor: "",
|
|
644
644
|
shape: {
|
|
645
645
|
x1: e,
|
|
@@ -661,11 +661,11 @@ let u = class extends Q {
|
|
|
661
661
|
const e = [];
|
|
662
662
|
let t = this.leadHeadConfig.leadHedeWidth, i = 0, s = 0, o = [], a = 0, n = 0;
|
|
663
663
|
for (let r = 0; r < this.leadModel.add; r++)
|
|
664
|
-
s = this.longLeadConfig.leadIdxs[r], this.waveConfigs[s] && (t = this.waveConfigs[s].addPosX || t, a =
|
|
664
|
+
s = this.longLeadConfig.leadIdxs[r], this.waveConfigs[s] && (t = this.waveConfigs[s].addPosX || t, a = H(this.waveConfigs[s].speed, this.gridConfig.cellMg, this.waveConfigs[s].sampleRate), n = M(this.waveConfigs[s].gain, this.gridConfig.cellMg), i = this.waveConfigs[s].addPosY || (r + this.leadModel.line + 1) * this.splitBlockHeight, o = this.waveLists[s] || [], r === 0 && (this.loopArrowY.add = i), e.push({
|
|
665
665
|
pos: [t, i],
|
|
666
666
|
startInd: this.addSlidingWindowInfo.startInd || 0,
|
|
667
667
|
endInd: this.addSlidingWindowInfo.endInd || 0,
|
|
668
|
-
data: o.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((f, l) => this.waveConfigs[s].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[s].leadName) ?
|
|
668
|
+
data: o.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((f, l) => this.waveConfigs[s].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[s].leadName) ? L(this.waveConfigs[s].sensitivity, f, n / 2) : L(this.waveConfigs[s].sensitivity, f, n)).map((f, l) => [l * (a || 0), -f]),
|
|
669
669
|
sens: n,
|
|
670
670
|
step: a
|
|
671
671
|
}));
|
|
@@ -675,7 +675,7 @@ let u = class extends Q {
|
|
|
675
675
|
var i;
|
|
676
676
|
let e = this.getAddRednerPoints(), t = 0;
|
|
677
677
|
for (let s = 0; s < e.length; s++)
|
|
678
|
-
this.isLeadDel(this.longLeadConfig.leadIdxs[s]) || ((i = this.addwaveFromGroup) == null || i.add(new
|
|
678
|
+
this.isLeadDel(this.longLeadConfig.leadIdxs[s]) || ((i = this.addwaveFromGroup) == null || i.add(new R({
|
|
679
679
|
cursor: "",
|
|
680
680
|
name: this.longLeadConfig.leadIdxs[s] + "_" + s,
|
|
681
681
|
shape: {
|
|
@@ -703,13 +703,13 @@ let u = class extends Q {
|
|
|
703
703
|
for (let l = 0; l < this.leadModel.column; l++) {
|
|
704
704
|
e = l * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0, this.leadModel.isContinuous && l > 0 && (n = r, r = n + (this.slidingWindowInfo.points || 0));
|
|
705
705
|
for (let d = 1; d <= this.leadModel.line && (t = d * this.splitBlockHeight, !(i > (this.waveLists || []).length - 1)); d++)
|
|
706
|
-
e = this.waveConfigs[i].posX || e, t = this.waveConfigs[i].posY || t, o =
|
|
706
|
+
e = this.waveConfigs[i].posX || e, t = this.waveConfigs[i].posY || t, o = H(this.waveConfigs[i].speed, this.gridConfig.cellMg, this.waveConfigs[i].sampleRate), a = M(this.waveConfigs[i].gain, this.gridConfig.cellMg), s = this.waveLists[i] || [], this.waveConfigs[i] && (d === 1 && (this.loopArrowY.rowAndCol = t), f.push({
|
|
707
707
|
pos: [e, t],
|
|
708
708
|
startInd: n,
|
|
709
709
|
endInd: r,
|
|
710
710
|
sens: a,
|
|
711
711
|
step: o,
|
|
712
|
-
data: s.slice(n, r).map((h,
|
|
712
|
+
data: s.slice(n, r).map((h, m) => this.waveConfigs[i].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[i].leadName) ? L(this.waveConfigs[i].sensitivity, h, a / 2) : L(this.waveConfigs[i].sensitivity, h, a)).map((h, m) => [m * (o || 0), -h])
|
|
713
713
|
}), i++);
|
|
714
714
|
}
|
|
715
715
|
return f;
|
|
@@ -719,7 +719,7 @@ let u = class extends Q {
|
|
|
719
719
|
(s = this.rowAndColwaveFromGroup) == null || s.removeAll();
|
|
720
720
|
let e = this.getRednerPoints(), t = 0, i = 0;
|
|
721
721
|
for (let a = 0; a < e.length; a++)
|
|
722
|
-
t = this.waveConfigs[a].leadIdx || 0, this.isLeadDel(t) || (o = this.rowAndColwaveFromGroup) == null || o.add(new
|
|
722
|
+
t = this.waveConfigs[a].leadIdx || 0, this.isLeadDel(t) || (o = this.rowAndColwaveFromGroup) == null || o.add(new R({
|
|
723
723
|
cursor: "",
|
|
724
724
|
name: a + "_" + a,
|
|
725
725
|
shape: {
|
|
@@ -755,7 +755,7 @@ let u = class extends Q {
|
|
|
755
755
|
},
|
|
756
756
|
oncontextmenu: (n) => {
|
|
757
757
|
n.event.preventDefault(), this.$emit("notiifyLeadName", {
|
|
758
|
-
event:
|
|
758
|
+
event: k(W({}, n), {
|
|
759
759
|
name: this.leadNames[e],
|
|
760
760
|
idx: e
|
|
761
761
|
}),
|
|
@@ -764,7 +764,7 @@ let u = class extends Q {
|
|
|
764
764
|
},
|
|
765
765
|
onclick: (n) => {
|
|
766
766
|
this.$emit("notiifyLeadName", {
|
|
767
|
-
event:
|
|
767
|
+
event: k(W({}, n), {
|
|
768
768
|
name: this.leadNames[e],
|
|
769
769
|
idx: e
|
|
770
770
|
}),
|
|
@@ -795,7 +795,7 @@ let u = class extends Q {
|
|
|
795
795
|
this.activeLeadIdx = +o[0];
|
|
796
796
|
const a = +o[1];
|
|
797
797
|
let n = 0, r = 0, f = 0, l = 0, d = 0;
|
|
798
|
-
t === "single" ? (n = e.offsetX - this.singleWaveDataCopy[a].pos[0], r = this.singleWaveDataCopy[a].startInd, f =
|
|
798
|
+
t === "single" ? (n = e.offsetX - this.singleWaveDataCopy[a].pos[0], r = this.singleWaveDataCopy[a].startInd, f = P(n, this.singleWaveDataCopy[a].step || 1), l = this.singleWaveDataCopy[a].sens, d = this.singleWaveDataCopy[a].step) : t === "rowAndCol" ? (n = e.offsetX - this.waveDataCopy[a].pos[0], r = this.waveDataCopy[a].startInd || 0, f = P(n, this.waveDataCopy[a].step || 1), l = this.waveDataCopy[a].sens, d = this.waveDataCopy[a].step) : t === "add" && (n = e.offsetX - this.addWaveDataCopy[a].pos[0], r = this.addWaveDataCopy[a].startInd || 0, f = P(n, this.addWaveDataCopy[a].step || 1), l = this.addWaveDataCopy[a].sens, d = this.addWaveDataCopy[a].step), f += r, this.$emit("notifyActiveEnlargr", {
|
|
799
799
|
sens: l,
|
|
800
800
|
step: d,
|
|
801
801
|
activeLeadIdx: this.activeLeadIdx,
|
|
@@ -811,7 +811,7 @@ let u = class extends Q {
|
|
|
811
811
|
t.type === "horizontal" && (t.scrollLeft = t.scrollLeft || 0, this.scrollCommon(t.scrollLeft));
|
|
812
812
|
}
|
|
813
813
|
scrollCommon(e) {
|
|
814
|
-
const t =
|
|
814
|
+
const t = P(e, this.publicStep || 1);
|
|
815
815
|
this.scrollWaveFrom(t), this.scrollRuler(t), this.scrollArrow(t), this.$emit("notifyScrollPointIdx", {
|
|
816
816
|
slidIdxs: t,
|
|
817
817
|
scrollLeft: e
|
|
@@ -844,7 +844,7 @@ let u = class extends Q {
|
|
|
844
844
|
scrollRuler(e) {
|
|
845
845
|
var i, s;
|
|
846
846
|
(i = this.rulerGroup) == null || i.removeAll(), (s = this.sceneIns) == null || s.remove(this.rulerGroup);
|
|
847
|
-
const t =
|
|
847
|
+
const t = O(this.leadModel.isSingleMode ? 0 : e, this.leadModel.publicSampleRate || 0) / 1e3;
|
|
848
848
|
this.drawRuler(t);
|
|
849
849
|
}
|
|
850
850
|
scrollArrow(e) {
|
|
@@ -1022,13 +1022,13 @@ c([
|
|
|
1022
1022
|
})
|
|
1023
1023
|
], u.prototype, "posStart", 2);
|
|
1024
1024
|
c([
|
|
1025
|
-
|
|
1025
|
+
T(200)
|
|
1026
1026
|
], u.prototype, "nativeScrollFunc", 1);
|
|
1027
1027
|
c([
|
|
1028
|
-
|
|
1028
|
+
T(200)
|
|
1029
1029
|
], u.prototype, "handleScroll", 1);
|
|
1030
1030
|
u = c([
|
|
1031
|
-
|
|
1031
|
+
Q({
|
|
1032
1032
|
name: "Methods"
|
|
1033
1033
|
})
|
|
1034
1034
|
], u);
|