costy-plus 1.0.34-0 → 1.0.36-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/EcgWave/index.vue_vue_type_script_lang.js +1 -1
- package/dist/es/src/EcgWave/index.vue_vue_type_template_lang.js +17 -5
- package/dist/es/src/EcgWave/method.d.ts +6 -2
- package/dist/es/src/EcgWave/method.js +73 -59
- package/dist/es/src/EcgWave/style/index.css +6 -0
- package/dist/es/src/HFECGWave/components/Routine.vue_vue_type_script_lang.js +1 -1
- package/dist/lib/src/EcgWave/index.vue_vue_type_script_lang.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 +6 -2
- package/dist/lib/src/EcgWave/method.js +1 -1
- package/dist/lib/src/EcgWave/style/index.css +6 -0
- package/dist/lib/src/HFECGWave/components/Routine.vue_vue_type_script_lang.js +1 -1
- package/package.json +2 -2
- /package/dist/es/node_modules/.pnpm/{vuescroll@4.17.5_vue@2.7.14 → vuescroll@4.17.5_vue@2.6.14}/node_modules/vuescroll/dist/vuescroll-native.js +0 -0
- /package/dist/lib/node_modules/.pnpm/{vuescroll@4.17.5_vue@2.7.14 → vuescroll@4.17.5_vue@2.6.14}/node_modules/vuescroll/dist/vuescroll-native.js +0 -0
|
@@ -3,7 +3,7 @@ import "vue";
|
|
|
3
3
|
import c, { mixins as l } from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
|
|
4
4
|
import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
|
|
5
5
|
import { Watch as o } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js";
|
|
6
|
-
import d from "../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.
|
|
6
|
+
import d from "../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.6.14/node_modules/vuescroll/dist/vuescroll-native.js";
|
|
7
7
|
import m from "../BackgroundGrid/index2.js";
|
|
8
8
|
import g from "../MeasuringRuler/index2.js";
|
|
9
9
|
import f from "../ParallelRuler/index2.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var p = function() {
|
|
2
|
-
var t, i, l, o, r, s, n, g, d,
|
|
2
|
+
var t, i, l, o, r, s, n, g, d, c, v, h, a = this, f = a.$createElement, e = a._self._c || f;
|
|
3
3
|
return e("div", {
|
|
4
4
|
style: {
|
|
5
5
|
width: `${a.width}px`,
|
|
@@ -66,8 +66,8 @@ var p = function() {
|
|
|
66
66
|
step: ((n = a.formatEcgData) === null || n === void 0 ? void 0 : n.step) || 0,
|
|
67
67
|
"sample-rate": ((g = a.formatEcgData) === null || g === void 0 ? void 0 : g.processedData.otherParams.SampleRate) || 0,
|
|
68
68
|
sensitivity: ((d = a.formatEcgData) === null || d === void 0 ? void 0 : d.processedData.otherParams.Sensitivity) || 0,
|
|
69
|
-
"normal-data": ((
|
|
70
|
-
"complex-data": ((
|
|
69
|
+
"normal-data": ((c = a.formatEcgData) === null || c === void 0 ? void 0 : c.processedData.originData.Data) || [],
|
|
70
|
+
"complex-data": ((v = a.formatEcgData) === null || v === void 0 ? void 0 : v.processedData.originData.ComplexData) || [],
|
|
71
71
|
"lead-name-list": a.leadNameList,
|
|
72
72
|
"lead-head-config": a.leadHeadConfig,
|
|
73
73
|
"active-lead-idx": a.activeLeadIdx,
|
|
@@ -97,10 +97,22 @@ var p = function() {
|
|
|
97
97
|
width: `${a.width}px`,
|
|
98
98
|
height: `${a.height}px`
|
|
99
99
|
}
|
|
100
|
-
}, [e("
|
|
100
|
+
}, [a.scrollConfig.isNativeScroll ? e("div", {
|
|
101
|
+
ref: "nativeScroll",
|
|
102
|
+
staticClass: "native-scroll",
|
|
103
|
+
on: {
|
|
104
|
+
scroll: a.nativeScrollFunc
|
|
105
|
+
}
|
|
106
|
+
}, [e("div", {
|
|
107
|
+
staticClass: "scroll-empty",
|
|
108
|
+
style: {
|
|
109
|
+
width: `${a.vuescrollWH.width}px`,
|
|
110
|
+
height: `${a.vuescrollWH.height}px`
|
|
111
|
+
}
|
|
112
|
+
})]) : e("vueScroll", {
|
|
101
113
|
ref: "vueScroll",
|
|
102
114
|
attrs: {
|
|
103
|
-
ops: a.
|
|
115
|
+
ops: a.scrollConfig
|
|
104
116
|
},
|
|
105
117
|
on: {
|
|
106
118
|
"handle-scroll": a.handleScroll
|
|
@@ -23,8 +23,9 @@ export default class Methods extends Vue {
|
|
|
23
23
|
};
|
|
24
24
|
protected heartFight: HeartFight;
|
|
25
25
|
/** 滚动条配置 */
|
|
26
|
-
protected
|
|
26
|
+
protected scrollConfig: vueScrollConfig & {
|
|
27
27
|
isShow: boolean;
|
|
28
|
+
isNativeScroll: boolean;
|
|
28
29
|
};
|
|
29
30
|
protected rulerConfig: RulerConfig;
|
|
30
31
|
/** 测量尺 */
|
|
@@ -238,8 +239,11 @@ export default class Methods extends Vue {
|
|
|
238
239
|
protected drawHeardBeatLine(startPosIdx?: number): void;
|
|
239
240
|
/** 创建 心搏 短线 */
|
|
240
241
|
protected createHeardBeatLine(X: number, Y: number): Line;
|
|
241
|
-
/**
|
|
242
|
+
/** 原生滚动条事件 */
|
|
243
|
+
protected nativeScrollFunc(event: WheelEvent): void;
|
|
244
|
+
/** 自定义滚动事件监听 */
|
|
242
245
|
protected handleScroll(vertical: HandleScrollParams, horizontal: HandleScrollParams, nativeEvent: Event): void;
|
|
246
|
+
protected scrollCommon(scrollLeft: number): void;
|
|
243
247
|
protected scrollWaveFrom(slidIdxs: number): void;
|
|
244
248
|
protected scrollRuler(slidIdxs: number): void;
|
|
245
249
|
protected scrollArrow(slidIdxs: number): void;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var V = Object.defineProperty, _ = Object.defineProperties;
|
|
2
|
+
var q = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var $ = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
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) => {
|
|
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
|
-
},
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
}, P = (e, t) => _(e, q(t));
|
|
13
|
+
import U from "vue";
|
|
14
|
+
import Q from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
|
|
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
|
|
18
|
-
import { init as Z, Group as
|
|
17
|
+
import { AnalysisMode as M, throttling as T, getPrintLengthToPx as J, getDataLenTimes as L, LeadNameTexts as F, getPointIdxForPx as x } from "@costy-plus/utils";
|
|
18
|
+
import { init as Z, Group as y, Polyline as E, Line as O, Text as I, Polygon as ee, util as te } from "zrender";
|
|
19
19
|
var ie = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, u = (e, t, i, a) => {
|
|
20
20
|
for (var s = a > 1 ? void 0 : a ? ae(t, i) : t, o = e.length - 1, n; o >= 0; o--)
|
|
21
21
|
(n = e[o]) && (s = (a ? n(t, i, s) : n(s)) || s);
|
|
22
22
|
return a && s && ie(t, i, s), s;
|
|
23
23
|
};
|
|
24
|
-
let p = class extends
|
|
24
|
+
let p = class extends U {
|
|
25
25
|
constructor() {
|
|
26
26
|
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
27
|
heardBeat: null,
|
|
@@ -50,7 +50,7 @@ let p = class extends K {
|
|
|
50
50
|
var e;
|
|
51
51
|
return {
|
|
52
52
|
width: this.width,
|
|
53
|
-
height: this.height - (this.
|
|
53
|
+
height: this.height - (this.scrollConfig.isShow && parseInt(`${(e = this.scrollConfig.bar) == null ? void 0 : e.size}`) || 0) || 0
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
get waveFromData() {
|
|
@@ -73,10 +73,13 @@ let p = class extends K {
|
|
|
73
73
|
}
|
|
74
74
|
init() {
|
|
75
75
|
var e;
|
|
76
|
-
this.initWaveFormPeer(), this.combinationDrawing(), (e = this.formatEcgData) != null && e.processedData.otherParams.PosStart && (this.
|
|
77
|
-
var t, i;
|
|
78
|
-
this.$refs.
|
|
79
|
-
|
|
76
|
+
this.initWaveFormPeer(), this.combinationDrawing(), (e = this.formatEcgData) != null && e.processedData.otherParams.PosStart && (this.scrollConfig.isShow ? this.$nextTick(() => {
|
|
77
|
+
var t, i, a, s, o;
|
|
78
|
+
this.scrollConfig.isNativeScroll ? (a = this.$refs.nativeScroll) == null || a.scrollBy({
|
|
79
|
+
left: (((t = this.formatEcgData) == null ? void 0 : t.processedData.otherParams.PosStart) || 0) * (((i = this.formatEcgData) == null ? void 0 : i.step) || 0),
|
|
80
|
+
top: 0
|
|
81
|
+
}) : this.$refs.vueScroll.scrollBy({
|
|
82
|
+
dx: (((s = this.formatEcgData) == null ? void 0 : s.processedData.otherParams.PosStart) || 0) * (((o = this.formatEcgData) == null ? void 0 : o.step) || 0)
|
|
80
83
|
});
|
|
81
84
|
}) : (this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart), this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart), this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)));
|
|
82
85
|
}
|
|
@@ -101,25 +104,25 @@ let p = class extends K {
|
|
|
101
104
|
}
|
|
102
105
|
initConfig() {
|
|
103
106
|
var t, i, a, s, o, n, l, r, h, d, m;
|
|
104
|
-
this.rowAndColwaveFromGroup = new
|
|
107
|
+
this.rowAndColwaveFromGroup = new y({
|
|
105
108
|
name: "rowAndColwaveFrom"
|
|
106
|
-
}), this.singleWaveFromGroup = new
|
|
109
|
+
}), this.singleWaveFromGroup = new y({
|
|
107
110
|
name: "singleWaveFrom"
|
|
108
|
-
}), this.addwaveFromGroup = new
|
|
111
|
+
}), this.addwaveFromGroup = new y({
|
|
109
112
|
name: "addwaveFrom"
|
|
110
|
-
}), this.leadHeadGroup = new
|
|
113
|
+
}), this.leadHeadGroup = new y({
|
|
111
114
|
name: "leadHead"
|
|
112
|
-
}), this.splitLineGroup = new
|
|
115
|
+
}), this.splitLineGroup = new y({
|
|
113
116
|
name: "splitLine"
|
|
114
|
-
}), this.leadHeadNameGroup = new
|
|
117
|
+
}), this.leadHeadNameGroup = new y({
|
|
115
118
|
name: "leadHeadName"
|
|
116
|
-
}), this.leadHeadOffAndDelGroup = new
|
|
119
|
+
}), this.leadHeadOffAndDelGroup = new y({
|
|
117
120
|
name: "leadHeadOffAndDel"
|
|
118
|
-
}), this.rulerGroup = new
|
|
121
|
+
}), this.rulerGroup = new y({
|
|
119
122
|
name: "ruler"
|
|
120
|
-
}), this.arrowGroup = new
|
|
123
|
+
}), this.arrowGroup = new y({
|
|
121
124
|
name: "arrowLoop"
|
|
122
|
-
}), this.heardBeatLineGroup = new
|
|
125
|
+
}), this.heardBeatLineGroup = new y({
|
|
123
126
|
name: "heardBeatLine"
|
|
124
127
|
}), this.vuescrollWH.width = this.width, this.vuescrollWH.height = this.height;
|
|
125
128
|
let e = this.canvasContainer.width;
|
|
@@ -182,16 +185,20 @@ let p = class extends K {
|
|
|
182
185
|
}
|
|
183
186
|
} else
|
|
184
187
|
d = h[0];
|
|
185
|
-
!d || (this.activeLeadAnalyseValue =
|
|
188
|
+
!d || (this.activeLeadAnalyseValue = P(W({}, d), {
|
|
186
189
|
BeatCount: h.length - 1
|
|
187
190
|
}), d = null, this.$emit("notifyActiveEnlargr"), this.isShowEnlargeWave = !0);
|
|
188
191
|
};
|
|
189
192
|
i - this.dbClickWaveFromTime < 400 ? (this.dbClickWaveFromTime = 0, a()) : this.dbClickWaveFromTime = i;
|
|
190
193
|
}
|
|
191
194
|
sceneInsMousemove(e) {
|
|
192
|
-
|
|
195
|
+
var t;
|
|
196
|
+
this.sceneIsMouseDown && (this.scrollConfig.isNativeScroll ? (t = this.$refs.nativeScroll) == null || t.scrollBy({
|
|
197
|
+
left: e.offsetX - this.sceneIsMouseDownX,
|
|
198
|
+
top: 0
|
|
199
|
+
}) : this.$refs.vueScroll.scrollBy({
|
|
193
200
|
dx: e.offsetX - this.sceneIsMouseDownX
|
|
194
|
-
});
|
|
201
|
+
}));
|
|
195
202
|
}
|
|
196
203
|
sceneInsMouseDown(e) {
|
|
197
204
|
this.sceneIsMouseDown = !0, this.sceneIsMouseDownX = e.offsetX;
|
|
@@ -203,7 +210,7 @@ let p = class extends K {
|
|
|
203
210
|
var o;
|
|
204
211
|
const a = this.leadHeadConfig.leadHedeWidth / 4;
|
|
205
212
|
let s = ((o = this.formatEcgData) == null ? void 0 : o.sens) || 0;
|
|
206
|
-
return s = i ? s / 2 : s, new
|
|
213
|
+
return s = i ? s / 2 : s, new E({
|
|
207
214
|
cursor: "",
|
|
208
215
|
shape: {
|
|
209
216
|
points: [
|
|
@@ -289,7 +296,7 @@ let p = class extends K {
|
|
|
289
296
|
points: t,
|
|
290
297
|
startInd: 0,
|
|
291
298
|
endInd: t
|
|
292
|
-
}, this.
|
|
299
|
+
}, this.scrollConfig.isShow && !this.isSingleMode && (this.vuescrollWH.width = this.canvasContainer.width + (((s = this.formatEcgData) == null ? void 0 : s.dataPxLen) || 0) - this.splitPoint);
|
|
293
300
|
const i = Math.ceil((this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / e);
|
|
294
301
|
this.addSlidingWindowInfo = {
|
|
295
302
|
points: i,
|
|
@@ -356,7 +363,7 @@ let p = class extends K {
|
|
|
356
363
|
const e = (((n = this.formatEcgData) == null ? void 0 : n.processedData.otherParams.LeadName) || [])[this.singleModeInfo.defaultSelect] || 0;
|
|
357
364
|
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;
|
|
358
365
|
for (let c = 0; c < t.length && !(t[c].pos[1] > this.drawArea.height + this.bottomAreaHeight); c++)
|
|
359
|
-
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
|
|
366
|
+
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({
|
|
360
367
|
cursor: "",
|
|
361
368
|
name: this.singleModeInfo.defaultSelect + "_" + c,
|
|
362
369
|
shape: {
|
|
@@ -372,7 +379,7 @@ let p = class extends K {
|
|
|
372
379
|
onclick: (g) => {
|
|
373
380
|
this.onDbClickWaveFrom(g, "single");
|
|
374
381
|
}
|
|
375
|
-
})), (d = this.singleWaveFromGroup) == null || d.add(new
|
|
382
|
+
})), (d = this.singleWaveFromGroup) == null || d.add(new I({
|
|
376
383
|
cursor: "",
|
|
377
384
|
style: {
|
|
378
385
|
x: t[c].pos[0],
|
|
@@ -391,7 +398,7 @@ let p = class extends K {
|
|
|
391
398
|
console.time("createAddWaveFrom");
|
|
392
399
|
let e = this.getAddRednerPoints();
|
|
393
400
|
for (let a = 0; a < e.length; a++)
|
|
394
|
-
this.isLeadDel(this.longLeadConfig.leadIdxs[a]) || ((t = this.addwaveFromGroup) == null || t.add(new
|
|
401
|
+
this.isLeadDel(this.longLeadConfig.leadIdxs[a]) || ((t = this.addwaveFromGroup) == null || t.add(new E({
|
|
395
402
|
cursor: "",
|
|
396
403
|
name: this.longLeadConfig.leadIdxs[a] + "_" + a,
|
|
397
404
|
shape: {
|
|
@@ -415,7 +422,7 @@ let p = class extends K {
|
|
|
415
422
|
console.time("createRowAndColWaveFrom"), (i = this.rowAndColwaveFromGroup) == null || i.removeAll();
|
|
416
423
|
let e = this.getRednerPoints(), t = 0;
|
|
417
424
|
for (let r = 0; r < e.length; r++)
|
|
418
|
-
t = (((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.LeadName) || [])[r] || 0, this.isLeadDel(t) || (s = this.rowAndColwaveFromGroup) == null || s.add(new
|
|
425
|
+
t = (((a = this.formatEcgData) == null ? void 0 : a.processedData.otherParams.LeadName) || [])[r] || 0, this.isLeadDel(t) || (s = this.rowAndColwaveFromGroup) == null || s.add(new E({
|
|
419
426
|
cursor: "",
|
|
420
427
|
name: r + "_" + r,
|
|
421
428
|
shape: {
|
|
@@ -436,7 +443,7 @@ let p = class extends K {
|
|
|
436
443
|
}
|
|
437
444
|
createLeadName(e, t, i, a = !1) {
|
|
438
445
|
var s;
|
|
439
|
-
(s = this.leadHeadNameGroup) == null || s.add(new
|
|
446
|
+
(s = this.leadHeadNameGroup) == null || s.add(new I({
|
|
440
447
|
style: {
|
|
441
448
|
x: t,
|
|
442
449
|
y: i,
|
|
@@ -447,7 +454,7 @@ let p = class extends K {
|
|
|
447
454
|
},
|
|
448
455
|
oncontextmenu: (o) => {
|
|
449
456
|
o.event.preventDefault(), this.$emit("notiifyLeadName", {
|
|
450
|
-
event:
|
|
457
|
+
event: P(W({}, o), {
|
|
451
458
|
name: F[e],
|
|
452
459
|
idx: e
|
|
453
460
|
}),
|
|
@@ -456,7 +463,7 @@ let p = class extends K {
|
|
|
456
463
|
},
|
|
457
464
|
onclick: (o) => {
|
|
458
465
|
this.$emit("notiifyLeadName", {
|
|
459
|
-
event:
|
|
466
|
+
event: P(W({}, o), {
|
|
460
467
|
name: F[e],
|
|
461
468
|
idx: e
|
|
462
469
|
}),
|
|
@@ -467,7 +474,7 @@ let p = class extends K {
|
|
|
467
474
|
}
|
|
468
475
|
createLeadOffAndDel(e, t, i) {
|
|
469
476
|
var a;
|
|
470
|
-
(this.isLeadOff(e) || this.isLeadDel(e)) && ((a = this.leadHeadOffAndDelGroup) == null || a.add(new
|
|
477
|
+
(this.isLeadOff(e) || this.isLeadDel(e)) && ((a = this.leadHeadOffAndDelGroup) == null || a.add(new I({
|
|
471
478
|
cursor: "",
|
|
472
479
|
style: {
|
|
473
480
|
x: t,
|
|
@@ -488,14 +495,14 @@ let p = class extends K {
|
|
|
488
495
|
fill: "#FF0080",
|
|
489
496
|
fontSize: 13,
|
|
490
497
|
fontFamily: this.fontFamily
|
|
491
|
-
}, t = new
|
|
498
|
+
}, t = new I({
|
|
492
499
|
cursor: "",
|
|
493
500
|
style: W({
|
|
494
501
|
text: "(s)",
|
|
495
502
|
x: this.leadHeadConfig.leadHedeWidth / 2 - 8,
|
|
496
503
|
y: this.drawArea.height + this.bottomAreaHeight - 25
|
|
497
504
|
}, e)
|
|
498
|
-
}), i = new
|
|
505
|
+
}), i = new I({
|
|
499
506
|
style: W({
|
|
500
507
|
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`,
|
|
501
508
|
x: this.leadHeadConfig.leadHedeWidth / 2 + 20,
|
|
@@ -517,7 +524,7 @@ let p = class extends K {
|
|
|
517
524
|
s = e + m;
|
|
518
525
|
}
|
|
519
526
|
for (let d = e; d <= s; d = +(d + 0.1).toFixed(1))
|
|
520
|
-
d !== e && (i += this.rulerStep), d % 1 === 0 ? (a = this.canvasContainer.height - 10, (l = this.rulerGroup) == null || l.add(new
|
|
527
|
+
d !== e && (i += this.rulerStep), d % 1 === 0 ? (a = this.canvasContainer.height - 10, (l = this.rulerGroup) == null || l.add(new I({
|
|
521
528
|
cursor: "",
|
|
522
529
|
style: {
|
|
523
530
|
x: i,
|
|
@@ -551,7 +558,7 @@ let p = class extends K {
|
|
|
551
558
|
(e = this.sceneIns) == null || e.add(this.leadHeadNameGroup), (t = this.sceneIns) == null || t.add(this.leadHeadOffAndDelGroup);
|
|
552
559
|
}
|
|
553
560
|
drawLoopArrow(e = 0) {
|
|
554
|
-
var l, r, h, d, m, c, g, v, D, H, A, C,
|
|
561
|
+
var l, r, h, d, m, c, g, v, D, H, A, C, B, k, R, N, z;
|
|
555
562
|
if (this.drawLoopArrowStartPosIdx = e, !this.heartFight.isShow)
|
|
556
563
|
return;
|
|
557
564
|
this.heartFight.mode && this.currentHeardBeat.heardBeat === null && (this.currentHeardBeat.heardBeat = ((l = this.formatEcgData) == null ? void 0 : l.heartBeatPosition[this.heartFight.defaultSelect]) || null, this.drawHeardBeatLine());
|
|
@@ -590,34 +597,34 @@ let p = class extends K {
|
|
|
590
597
|
var j;
|
|
591
598
|
!this.heartFight.mode || (b.target.attr({
|
|
592
599
|
style: { fill: "blue" }
|
|
593
|
-
}), (j = this.arrowGroup) == null || j.children().filter((
|
|
594
|
-
|
|
600
|
+
}), (j = this.arrowGroup) == null || j.children().filter((S) => S.name === "arrow_box").forEach((S) => {
|
|
601
|
+
S.id !== b.target.id && S.attr({
|
|
595
602
|
style: { fill: "#ccc" }
|
|
596
603
|
});
|
|
597
604
|
}), this.arrowLoopClick(f, b.target));
|
|
598
605
|
}
|
|
599
|
-
})), 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
|
|
606
|
+
})), 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({
|
|
600
607
|
cursor: "",
|
|
601
608
|
style: W({
|
|
602
609
|
x: 4 + t - a * 1.5,
|
|
603
610
|
y: s + i,
|
|
604
611
|
text: `${(f == null ? void 0 : f.heartrate) || ""}`
|
|
605
612
|
}, o)
|
|
606
|
-
})), 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
|
|
613
|
+
})), 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({
|
|
607
614
|
cursor: "",
|
|
608
615
|
style: W({
|
|
609
616
|
x: 4 + t - a * 1.5,
|
|
610
617
|
y: s + i,
|
|
611
618
|
text: `${(f == null ? void 0 : f.interval) || ""}`
|
|
612
619
|
}, o)
|
|
613
|
-
})), s += 12), this.heartFight.qrstCompany && (a = ((
|
|
620
|
+
})), 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({
|
|
614
621
|
cursor: "",
|
|
615
622
|
style: W({
|
|
616
623
|
x: 4 + t - a * 1.5,
|
|
617
624
|
y: s + i,
|
|
618
625
|
text: `${(f == null ? void 0 : f.qrstCompany) || ""}`
|
|
619
626
|
}, o)
|
|
620
|
-
})), 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
|
|
627
|
+
})), 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({
|
|
621
628
|
cursor: "",
|
|
622
629
|
style: W({
|
|
623
630
|
x: 4 + t - a * 1.5,
|
|
@@ -673,13 +680,16 @@ let p = class extends K {
|
|
|
673
680
|
}
|
|
674
681
|
});
|
|
675
682
|
}
|
|
683
|
+
nativeScrollFunc(e) {
|
|
684
|
+
console.log("event", e, e.target.scrollLeft), this.scrollCommon(e.target.scrollLeft || 0);
|
|
685
|
+
}
|
|
676
686
|
handleScroll(e, t, i) {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
687
|
+
t.type === "horizontal" && (t.scrollLeft = t.scrollLeft || 0, this.scrollCommon(t.scrollLeft));
|
|
688
|
+
}
|
|
689
|
+
scrollCommon(e) {
|
|
690
|
+
var i;
|
|
691
|
+
const t = x(e, ((i = this.formatEcgData) == null ? void 0 : i.step) || 1);
|
|
692
|
+
this.scrollWaveFrom(t), this.scrollRuler(t), this.scrollArrow(t), this.$emit("notifyScrollPointIdx", t);
|
|
683
693
|
}
|
|
684
694
|
scrollWaveFrom(e) {
|
|
685
695
|
var a, s;
|
|
@@ -813,6 +823,7 @@ u([
|
|
|
813
823
|
w({
|
|
814
824
|
default: () => ({
|
|
815
825
|
isShow: !0,
|
|
826
|
+
isNativeScroll: !1,
|
|
816
827
|
scrollPanel: {
|
|
817
828
|
scrollingY: !1
|
|
818
829
|
},
|
|
@@ -822,7 +833,7 @@ u([
|
|
|
822
833
|
}
|
|
823
834
|
})
|
|
824
835
|
})
|
|
825
|
-
], p.prototype, "
|
|
836
|
+
], p.prototype, "scrollConfig", 2);
|
|
826
837
|
u([
|
|
827
838
|
w({
|
|
828
839
|
default: () => ({
|
|
@@ -884,10 +895,13 @@ u([
|
|
|
884
895
|
})
|
|
885
896
|
], p.prototype, "isSyncAnalyseValueCheck", 2);
|
|
886
897
|
u([
|
|
887
|
-
|
|
898
|
+
T(200)
|
|
899
|
+
], p.prototype, "nativeScrollFunc", 1);
|
|
900
|
+
u([
|
|
901
|
+
T(200)
|
|
888
902
|
], p.prototype, "handleScroll", 1);
|
|
889
903
|
p = u([
|
|
890
|
-
|
|
904
|
+
Q({
|
|
891
905
|
name: "Methods"
|
|
892
906
|
})
|
|
893
907
|
], p);
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
#ecg-wave-form-main .scroll-box {
|
|
21
21
|
z-index: 0;
|
|
22
22
|
}
|
|
23
|
+
#ecg-wave-form-main .scroll-box .native-scroll {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
overflow-y: hidden;
|
|
27
|
+
overflow-x: auto;
|
|
28
|
+
}
|
|
23
29
|
#ecg-wave-form-main .measuring-ruler {
|
|
24
30
|
position: absolute;
|
|
25
31
|
left: 0;
|
|
@@ -3,7 +3,7 @@ import x from "../../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/
|
|
|
3
3
|
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";
|
|
4
4
|
import { Prop as d } 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";
|
|
5
5
|
import { Watch as m } 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/Watch.js";
|
|
6
|
-
import P from "../../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.
|
|
6
|
+
import P from "../../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.6.14/node_modules/vuescroll/dist/vuescroll-native.js";
|
|
7
7
|
import { LeadNameTexts as G, getPointIdxForPx as B } from "@costy-plus/utils";
|
|
8
8
|
import { Group as D, init as H, Text as S, Polyline as z, util as F, Polygon as A } from "zrender";
|
|
9
9
|
import L from "../../BackgroundGrid/index2.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./style/index.css");require("vue");const l=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=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/Watch.js"),c=require("../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./style/index.css");require("vue");const l=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=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/Watch.js"),c=require("../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.6.14/node_modules/vuescroll/dist/vuescroll-native.js"),u=require("../BackgroundGrid/index2.js"),h=require("../MeasuringRuler/index2.js"),p=require("../ParallelRuler/index2.js"),v=require("../MagnifierWave/index.js"),f=require("../EnlargeWave/index2.js"),g=require("./method.js");var m=Object.defineProperty,w=Object.getOwnPropertyDescriptor,a=(e,t,s,n)=>{for(var r=n>1?void 0:n?w(t,s):t,i=e.length-1,d;i>=0;i--)(d=e[i])&&(r=(n?d(t,s,r):d(r))||r);return n&&r&&m(t,s,r),r};exports.default=class extends l.mixins(g.default){watchFormatEcgData(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}watchVuescrollConfig(){this.repaint()}watchLeadHeadConfig(){var e,t;(e=this.leadHeadGroup)==null||e.removeAll(),(t=this.sceneIns)==null||t.remove(this.leadHeadGroup),this.drawLeadHead()}watchLeadModel(){this.repaint()}watchWidth(){this.repaint()}watchHeight(){this.repaint()}watchHeartFight(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}watchLongLeadConfig(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}mounted(){this.init()}repaint(){var e,t;(e=this.sceneIns)==null||e.clear(),(t=this.sceneIns)==null||t.resize({width:this.canvasContainer.width,height:this.canvasContainer.height}),this.combinationDrawing()}};a([o.Watch("formatEcgData",{deep:!0})],exports.default.prototype,"watchFormatEcgData",1);a([o.Watch("vuescrollConfig",{deep:!0})],exports.default.prototype,"watchVuescrollConfig",1);a([o.Watch("leadHeadConfig",{deep:!0})],exports.default.prototype,"watchLeadHeadConfig",1);a([o.Watch("leadModel",{deep:!0})],exports.default.prototype,"watchLeadModel",1);a([o.Watch("width")],exports.default.prototype,"watchWidth",1);a([o.Watch("height")],exports.default.prototype,"watchHeight",1);a([o.Watch("singleModeInfo",{deep:!0})],exports.default.prototype,"watchHeartFight",1);a([o.Watch("longLeadConfig",{deep:!0})],exports.default.prototype,"watchLongLeadConfig",1);exports.default=a([l.default({name:"ECGWaveForm",components:{vueScroll:c.default,MXBackgroundGrid:u.default,MXMeasuringRuler:h.default,MXParallelRuler:p.default,MXMagnifierWave:v.default,MXEnlargeWave:f.default}})],exports.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var u=function(){var t,i,l,r,o,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var u=function(){var t,i,l,r,s,o,n,d,g,c,v,h,a=this,f=a.$createElement,e=a._self._c||f;return e("div",{style:{width:`${a.width}px`,height:`${a.height}px`},attrs:{id:"ecg-wave-form-main"}},[e("MXBackgroundGrid",{attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"grid-config":a.gridConfig,"layer-id":"MXGrid"}}),a.measurRulerConfig.isShow?e("MXMeasuringRuler",a._g({staticClass:"measuring-ruler",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"cell-mg":a.gridConfig.cellMg,"speed-value":((t=a.formatEcgData)===null||t===void 0?void 0:t.speed)||0,sens:a.formatEcgData.sens}},a.$listeners)):a._e(),a.paralleRulerConfig.isShow?e("MXParallelRuler",a._g({staticClass:"parallel-ruler",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"cell-mg":a.gridConfig.cellMg,"speed-value":((i=a.formatEcgData)===null||i===void 0?void 0:i.speed)||0,sens:a.formatEcgData.sens,"heart-rate":a.ventricularRate}},a.$listeners)):a._e(),a.magnifierRulerConfig.isShow?e("MXMagnifierWave",{staticClass:"magnifier-wave",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"grid-config":a.gridConfig,"speed-value":((l=a.formatEcgData)===null||l===void 0?void 0:l.speed)||0,sens:a.formatEcgData.sens,step:((r=a.formatEcgData)===null||r===void 0?void 0:r.step)||0,"lead-head-config":a.leadHeadConfig,"wave-data":a.waveDataCopy,"add-wave-data":a.addWaveDataCopy,"single-wave-data":a.singleWaveDataCopy,"long-lead-config":a.longLeadConfig,"split-block-height":a.splitBlockHeight,"split-point":a.splitPoint,"lead-config":a.leadConfig,"heart-fight":a.heartFight,"normal-lead-names":((s=a.formatEcgData)===null||s===void 0?void 0:s.processedData.otherParams.LeadName)||[]}}):a._e(),a.isShowEnlargeWave?e("MXEnlargeWave",a._g({staticClass:"enlarge-wave",attrs:{"is-show-enlarge-wave":a.isShowEnlargeWave,width:a.MXEnlargeWaveWH.width,height:a.MXEnlargeWaveWH.height,"grid-config":a.gridConfig,"speed-value":((o=a.formatEcgData)===null||o===void 0?void 0:o.speed)||0,sens:a.formatEcgData.sens,step:((n=a.formatEcgData)===null||n===void 0?void 0:n.step)||0,"sample-rate":((d=a.formatEcgData)===null||d===void 0?void 0:d.processedData.otherParams.SampleRate)||0,sensitivity:((g=a.formatEcgData)===null||g===void 0?void 0:g.processedData.otherParams.Sensitivity)||0,"normal-data":((c=a.formatEcgData)===null||c===void 0?void 0:c.processedData.originData.Data)||[],"complex-data":((v=a.formatEcgData)===null||v===void 0?void 0:v.processedData.originData.ComplexData)||[],"lead-name-list":a.leadNameList,"lead-head-config":a.leadHeadConfig,"active-lead-idx":a.activeLeadIdx,"active-lead-analyse-value":a.activeLeadAnalyseValue,"analyse-value":((h=a.formatEcgData)===null||h===void 0?void 0:h.processedData.otherParams.AnalyseValue)||[],"enlarge-wave-mode":a.enlargeWaveMode,"conventional-e-c-g-config":a.conventionalECGConfig,"is-sync-analyse-value-check":a.isSyncAnalyseValueCheck,"enlarge-gains":a.enlargeGains,"enlarge-speeds":a.enlargeSpeeds},on:{"update:isShowEnlargeWave":function(m){a.isShowEnlargeWave=m},"update:is-show-enlarge-wave":function(m){a.isShowEnlargeWave=m}}},a.$listeners)):a._e(),e("div",{attrs:{id:"wave-from-box"}}),e("div",{staticClass:"scroll-box",style:{width:`${a.width}px`,height:`${a.height}px`}},[a.scrollConfig.isNativeScroll?e("div",{ref:"nativeScroll",staticClass:"native-scroll",on:{scroll:a.nativeScrollFunc}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})]):e("vueScroll",{ref:"vueScroll",attrs:{ops:a.scrollConfig},on:{"handle-scroll":a.handleScroll}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})])],1)],1)},p=[];exports.render=u;exports.staticRenderFns=p;
|
|
@@ -23,8 +23,9 @@ export default class Methods extends Vue {
|
|
|
23
23
|
};
|
|
24
24
|
protected heartFight: HeartFight;
|
|
25
25
|
/** 滚动条配置 */
|
|
26
|
-
protected
|
|
26
|
+
protected scrollConfig: vueScrollConfig & {
|
|
27
27
|
isShow: boolean;
|
|
28
|
+
isNativeScroll: boolean;
|
|
28
29
|
};
|
|
29
30
|
protected rulerConfig: RulerConfig;
|
|
30
31
|
/** 测量尺 */
|
|
@@ -238,8 +239,11 @@ export default class Methods extends Vue {
|
|
|
238
239
|
protected drawHeardBeatLine(startPosIdx?: number): void;
|
|
239
240
|
/** 创建 心搏 短线 */
|
|
240
241
|
protected createHeardBeatLine(X: number, Y: number): Line;
|
|
241
|
-
/**
|
|
242
|
+
/** 原生滚动条事件 */
|
|
243
|
+
protected nativeScrollFunc(event: WheelEvent): void;
|
|
244
|
+
/** 自定义滚动事件监听 */
|
|
242
245
|
protected handleScroll(vertical: HandleScrollParams, horizontal: HandleScrollParams, nativeEvent: Event): void;
|
|
246
|
+
protected scrollCommon(scrollLeft: number): void;
|
|
243
247
|
protected scrollWaveFrom(slidIdxs: number): void;
|
|
244
248
|
protected scrollRuler(slidIdxs: number): void;
|
|
245
249
|
protected scrollArrow(slidIdxs: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var B=Object.defineProperty,R=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,z=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={}))N.call(t,a)&&k(e,a,t[a]);if(O)for(var a of O(t))z.call(t,a)&&k(e,a,t[a]);return e},A=(e,t)=>R(e,T(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=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"),u=require("zrender"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},X=$(j);var q=Object.defineProperty,V=Object.getOwnPropertyDescriptor,c=(e,t,a,i)=>{for(var s=i>1?void 0:i?V(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&&q(t,a,s),s};exports.default=class extends X.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.vuescrollConfig.isShow&&parseInt(`${(e=this.vuescrollConfig.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.vuescrollConfig.isShow?this.$nextTick(()=>{var t,a;this.$refs.vueScroll.scrollBy({dx:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((a=this.formatEcgData)==null?void 0:a.step)||0)})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){var a;(a=this.sceneIns)==null||a.dispose(),this.AssistCtx=null;const e=document.getElementById("wave-from-box");this.sceneIns=u.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 u.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new u.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new u.Group({name:"addwaveFrom"}),this.leadHeadGroup=new u.Group({name:"leadHead"}),this.splitLineGroup=new u.Group({name:"splitLine"}),this.leadHeadNameGroup=new u.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new u.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new u.Group({name:"ruler"}),this.arrowGroup=new u.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new u.Group({name:"heardBeatLine"}),this.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 p=v.getPrintLengthToPx(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;p<=e&&(e=p)}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,p,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=((p=this.formatEcgData)==null?void 0:p.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){this.sceneIsMouseDown&&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 u.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 u.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,p,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-(((p=this.formatEcgData)==null?void 0:p.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.vuescrollConfig.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 p=0;p<t.length&&!(t[p].pos[1]>this.drawArea.height+this.bottomAreaHeight);p++)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 u.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+p,shape:{points:t[p].data.map(([g,C])=>[g+t[p].pos[0],C+t[p].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:g=>{this.onDbClickWaveFrom(g,"single")}})),(d=this.singleWaveFromGroup)==null||d.add(new u.Text({cursor:"",style:{x:t[p].pos[0],y:t[p].pos[1]-(((h=this.formatEcgData)==null?void 0:h.sens)||0)/2,text:p===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),p>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 u.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 u.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 u.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 u.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 u.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.drawArea.height+this.bottomAreaHeight-25},e)}),a=new u.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 u.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 u.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,p,g,C,D,P,I,y,S,E,x,G,M;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 u.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=(p=this.currentHeardBeat)==null?void 0:p.heardBeat)==null?void 0:g.index)===(f==null?void 0:f.index)?"blue":"#ccc"},onclick:F=>{var b;!this.heartFight.mode||(F.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.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 u.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 u.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 u.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,(G=this.arrowGroup)==null||G.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.telectricalaxis)||""}`},o)})))}}(M=this.sceneIns)==null||M.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",u.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var 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 p in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(p)&&Object.prototype.hasOwnProperty.call(t,p)){a=(t[p]-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[p]||!this.leadModel.isContinuous&&t[p]-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[p])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 u.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}handleScroll(e,t,a){var i;if(t.type==="horizontal"){t.scrollLeft=t.scrollLeft||0;const s=v.getPointIdxForPx(t.scrollLeft,((i=this.formatEcgData)==null?void 0:i.step)||1);this.scrollWaveFrom(s),this.scrollRuler(s),this.scrollArrow(s),this.$emit("notifyScrollPointIdx",s)}}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)}};c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);c([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);c([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);c([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);c([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);c([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);c([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);c([w.Prop({default:()=>({isShow:!0,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"vuescrollConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);c([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);c([w.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);c([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);c([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);c([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([_.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";var k=Object.defineProperty,N=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var B=(e,t,a)=>t in e?k(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)&&B(e,a,t[a]);if(O)for(var a of O(t))z.call(t,a)&&B(e,a,t[a]);return e},A=(e,t)=>N(e,R(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=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},X=$(j);var q=Object.defineProperty,V=Object.getOwnPropertyDescriptor,u=(e,t,a,i)=>{for(var s=i>1?void 0:i?V(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&&q(t,a,s),s};exports.default=class extends X.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=p.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,G,M;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 b;!this.heartFight.mode||(F.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.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,(G=this.arrowGroup)==null||G.add(new p.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.telectricalaxis)||""}`},o)})))}}(M=this.sceneIns)==null||M.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);
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
#ecg-wave-form-main .scroll-box {
|
|
21
21
|
z-index: 0;
|
|
22
22
|
}
|
|
23
|
+
#ecg-wave-form-main .scroll-box .native-scroll {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
overflow-y: hidden;
|
|
27
|
+
overflow-x: auto;
|
|
28
|
+
}
|
|
23
29
|
#ecg-wave-form-main .measuring-ruler {
|
|
24
30
|
position: absolute;
|
|
25
31
|
left: 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("vue"),P=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 h=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"),m=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/Watch.js"),D=require("../../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("vue"),P=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 h=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"),m=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/Watch.js"),D=require("../../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.6.14/node_modules/vuescroll/dist/vuescroll-native.js"),_=require("@costy-plus/utils"),d=require("zrender"),F=require("../../BackgroundGrid/index2.js"),x=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},G=x(b);var j=Object.defineProperty,B=Object.getOwnPropertyDescriptor,l=(t,e,o,r)=>{for(var i=r>1?void 0:r?B(e,o):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(i=(r?a(e,o,i):a(i))||i);return r&&i&&j(e,o,i),i};exports.default=class extends G.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.waveFormGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.scrollIdx=Object.freeze(0),this.currentHeardBeat=Object.freeze({heardBeat:null,ele:null}),this.slidingWindowInfo=Object.freeze({}),this.vuescrollWH={width:0,height:0}}get canvasContainer(){var t;return{width:this.width,height:this.height-(this.vuescrollConfig.isShow&&parseInt(`${(t=this.vuescrollConfig.bar)==null?void 0:t.size}`)||0)||0}}watchWidth(){this.repaint()}watchHeight(){this.repaint()}watchFormatData(){this.repaint()}repaint(){var t,e;(t=this.sceneIns)==null||t.clear(),(e=this.sceneIns)==null||e.resize({width:this.canvasContainer.width,height:this.canvasContainer.height}),this.combinationDrawing()}destroyed(){var t,e,o;(t=this.waveFormGroup)==null||t.removeAll(),(e=this.arrowGroup)==null||e.removeAll(),(o=this.sceneIns)==null||o.dispose()}created(){this.initConfig()}initConfig(){this.slidingWindowInfo={points:0,startInd:0,endInd:0},this.currentHeardBeat={heardBeat:null,ele:null},this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height,this.waveFormGroup=new d.Group({name:"waveForm"}),this.arrowGroup=new d.Group({name:"arrowGroup"}),this.initSlidingWindowInfo()}mounted(){this.initWaveFormPeer(),this.combinationDrawing()}combinationDrawing(){this.drawWaveFrom(),this.drawLoopArrow(this.scrollIdx)}initWaveFormPeer(){const t=document.getElementById("wave-from-box");this.sceneIns=d.init(t,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const e=document.getElementById("MXRoutine_Grid");this.AssistCtx=e.getContext("2d")}initSlidingWindowInfo(){var o,r;const t=((o=this.formatData)==null?void 0:o.step)||0;this.vuescrollConfig.isShow&&(this.vuescrollWH.width=this.canvasContainer.width+(((r=this.formatData)==null?void 0:r.dataPxLen)||0)-this.width);const e=Math.ceil(this.width/t);this.slidingWindowInfo={points:e,startInd:0,endInd:e}}drawWaveFrom(){var t;this.createLeadName(),this.createWaveFrom(),(t=this.sceneIns)==null||t.add(this.waveFormGroup)}createLeadName(){var t;(t=this.sceneIns)==null||t.add(new d.Text({style:{x:this.leadConfig.fontSize*.5,y:this.canvasContainer.height/2+this.leadConfig.fontSize*2,text:_.LeadNameTexts[1],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}))}getRednerPoints(){var r;const t=[],e=this.canvasContainer.height/2;let o=[];for(let i=1;i<=1;i++)o=((r=this.formatData)==null?void 0:r.processedData.handleData.Data[i])||[],t.push({pos:[0,e],startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd||0,data:o.slice(this.slidingWindowInfo.startInd,this.slidingWindowInfo.endInd).map((n,a)=>{var u;return[a*(((u=this.formatData)==null?void 0:u.step)||0),-n]})});return t}createWaveFrom(){var e,o;(e=this.waveFormGroup)==null||e.removeAll();let t=this.getRednerPoints();for(let r=0;r<t.length;r++)(o=this.waveFormGroup)==null||o.add(new d.Polyline({cursor:"",shape:{points:t[r].data.map(([i,n])=>[i+t[r].pos[0],n+t[r].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}));t=null}drawLoopArrow(t=0){var i,n,a,u,w,v,g,I,y,W;(i=this.arrowGroup)==null||i.removeAll(),this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=((n=this.formatData)==null?void 0:n.heartBeatPosition[0])||null,this.$emit("notifyHeardBeat",d.util.clone(((a=this.formatData)==null?void 0:a.heartBeatPosition[0])||null)));let e=0;const o=20;let r=0;for(let p=0;p<(((u=this.formatData)==null?void 0:u.heartBeatPosition)||[]).length;p++){const s=(w=this.formatData)==null?void 0:w.heartBeatPosition[p];if(r=((s==null?void 0:s.position)||0)-t,!(t>((s==null?void 0:s.position)||0))){if(((s==null?void 0:s.position)||0)-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0))break;e=r*(((v=this.formatData)==null?void 0:v.step)||0)-9.5,(y=this.arrowGroup)==null||y.add(new d.Polygon({name:"arrow_box",shape:{points:[[4+e,0+o],[15+e,0+o],[15+e,10+o],[19+e,10+o],[9.5+e,22+o],[0+e,10+o],[4+e,10+o],[4+e,0+o]]},style:{fill:((I=(g=this.currentHeardBeat)==null?void 0:g.heardBeat)==null?void 0:I.index)===(s==null?void 0:s.index)?"blue":"#ccc"},onclick:f=>{var C;f.target.attr({style:{fill:"blue"}}),(C=this.arrowGroup)==null||C.children().filter(c=>c.name==="arrow_box").forEach(c=>{c.id!==f.target.id&&c.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(s,f.target)}}))}}(W=this.sceneIns)==null||W.add(this.arrowGroup)}arrowLoopClick(t,e){this.$emit("notifyHeardBeat",d.util.clone(t)),this.currentHeardBeat.heardBeat=t,this.currentHeardBeat.ele=e}handleScroll(t,e,o){var r;if(e.type==="horizontal"){e.scrollLeft=e.scrollLeft||0;const i=_.getPointIdxForPx(e.scrollLeft,((r=this.formatData)==null?void 0:r.step)||1);this.scrollIdx=i,this.scrollWaveFrom(i),this.scrollArrow(i),this.$emit("notifyScrollPointIdx",i)}}scrollWaveFrom(t){var o;this.slidingWindowInfo.startInd=t,this.slidingWindowInfo.endInd=t+(this.slidingWindowInfo.points||0);let e=this.getRednerPoints();(o=this.waveFormGroup)==null||o.eachChild((r,i)=>{i=i||0,r.attr({shape:{points:e[i].data.map(([n,a])=>[n+e[i].pos[0],a+e[i].pos[1]])}})}),e=null}scrollArrow(t){var e,o;(e=this.arrowGroup)==null||e.removeAll(),(o=this.sceneIns)==null||o.remove(this.arrowGroup),this.drawLoopArrow(t)}};l([h.Prop({required:!0,type:Number,validator:t=>typeof t=="number"})],exports.default.prototype,"width",2);l([h.Prop({required:!0,type:Number,validator:t=>typeof t=="number"})],exports.default.prototype,"height",2);l([h.Prop({required:!0})],exports.default.prototype,"gridConfig",2);l([h.Prop({default:()=>({isShow:!0,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"vuescrollConfig",2);l([h.Prop({required:!0})],exports.default.prototype,"formatData",2);l([h.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);l([m.Watch("width")],exports.default.prototype,"watchWidth",1);l([m.Watch("height")],exports.default.prototype,"watchHeight",1);l([m.Watch("formatData",{deep:!0})],exports.default.prototype,"watchFormatData",1);exports.default=l([P.default({name:"Routine",components:{vueScroll:D.default,MXBackgroundGrid:F.default}})],exports.default);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "costy-plus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36-0",
|
|
4
4
|
"main": "dist/lib/index.js",
|
|
5
5
|
"module": "dist/es/index.js",
|
|
6
6
|
"types": "dist/es/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@costy-plus/utils": "0.0.9-0",
|
|
24
24
|
"element-ui": "~2.15.11",
|
|
25
|
-
"vuescroll": "
|
|
25
|
+
"vuescroll": "4.17.5",
|
|
26
26
|
"zrender": "5.4.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
File without changes
|