costy-plus 1.0.66-0 → 1.0.67-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/monitorWave/interface.d.ts +17 -0
- package/dist/es/src/monitorWave/method.d.ts +4 -1
- package/dist/es/src/monitorWave/method.js +153 -109
- package/dist/lib/src/monitorWave/interface.d.ts +17 -0
- package/dist/lib/src/monitorWave/method.d.ts +4 -1
- package/dist/lib/src/monitorWave/method.js +1 -1
- package/package.json +1 -1
|
@@ -92,3 +92,20 @@ export interface BottomTimeConfig {
|
|
|
92
92
|
speed: number;
|
|
93
93
|
startTime: string;
|
|
94
94
|
}
|
|
95
|
+
/** 顶部时间线设置*/
|
|
96
|
+
export interface TopTimeLineConfig {
|
|
97
|
+
isShow: boolean;
|
|
98
|
+
/** 采样率 */
|
|
99
|
+
sampleRate: number;
|
|
100
|
+
/** 增益 */
|
|
101
|
+
gain: number;
|
|
102
|
+
/** 走纸 */
|
|
103
|
+
speed: number;
|
|
104
|
+
/** 颜色 */
|
|
105
|
+
color: string;
|
|
106
|
+
startTime: string;
|
|
107
|
+
/** 开始画线时间*/
|
|
108
|
+
startLineTime: string;
|
|
109
|
+
/** 结束画线时间*/
|
|
110
|
+
endLineTime: string;
|
|
111
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vue } from 'vue-property-decorator';
|
|
2
2
|
import type { Config as vueScrollConfig } from 'vuescroll';
|
|
3
3
|
import { ZRenderType, Group, Polyline, Line, ElementEvent } from 'zrender';
|
|
4
|
-
import { LeadModle, LongLeadConfig, SingleModeConfig, WaveConfig, BottomRulerConfig, BottomTimeConfig } from './interface';
|
|
4
|
+
import { LeadModle, LongLeadConfig, SingleModeConfig, WaveConfig, BottomRulerConfig, BottomTimeConfig, TopTimeLineConfig } from './interface';
|
|
5
5
|
import { LeadHeadConfig, MXLeadConfig } from '../../types/EcgWave';
|
|
6
6
|
import { MXGridConfig } from '../../types/BackgroundGrid';
|
|
7
7
|
import { HandleScrollParams } from '../../types/Common';
|
|
@@ -21,6 +21,7 @@ export default class Methods extends Vue {
|
|
|
21
21
|
/** 底部导联尺子配置 */
|
|
22
22
|
protected rulerConfig: BottomRulerConfig;
|
|
23
23
|
protected timeConfig: BottomTimeConfig;
|
|
24
|
+
protected timeLineConfig: TopTimeLineConfig;
|
|
24
25
|
/** 导联配置 */
|
|
25
26
|
protected leadConfig: MXLeadConfig;
|
|
26
27
|
/** 网格配置 */
|
|
@@ -180,6 +181,8 @@ export default class Methods extends Vue {
|
|
|
180
181
|
protected drawRulerNotes(): void;
|
|
181
182
|
/** 绘制标尺 */
|
|
182
183
|
protected drawRuler(startTimes?: number): void;
|
|
184
|
+
/** 绘制标尺 */
|
|
185
|
+
protected drawTopTimeLine(startTimes?: number): void;
|
|
183
186
|
timestampToTime(timestamp?: number): string;
|
|
184
187
|
/** 绘制标尺 */
|
|
185
188
|
protected drawTimeLine(startTimes?: number): void;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
1
|
+
var b = Object.defineProperty, x = Object.defineProperties;
|
|
2
2
|
var D = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var A = (e, t, i) => t in e ?
|
|
3
|
+
var F = Object.getOwnPropertySymbols;
|
|
4
|
+
var P = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var A = (e, t, i) => t in e ? b(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, W = (e, t) => {
|
|
6
6
|
for (var i in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
10
|
-
|
|
7
|
+
P.call(t, i) && A(e, i, t[i]);
|
|
8
|
+
if (F)
|
|
9
|
+
for (var i of F(t))
|
|
10
|
+
O.call(t, i) && A(e, i, t[i]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
12
|
+
}, y = (e, t) => x(e, D(t));
|
|
13
13
|
import N from "vue";
|
|
14
|
-
import
|
|
14
|
+
import T 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 c } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js";
|
|
17
|
-
import { flattenDeep as
|
|
18
|
-
import { throttling as
|
|
19
|
-
import * as
|
|
20
|
-
import { Group as
|
|
21
|
-
var
|
|
17
|
+
import { flattenDeep as R, max as z, min as j } from "lodash";
|
|
18
|
+
import { throttling as G, getStepForSpeed as u, getPrintLengthToPx as $, getSens as v, getDataLenTimes as I, getPointIdxForPx as M, getActualY as S } from "@costy-plus/utils";
|
|
19
|
+
import * as B from "zrender";
|
|
20
|
+
import { Group as w, Polyline as L, Line as H, Text as C } from "zrender";
|
|
21
|
+
var k = Object.defineProperty, X = Object.getOwnPropertyDescriptor, g = (e, t, i, s) => {
|
|
22
22
|
for (var o = s > 1 ? void 0 : s ? X(t, i) : t, n = e.length - 1, a; n >= 0; n--)
|
|
23
23
|
(a = e[n]) && (o = (s ? a(t, i, o) : a(o)) || o);
|
|
24
|
-
return s && o &&
|
|
24
|
+
return s && o && k(t, i, o), o;
|
|
25
25
|
};
|
|
26
26
|
let p = class extends N {
|
|
27
27
|
constructor() {
|
|
@@ -47,8 +47,8 @@ let p = class extends N {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
destroyed() {
|
|
50
|
-
var e, t, i, s, o, n, a, h,
|
|
51
|
-
this.sceneInsEventOff(), (e = this.rowAndColwaveFromGroup) == null || e.removeAll(), (t = this.singleWaveFromGroup) == null || t.removeAll(), (i = this.addwaveFromGroup) == null || i.removeAll(), (s = this.leadHeadGroup) == null || s.removeAll(), (o = this.splitLineGroup) == null || o.removeAll(), (n = this.leadHeadNameGroup) == null || n.removeAll(), (a = this.leadHeadOffAndDelGroup) == null || a.removeAll(), (h = this.rulerGroup) == null || h.removeAll(), (
|
|
50
|
+
var e, t, i, s, o, n, a, h, d, f, l;
|
|
51
|
+
this.sceneInsEventOff(), (e = this.rowAndColwaveFromGroup) == null || e.removeAll(), (t = this.singleWaveFromGroup) == null || t.removeAll(), (i = this.addwaveFromGroup) == null || i.removeAll(), (s = this.leadHeadGroup) == null || s.removeAll(), (o = this.splitLineGroup) == null || o.removeAll(), (n = this.leadHeadNameGroup) == null || n.removeAll(), (a = this.leadHeadOffAndDelGroup) == null || a.removeAll(), (h = this.rulerGroup) == null || h.removeAll(), (d = this.arrowGroup) == null || d.removeAll(), (f = this.heardBeatLineGroup) == null || f.removeAll(), (l = this.sceneIns) == null || l.dispose();
|
|
52
52
|
}
|
|
53
53
|
initCreatedConfig() {
|
|
54
54
|
this.vuescrollWH.width = this.width, this.vuescrollWH.height = this.height, this.initConfig();
|
|
@@ -88,7 +88,7 @@ let p = class extends N {
|
|
|
88
88
|
startInd: this.slidingWindowInfo.startInd || 0,
|
|
89
89
|
endInd: this.slidingWindowInfo.endInd !== t ? t : this.slidingWindowInfo.endInd
|
|
90
90
|
}, this.scrollConfig.isShow && !this.leadModel.isSingleMode) {
|
|
91
|
-
const s =
|
|
91
|
+
const s = u(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), o = this.dataTotalLength * s;
|
|
92
92
|
this.vuescrollWH.width = this.canvasContainer.width + (o || 0) - this.splitPoint;
|
|
93
93
|
}
|
|
94
94
|
const i = Math.ceil((this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / e);
|
|
@@ -99,10 +99,10 @@ let p = class extends N {
|
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
calcHighestAndLowestPoint() {
|
|
102
|
-
const e =
|
|
102
|
+
const e = R(this.waveLists);
|
|
103
103
|
return {
|
|
104
|
-
maxPoints:
|
|
105
|
-
minPoints:
|
|
104
|
+
maxPoints: z(e) || 0,
|
|
105
|
+
minPoints: j(e) || 0
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
isLeadOff(e) {
|
|
@@ -113,33 +113,33 @@ let p = class extends N {
|
|
|
113
113
|
}
|
|
114
114
|
initConfig() {
|
|
115
115
|
var t;
|
|
116
|
-
this.rowAndColwaveFromGroup = new
|
|
116
|
+
this.rowAndColwaveFromGroup = new w({
|
|
117
117
|
name: "rowAndColwaveFrom"
|
|
118
|
-
}), this.singleWaveFromGroup = new
|
|
118
|
+
}), this.singleWaveFromGroup = new w({
|
|
119
119
|
name: "singleWaveFrom"
|
|
120
|
-
}), this.addwaveFromGroup = new
|
|
120
|
+
}), this.addwaveFromGroup = new w({
|
|
121
121
|
name: "addwaveFrom"
|
|
122
|
-
}), this.leadHeadGroup = new
|
|
122
|
+
}), this.leadHeadGroup = new w({
|
|
123
123
|
name: "leadHead"
|
|
124
|
-
}), this.splitLineGroup = new
|
|
124
|
+
}), this.splitLineGroup = new w({
|
|
125
125
|
name: "splitLine"
|
|
126
|
-
}), this.leadHeadNameGroup = new
|
|
126
|
+
}), this.leadHeadNameGroup = new w({
|
|
127
127
|
name: "leadHeadName"
|
|
128
|
-
}), this.leadHeadOffAndDelGroup = new
|
|
128
|
+
}), this.leadHeadOffAndDelGroup = new w({
|
|
129
129
|
name: "leadHeadOffAndDel"
|
|
130
|
-
}), this.rulerGroup = new
|
|
130
|
+
}), this.rulerGroup = new w({
|
|
131
131
|
name: "ruler"
|
|
132
|
-
}), this.arrowGroup = new
|
|
132
|
+
}), this.arrowGroup = new w({
|
|
133
133
|
name: "arrowLoop"
|
|
134
|
-
}), this.heardBeatLineGroup = new
|
|
134
|
+
}), this.heardBeatLineGroup = new w({
|
|
135
135
|
name: "heardBeatLine"
|
|
136
136
|
});
|
|
137
137
|
let e = this.canvasContainer.width;
|
|
138
138
|
if (this.leadModel.ecgareawidth === 1) {
|
|
139
|
-
const i =
|
|
139
|
+
const i = $(((t = this.waveConfigs[0]) == null ? void 0 : t.sampleRate) || 0) + this.leadHeadConfig.leadHedeWidth;
|
|
140
140
|
i <= e && (e = i);
|
|
141
141
|
} else if (this.leadModel.isContinuous) {
|
|
142
|
-
const i =
|
|
142
|
+
const i = u(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), s = this.dataTotalLength * i;
|
|
143
143
|
!this.leadModel.isSingleMode && (s || 0) < e - this.leadHeadConfig.leadHedeWidth && (e = (s || 0) + this.leadHeadConfig.leadHedeWidth);
|
|
144
144
|
}
|
|
145
145
|
this.drawArea = {
|
|
@@ -156,13 +156,13 @@ let p = class extends N {
|
|
|
156
156
|
}, this.loopArrowY = {
|
|
157
157
|
add: 0,
|
|
158
158
|
rowAndCol: 0
|
|
159
|
-
}, this.leadNameList = this.leadNames.map((i, s) => s) || [], this.totalRows = this.leadModel.line + this.leadModel.add || 1, this.highestAndLowestPoint = this.calcHighestAndLowestPoint(), this.leadModel.isSingleMode ? (this.splitBlockHeight = Math.abs(this.highestAndLowestPoint.maxPoints) + Math.abs(this.highestAndLowestPoint.minPoints) + 22, this.splitBlockHeight > this.drawArea.height && (this.splitBlockHeight = this.drawArea.height / 6)) : this.splitBlockHeight = this.drawArea.height / this.totalRows, this.publicStep =
|
|
159
|
+
}, this.leadNameList = this.leadNames.map((i, s) => s) || [], this.totalRows = this.leadModel.line + this.leadModel.add || 1, this.highestAndLowestPoint = this.calcHighestAndLowestPoint(), this.leadModel.isSingleMode ? (this.splitBlockHeight = Math.abs(this.highestAndLowestPoint.maxPoints) + Math.abs(this.highestAndLowestPoint.minPoints) + 22, this.splitBlockHeight > this.drawArea.height && (this.splitBlockHeight = this.drawArea.height / 6)) : this.splitBlockHeight = this.drawArea.height / this.totalRows, this.publicStep = u(this.leadModel.publicSpeed, this.gridConfig.cellMg, this.leadModel.publicSampleRate), this.rulerStep = (this.publicStep || 1) * (this.leadModel.publicSampleRate || 1) / (this.gridConfig.cellMg * 2 + 2);
|
|
160
160
|
}
|
|
161
161
|
initWaveFormPeer() {
|
|
162
162
|
var i;
|
|
163
163
|
(i = this.sceneIns) == null || i.dispose(), this.AssistCtx = null;
|
|
164
164
|
const e = document.getElementById(`${this.prefixId}wave-from-box`);
|
|
165
|
-
this.sceneIns =
|
|
165
|
+
this.sceneIns = B.init(e, {
|
|
166
166
|
width: this.canvasContainer.width,
|
|
167
167
|
height: this.canvasContainer.height,
|
|
168
168
|
devicePixelRatio: 2
|
|
@@ -190,11 +190,11 @@ let p = class extends N {
|
|
|
190
190
|
(e = this.sceneIns) == null || e.off("mousemove", this.sceneInsMousemove), (t = this.sceneIns) == null || t.off("mousedown", this.sceneInsMouseDown), (i = this.sceneIns) == null || i.off("mouseup", this.sceneInsMouseUp);
|
|
191
191
|
}
|
|
192
192
|
drawLeadHead() {
|
|
193
|
-
var n, a, h,
|
|
193
|
+
var n, a, h, d, f;
|
|
194
194
|
(n = this.leadHeadGroup) == null || n.removeAll(), (a = this.sceneIns) == null || a.remove(this.leadHeadGroup), console.log("this.waveConfigs", this.waveConfigs);
|
|
195
195
|
let e = "", t = !1, i = 0, s = 0;
|
|
196
|
-
for (let
|
|
197
|
-
s =
|
|
196
|
+
for (let l = 0; l <= this.leadModel.column; l++) {
|
|
197
|
+
s = l * this.leadModel.line;
|
|
198
198
|
e:
|
|
199
199
|
for (let r = 1; r <= this.leadModel.line; r++) {
|
|
200
200
|
if (!(this.waveConfigs || [])[r - 1 + s])
|
|
@@ -210,11 +210,11 @@ let p = class extends N {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
let o = null;
|
|
213
|
-
for (let
|
|
214
|
-
!this.waveConfigs[this.longLeadConfig.leadIdxs[
|
|
213
|
+
for (let l = 0; l < this.leadModel.add; l++)
|
|
214
|
+
!this.waveConfigs[this.longLeadConfig.leadIdxs[l]] || (o = this.waveConfigs[this.longLeadConfig.leadIdxs[l]], e = this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[l]]], t = !1, o.gainName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(e) && (t = !0), i = o.posX ? o.posX - this.leadHeadConfig.leadHedeWidth : 0, (d = this.leadHeadGroup) == null || d.add(
|
|
215
215
|
this.createLeadHead(
|
|
216
216
|
i,
|
|
217
|
-
o.posY || (
|
|
217
|
+
o.posY || (l + 1 + this.leadModel.line) * this.splitBlockHeight,
|
|
218
218
|
v(o.gain, this.gridConfig.cellMg),
|
|
219
219
|
t
|
|
220
220
|
)
|
|
@@ -223,7 +223,7 @@ let p = class extends N {
|
|
|
223
223
|
}
|
|
224
224
|
createLeadHead(e, t, i, s) {
|
|
225
225
|
const o = this.leadHeadConfig.leadHedeWidth / 4;
|
|
226
|
-
return i = s ? i / 2 : i, new
|
|
226
|
+
return i = s ? i / 2 : i, new L({
|
|
227
227
|
cursor: "",
|
|
228
228
|
shape: {
|
|
229
229
|
points: [
|
|
@@ -260,23 +260,23 @@ let p = class extends N {
|
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
drawColSplitLine() {
|
|
263
|
-
var n, a, h,
|
|
263
|
+
var n, a, h, d, f;
|
|
264
264
|
(n = this.splitLineGroup) == null || n.removeAll(), (a = this.sceneIns) == null || a.remove(this.splitLineGroup);
|
|
265
265
|
const e = (this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / (this.leadModel.column || 1);
|
|
266
266
|
if (this.splitPoint = e, this.leadModel.isSingleMode) {
|
|
267
|
-
const
|
|
267
|
+
const l = u(
|
|
268
268
|
this.waveConfigs[this.singleModeConfig.defaultSelect].speed,
|
|
269
269
|
this.gridConfig.cellMg,
|
|
270
270
|
this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate
|
|
271
|
-
), r =
|
|
272
|
-
Math.ceil(this.splitPoint / (
|
|
271
|
+
), r = I(
|
|
272
|
+
Math.ceil(this.splitPoint / (l || 1)) || 0,
|
|
273
273
|
this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0
|
|
274
274
|
), m = parseInt(`${r / 1e3 % 60}`, 10);
|
|
275
|
-
this.splitPoint = m * (this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0) * (
|
|
275
|
+
this.splitPoint = m * (this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0) * (l || 0);
|
|
276
276
|
}
|
|
277
277
|
let t = 0, i = 0, s = 0, o = 0;
|
|
278
|
-
for (let
|
|
279
|
-
t =
|
|
278
|
+
for (let l = 1; l <= this.leadModel.column - 1; l++) {
|
|
279
|
+
t = l * e + this.leadHeadConfig.leadHedeWidth, i = l * this.leadModel.line;
|
|
280
280
|
e:
|
|
281
281
|
for (let r = 1; r <= this.leadModel.line; r++) {
|
|
282
282
|
if (!(this.waveConfigs || [])[r - 1 + i])
|
|
@@ -292,7 +292,7 @@ let p = class extends N {
|
|
|
292
292
|
o,
|
|
293
293
|
!0
|
|
294
294
|
)
|
|
295
|
-
) : (
|
|
295
|
+
) : (d = this.splitLineGroup) == null || d.add(
|
|
296
296
|
this.creatSplitLine(
|
|
297
297
|
t,
|
|
298
298
|
((this.waveConfigs || [])[r - 1 + i].posY || r * this.splitBlockHeight) - (o || 0) * 0.5,
|
|
@@ -304,7 +304,7 @@ let p = class extends N {
|
|
|
304
304
|
(f = this.sceneIns) == null || f.add(this.splitLineGroup);
|
|
305
305
|
}
|
|
306
306
|
creatSplitLine(e, t, i, s) {
|
|
307
|
-
return new
|
|
307
|
+
return new H({
|
|
308
308
|
cursor: "",
|
|
309
309
|
shape: {
|
|
310
310
|
x1: 0 + e,
|
|
@@ -328,13 +328,13 @@ let p = class extends N {
|
|
|
328
328
|
fontFamily: this.fontFamily
|
|
329
329
|
}, t = new C({
|
|
330
330
|
cursor: "",
|
|
331
|
-
style:
|
|
331
|
+
style: W({
|
|
332
332
|
text: "(s)",
|
|
333
333
|
x: this.leadHeadConfig.leadHedeWidth / 2 - 8,
|
|
334
334
|
y: this.canvasContainer.height - 25
|
|
335
335
|
}, e)
|
|
336
336
|
}), i = new C({
|
|
337
|
-
style:
|
|
337
|
+
style: W({
|
|
338
338
|
text: `${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,
|
|
339
339
|
x: this.leadHeadConfig.leadHedeWidth / 2 + 20,
|
|
340
340
|
y: this.canvasContainer.height - this.ruleH
|
|
@@ -343,17 +343,17 @@ let p = class extends N {
|
|
|
343
343
|
(s = this.sceneIns) == null || s.add(i), (o = this.sceneIns) == null || o.add(t);
|
|
344
344
|
}
|
|
345
345
|
drawRuler(e = 0) {
|
|
346
|
-
var a, h,
|
|
346
|
+
var a, h, d;
|
|
347
347
|
if (this.timersCopy = e, !this.rulerConfig.isShow)
|
|
348
348
|
return;
|
|
349
349
|
const t = this.dataTotalTimes / 1e3;
|
|
350
350
|
let i = this.leadHeadConfig.leadHedeWidth, s = 0, o = t;
|
|
351
|
-
const n =
|
|
351
|
+
const n = u(this.rulerConfig.speed, this.gridConfig.cellMg, this.rulerConfig.sampleRate);
|
|
352
352
|
if (this.leadModel.isContinuous)
|
|
353
353
|
o = t * 5;
|
|
354
354
|
else if (!this.leadModel.add && n) {
|
|
355
|
-
const f =
|
|
356
|
-
o = e +
|
|
355
|
+
const f = M(this.splitPoint, n), l = I(f, this.rulerConfig.sampleRate || 0) / 1e3;
|
|
356
|
+
o = e + l;
|
|
357
357
|
}
|
|
358
358
|
for (let f = e; f <= o; f = +(f + 0.1).toFixed(1))
|
|
359
359
|
f !== e && (i += this.rulerStep), f % 1 === 0 ? (s = this.canvasContainer.height - 10, (a = this.rulerGroup) == null || a.add(new C({
|
|
@@ -366,7 +366,7 @@ let p = class extends N {
|
|
|
366
366
|
fontFamily: this.fontFamily,
|
|
367
367
|
fill: "#FF0080"
|
|
368
368
|
}
|
|
369
|
-
}))) : s = this.canvasContainer.height - 5, (h = this.rulerGroup) == null || h.add(new
|
|
369
|
+
}))) : s = this.canvasContainer.height - 5, (h = this.rulerGroup) == null || h.add(new H({
|
|
370
370
|
cursor: "",
|
|
371
371
|
shape: {
|
|
372
372
|
x1: i,
|
|
@@ -379,38 +379,68 @@ let p = class extends N {
|
|
|
379
379
|
lineWidth: 2
|
|
380
380
|
}
|
|
381
381
|
}));
|
|
382
|
-
(
|
|
382
|
+
(d = this.sceneIns) == null || d.add(this.rulerGroup);
|
|
383
|
+
}
|
|
384
|
+
drawTopTimeLine(e = 0) {
|
|
385
|
+
var d, f;
|
|
386
|
+
if (this.timersCopy = e, !this.timeLineConfig.isShow)
|
|
387
|
+
return;
|
|
388
|
+
const t = this.dataTotalTimes / 1e3;
|
|
389
|
+
let i = this.leadHeadConfig.leadHedeWidth, s = t;
|
|
390
|
+
const o = u(this.rulerConfig.speed, this.gridConfig.cellMg, this.rulerConfig.sampleRate);
|
|
391
|
+
if (this.leadModel.isContinuous)
|
|
392
|
+
s = t * 5;
|
|
393
|
+
else if (!this.leadModel.add && o) {
|
|
394
|
+
const l = M(this.splitPoint, o), r = I(l, this.rulerConfig.sampleRate || 0) / 1e3;
|
|
395
|
+
s = e + r;
|
|
396
|
+
}
|
|
397
|
+
const n = new Date(this.timeLineConfig.startLineTime).getTime() - new Date(this.timeLineConfig.startTime).getTime(), a = Math.floor(n / 1e3), h = Math.floor((new Date(this.timeLineConfig.endLineTime).getTime() - new Date(this.timeLineConfig.startTime).getTime()) / 1e3);
|
|
398
|
+
for (let l = e; l <= s; l = +(l + 0.1).toFixed(1))
|
|
399
|
+
l !== e && (i += this.rulerStep), l >= a && l <= h && ((d = this.rulerGroup) == null || d.add(new H({
|
|
400
|
+
cursor: "",
|
|
401
|
+
shape: {
|
|
402
|
+
x1: i,
|
|
403
|
+
y1: 1,
|
|
404
|
+
x2: i + this.rulerStep,
|
|
405
|
+
y2: 1
|
|
406
|
+
},
|
|
407
|
+
style: {
|
|
408
|
+
stroke: this.timeLineConfig.color,
|
|
409
|
+
lineWidth: 1
|
|
410
|
+
}
|
|
411
|
+
})));
|
|
412
|
+
(f = this.sceneIns) == null || f.add(this.rulerGroup);
|
|
383
413
|
}
|
|
384
414
|
timestampToTime(e = 0) {
|
|
385
415
|
const t = new Date(e), i = t.getFullYear(), s = ("0" + (t.getMonth() + 1)).slice(-2), o = ("0" + t.getDate()).slice(-2), n = ("0" + t.getHours()).slice(-2), a = ("0" + t.getMinutes()).slice(-2), h = ("0" + t.getSeconds()).slice(-2);
|
|
386
416
|
return `${i}-${s}-${o} ${n}:${a}:${h}`;
|
|
387
417
|
}
|
|
388
418
|
drawTimeLine(e = 0) {
|
|
389
|
-
var h,
|
|
419
|
+
var h, d, f;
|
|
390
420
|
if (this.timersCopy = e, !this.timeConfig.isShow)
|
|
391
421
|
return;
|
|
392
422
|
const t = this.dataTotalTimes / 1e3;
|
|
393
423
|
let i = this.leadHeadConfig.leadHedeWidth, s = 0, o = t;
|
|
394
|
-
const n =
|
|
424
|
+
const n = u(this.timeConfig.speed, this.gridConfig.cellMg, this.timeConfig.sampleRate);
|
|
395
425
|
if (this.leadModel.isContinuous)
|
|
396
426
|
o = t * 5;
|
|
397
427
|
else if (!this.leadModel.add && n) {
|
|
398
|
-
const
|
|
428
|
+
const l = M(this.splitPoint, n), r = I(l, this.timeConfig.sampleRate || 0) / 1e3;
|
|
399
429
|
o = e + r;
|
|
400
430
|
}
|
|
401
431
|
const a = new Date(this.timeConfig.startTime).getTime();
|
|
402
|
-
for (let
|
|
403
|
-
|
|
432
|
+
for (let l = e; l <= o; l = +(l + 0.1).toFixed(1))
|
|
433
|
+
l !== e && (i += this.rulerStep), l % 1 === 0 ? (s = this.canvasContainer.height - 10, (h = this.rulerGroup) == null || h.add(new C({
|
|
404
434
|
cursor: "",
|
|
405
435
|
style: {
|
|
406
436
|
x: i,
|
|
407
437
|
y: s - 15,
|
|
408
|
-
text: this.timestampToTime(a +
|
|
438
|
+
text: this.timestampToTime(a + l * 1e3).slice(11),
|
|
409
439
|
fontSize: 13,
|
|
410
440
|
fontFamily: this.fontFamily,
|
|
411
441
|
fill: "#000"
|
|
412
442
|
}
|
|
413
|
-
})), (
|
|
443
|
+
})), (d = this.rulerGroup) == null || d.add(new H({
|
|
414
444
|
cursor: "",
|
|
415
445
|
shape: {
|
|
416
446
|
x1: i,
|
|
@@ -427,27 +457,27 @@ let p = class extends N {
|
|
|
427
457
|
}
|
|
428
458
|
drawWaveFrom() {
|
|
429
459
|
var e, t, i;
|
|
430
|
-
this.leadModel.isSingleMode ? (this.addWaveDataCopy = [], this.waveDataCopy = [], this.createSingleWaveFrom(), (e = this.sceneIns) == null || e.add(this.singleWaveFromGroup)) : (this.singleWaveDataCopy = [], this.createAddWaveFrom(), this.createRowAndColWaveFrom(), (t = this.sceneIns) == null || t.add(this.rowAndColwaveFromGroup), (i = this.sceneIns) == null || i.add(this.addwaveFromGroup)), this.drawLeadHeadNameAndOffOrDel(), this.drawRuler(this.timersCopy), this.drawTimeLine(this.timersCopy);
|
|
460
|
+
this.leadModel.isSingleMode ? (this.addWaveDataCopy = [], this.waveDataCopy = [], this.createSingleWaveFrom(), (e = this.sceneIns) == null || e.add(this.singleWaveFromGroup)) : (this.singleWaveDataCopy = [], this.createAddWaveFrom(), this.createRowAndColWaveFrom(), (t = this.sceneIns) == null || t.add(this.rowAndColwaveFromGroup), (i = this.sceneIns) == null || i.add(this.addwaveFromGroup)), this.drawLeadHeadNameAndOffOrDel(), this.drawRuler(this.timersCopy), this.drawTimeLine(this.timersCopy), this.drawTopTimeLine(this.timersCopy);
|
|
431
461
|
}
|
|
432
462
|
getRednerSinglePoints() {
|
|
433
463
|
let e = 0, t = 0;
|
|
434
464
|
const i = this.waveLists[this.singleModeConfig.defaultSelect] || [];
|
|
435
465
|
let s = this.slidingWindowInfo.startInd || 0, o = this.slidingWindowInfo.endInd || 0;
|
|
436
|
-
const n =
|
|
466
|
+
const n = u(
|
|
437
467
|
this.waveConfigs[this.singleModeConfig.defaultSelect].speed,
|
|
438
468
|
this.gridConfig.cellMg,
|
|
439
469
|
this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate
|
|
440
|
-
), a = v(this.waveConfigs[this.singleModeConfig.defaultSelect].gain, this.gridConfig.cellMg), h = [],
|
|
470
|
+
), a = v(this.waveConfigs[this.singleModeConfig.defaultSelect].gain, this.gridConfig.cellMg), h = [], d = Math.ceil(i.length / (this.slidingWindowInfo.points || 1));
|
|
441
471
|
for (let f = 0; f < 1; f++) {
|
|
442
472
|
e = f * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0;
|
|
443
|
-
for (let
|
|
444
|
-
t =
|
|
473
|
+
for (let l = 1; l <= d; l++)
|
|
474
|
+
t = l * this.splitBlockHeight, l > 1 && (t *= 0.8, s = o, o = s + (this.slidingWindowInfo.points || 0)), l === 1 && (this.loopArrowY.rowAndCol = t), h.push({
|
|
445
475
|
pos: [e, t],
|
|
446
476
|
startInd: s,
|
|
447
477
|
endInd: o,
|
|
448
478
|
step: n,
|
|
449
479
|
sens: a,
|
|
450
|
-
data: i.slice(s, o).map((r, m) => this.waveConfigs[this.singleModeConfig.defaultSelect].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName) ?
|
|
480
|
+
data: i.slice(s, o).map((r, m) => this.waveConfigs[this.singleModeConfig.defaultSelect].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName) ? S(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, r, a / 2) : S(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity, r, a)).map((r, m) => [m * (n || 0), -r])
|
|
451
481
|
});
|
|
452
482
|
}
|
|
453
483
|
return h;
|
|
@@ -455,18 +485,18 @@ let p = class extends N {
|
|
|
455
485
|
createSingleWaveFrom() {
|
|
456
486
|
var n, a, h;
|
|
457
487
|
(n = this.singleWaveFromGroup) == null || n.removeAll();
|
|
458
|
-
let e = this.getRednerSinglePoints(), t =
|
|
459
|
-
for (let
|
|
460
|
-
this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx) || (i = parseInt(`${t / 1e3 / 60}`, 10), s = parseInt(`${t / 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, (a = this.singleWaveFromGroup) == null || a.add(new
|
|
488
|
+
let e = this.getRednerSinglePoints(), t = I(this.slidingWindowInfo.points || 0, this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate || 0), i = 0, s = 0, o = 0;
|
|
489
|
+
for (let d = 0; d < e.length && !(e[d].pos[1] > this.drawArea.height + this.bottomAreaHeight); d++)
|
|
490
|
+
this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx) || (i = parseInt(`${t / 1e3 / 60}`, 10), s = parseInt(`${t / 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, (a = this.singleWaveFromGroup) == null || a.add(new L({
|
|
461
491
|
cursor: "",
|
|
462
|
-
name: this.singleModeConfig.defaultSelect + "_" +
|
|
492
|
+
name: this.singleModeConfig.defaultSelect + "_" + d,
|
|
463
493
|
shape: {
|
|
464
|
-
points: e[
|
|
465
|
-
e[
|
|
466
|
-
e[
|
|
494
|
+
points: e[d].data.map(([f, l], r) => isNaN(l) ? (o === 0 && (o = r - 1, o = o < 0 ? 0 : o), [
|
|
495
|
+
e[d].data[o][0] + e[d].pos[0],
|
|
496
|
+
e[d].data[o][1] + e[d].pos[1]
|
|
467
497
|
]) : (o = 0, [
|
|
468
|
-
f + e[
|
|
469
|
-
|
|
498
|
+
f + e[d].pos[0],
|
|
499
|
+
l + e[d].pos[1]
|
|
470
500
|
]))
|
|
471
501
|
},
|
|
472
502
|
style: {
|
|
@@ -479,18 +509,18 @@ let p = class extends N {
|
|
|
479
509
|
})), (h = this.singleWaveFromGroup) == null || h.add(new C({
|
|
480
510
|
cursor: "",
|
|
481
511
|
style: {
|
|
482
|
-
x: e[
|
|
483
|
-
y: e[
|
|
484
|
-
text:
|
|
512
|
+
x: e[d].pos[0],
|
|
513
|
+
y: e[d].pos[1] - (e[d].sens || 0) / 2,
|
|
514
|
+
text: d === 0 ? "00:00 \u5FC3\u7387" : `${i}:${s} \u5FC3\u7387`,
|
|
485
515
|
fontWeight: "bold",
|
|
486
516
|
fontSize: 14,
|
|
487
517
|
fill: "#FF0080",
|
|
488
518
|
fontFamily: this.fontFamily
|
|
489
519
|
}
|
|
490
|
-
})),
|
|
520
|
+
})), d > 0 && (t += t)), this.createLeadName(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx, e[0].pos[0] - 10, e[0].pos[1] + 10), this.createLeadOffAndDel(
|
|
491
521
|
this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,
|
|
492
522
|
e[0].pos[0] - 5,
|
|
493
|
-
e[0].pos[1] - (e[
|
|
523
|
+
e[0].pos[1] - (e[d].sens || 0) / 2 - 15
|
|
494
524
|
);
|
|
495
525
|
this.singleWaveDataCopy = e, e = null;
|
|
496
526
|
}
|
|
@@ -502,11 +532,11 @@ let p = class extends N {
|
|
|
502
532
|
const e = [];
|
|
503
533
|
let t = this.leadHeadConfig.leadHedeWidth, i = 0, s = 0, o = [], n = 0, a = 0;
|
|
504
534
|
for (let h = 0; h < this.leadModel.add; h++)
|
|
505
|
-
s = this.longLeadConfig.leadIdxs[h], this.waveConfigs[s] && (t = this.waveConfigs[s].addPosX || t, n =
|
|
535
|
+
s = this.longLeadConfig.leadIdxs[h], this.waveConfigs[s] && (t = this.waveConfigs[s].addPosX || t, n = u(this.waveConfigs[s].speed, this.gridConfig.cellMg, this.waveConfigs[s].sampleRate), a = v(this.waveConfigs[s].gain, this.gridConfig.cellMg), i = this.waveConfigs[s].addPosY || (h + this.leadModel.line + 1) * this.splitBlockHeight, o = this.waveLists[s] || [], h === 0 && (this.loopArrowY.add = i), e.push({
|
|
506
536
|
pos: [t, i],
|
|
507
537
|
startInd: this.addSlidingWindowInfo.startInd || 0,
|
|
508
538
|
endInd: this.addSlidingWindowInfo.endInd || 0,
|
|
509
|
-
data: o.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((
|
|
539
|
+
data: o.slice(this.addSlidingWindowInfo.startInd, this.addSlidingWindowInfo.endInd).map((d, f) => this.waveConfigs[s].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[s].leadName) ? S(this.waveConfigs[s].sensitivity, d, a / 2) : S(this.waveConfigs[s].sensitivity, d, a)).map((d, f) => [f * (n || 0), -d]),
|
|
510
540
|
sens: a,
|
|
511
541
|
step: n
|
|
512
542
|
}));
|
|
@@ -516,7 +546,7 @@ let p = class extends N {
|
|
|
516
546
|
var i;
|
|
517
547
|
let e = this.getAddRednerPoints(), t = 0;
|
|
518
548
|
for (let s = 0; s < e.length; s++)
|
|
519
|
-
this.isLeadDel(this.longLeadConfig.leadIdxs[s]) || ((i = this.addwaveFromGroup) == null || i.add(new
|
|
549
|
+
this.isLeadDel(this.longLeadConfig.leadIdxs[s]) || ((i = this.addwaveFromGroup) == null || i.add(new L({
|
|
520
550
|
cursor: "",
|
|
521
551
|
name: this.longLeadConfig.leadIdxs[s] + "_" + s,
|
|
522
552
|
shape: {
|
|
@@ -540,31 +570,31 @@ let p = class extends N {
|
|
|
540
570
|
}
|
|
541
571
|
getRednerPoints() {
|
|
542
572
|
let e = 0, t = 0, i = 0, s = [], o = 0, n = 0, a = this.slidingWindowInfo.startInd || 0, h = this.slidingWindowInfo.endInd || 0;
|
|
543
|
-
const
|
|
573
|
+
const d = [];
|
|
544
574
|
for (let f = 0; f < this.leadModel.column; f++) {
|
|
545
575
|
e = f * this.splitPoint + this.leadHeadConfig.leadHedeWidth, t = 0, this.leadModel.isContinuous && f > 0 && (a = h, h = a + (this.slidingWindowInfo.points || 0));
|
|
546
|
-
for (let
|
|
547
|
-
e = this.waveConfigs[i].posX || e, t = this.waveConfigs[i].posY || t, o =
|
|
576
|
+
for (let l = 1; l <= this.leadModel.line && (t = l * this.splitBlockHeight, !(i > (this.waveLists || []).length - 1)); l++)
|
|
577
|
+
e = this.waveConfigs[i].posX || e, t = this.waveConfigs[i].posY || t, o = u(this.waveConfigs[i].speed, this.gridConfig.cellMg, this.waveConfigs[i].sampleRate), n = v(this.waveConfigs[i].gain, this.gridConfig.cellMg), s = this.waveLists[i] || [], this.waveConfigs[i] && (l === 1 && (this.loopArrowY.rowAndCol = t), d.push({
|
|
548
578
|
pos: [e, t],
|
|
549
579
|
startInd: a,
|
|
550
580
|
endInd: h,
|
|
551
581
|
sens: n,
|
|
552
582
|
step: o,
|
|
553
|
-
data: s.slice(a, h).map((r, m) => this.waveConfigs[i].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[i].leadName) ?
|
|
583
|
+
data: s.slice(a, h).map((r, m) => this.waveConfigs[i].leadName === "\u80F8\u5BFC\u51CF\u534A" && /^V\w+/.test(this.waveConfigs[i].leadName) ? S(this.waveConfigs[i].sensitivity, r, n / 2) : S(this.waveConfigs[i].sensitivity, r, n)).map((r, m) => [m * (o || 0), -r])
|
|
554
584
|
}), i++);
|
|
555
585
|
}
|
|
556
|
-
return
|
|
586
|
+
return d;
|
|
557
587
|
}
|
|
558
588
|
createRowAndColWaveFrom() {
|
|
559
589
|
var s, o;
|
|
560
590
|
(s = this.rowAndColwaveFromGroup) == null || s.removeAll();
|
|
561
591
|
let e = this.getRednerPoints(), t = 0, i = 0;
|
|
562
592
|
for (let n = 0; n < e.length; n++)
|
|
563
|
-
t = this.waveConfigs[n].leadIdx || 0, this.isLeadDel(t) || (o = this.rowAndColwaveFromGroup) == null || o.add(new
|
|
593
|
+
t = this.waveConfigs[n].leadIdx || 0, this.isLeadDel(t) || (o = this.rowAndColwaveFromGroup) == null || o.add(new L({
|
|
564
594
|
cursor: "",
|
|
565
595
|
name: n + "_" + n,
|
|
566
596
|
shape: {
|
|
567
|
-
points: e[n].data.map(([a, h],
|
|
597
|
+
points: e[n].data.map(([a, h], d) => isNaN(h) ? (i === 0 && (i = d - 1, i = i < 0 ? 0 : i), [
|
|
568
598
|
e[n].data[i][0] + e[n].pos[0],
|
|
569
599
|
e[n].data[i][1] + e[n].pos[1]
|
|
570
600
|
]) : (i = 0, [
|
|
@@ -595,7 +625,7 @@ let p = class extends N {
|
|
|
595
625
|
},
|
|
596
626
|
oncontextmenu: (n) => {
|
|
597
627
|
n.event.preventDefault(), this.$emit("notiifyLeadName", {
|
|
598
|
-
event:
|
|
628
|
+
event: y(W({}, n), {
|
|
599
629
|
name: this.leadNames[e],
|
|
600
630
|
idx: e
|
|
601
631
|
}),
|
|
@@ -604,7 +634,7 @@ let p = class extends N {
|
|
|
604
634
|
},
|
|
605
635
|
onclick: (n) => {
|
|
606
636
|
this.$emit("notiifyLeadName", {
|
|
607
|
-
event:
|
|
637
|
+
event: y(W({}, n), {
|
|
608
638
|
name: this.leadNames[e],
|
|
609
639
|
idx: e
|
|
610
640
|
}),
|
|
@@ -635,7 +665,7 @@ let p = class extends N {
|
|
|
635
665
|
t.type === "horizontal" && (t.scrollLeft = t.scrollLeft || 0, this.scrollCommon(t.scrollLeft));
|
|
636
666
|
}
|
|
637
667
|
scrollCommon(e) {
|
|
638
|
-
const t =
|
|
668
|
+
const t = M(e, this.publicStep || 1);
|
|
639
669
|
this.scrollWaveFrom(t), this.scrollRuler(t), this.scrollArrow(t), this.$emit("notifyScrollPointIdx", {
|
|
640
670
|
slidIdxs: t,
|
|
641
671
|
scrollLeft: e
|
|
@@ -648,18 +678,18 @@ let p = class extends N {
|
|
|
648
678
|
this.waveDataCopy = t, this.addWaveDataCopy = i, (s = this.rowAndColwaveFromGroup) == null || s.eachChild((n, a) => {
|
|
649
679
|
a = a || 0, !(!t[a] || !t[a].data) && n.attr({
|
|
650
680
|
shape: {
|
|
651
|
-
points: t[a].data.map(([h,
|
|
681
|
+
points: t[a].data.map(([h, d]) => [
|
|
652
682
|
h + t[a].pos[0],
|
|
653
|
-
|
|
683
|
+
d + t[a].pos[1]
|
|
654
684
|
])
|
|
655
685
|
}
|
|
656
686
|
});
|
|
657
687
|
}), (o = this.addwaveFromGroup) == null || o.eachChild((n, a) => {
|
|
658
688
|
a = a || 0, !(!i[a] || !i[a].data) && n.attr({
|
|
659
689
|
shape: {
|
|
660
|
-
points: i[a].data.map(([h,
|
|
690
|
+
points: i[a].data.map(([h, d]) => [
|
|
661
691
|
h + i[a].pos[0],
|
|
662
|
-
|
|
692
|
+
d + i[a].pos[1]
|
|
663
693
|
])
|
|
664
694
|
}
|
|
665
695
|
});
|
|
@@ -668,8 +698,8 @@ let p = class extends N {
|
|
|
668
698
|
scrollRuler(e) {
|
|
669
699
|
var i, s;
|
|
670
700
|
(i = this.rulerGroup) == null || i.removeAll(), (s = this.sceneIns) == null || s.remove(this.rulerGroup);
|
|
671
|
-
const t =
|
|
672
|
-
this.drawRuler(t), this.drawTimeLine(t);
|
|
701
|
+
const t = I(this.leadModel.isSingleMode ? 0 : e, this.leadModel.publicSampleRate || 0) / 1e3;
|
|
702
|
+
this.drawRuler(t), this.drawTimeLine(t), this.drawTopTimeLine(t);
|
|
673
703
|
}
|
|
674
704
|
scrollArrow(e) {
|
|
675
705
|
var t, i;
|
|
@@ -739,6 +769,20 @@ g([
|
|
|
739
769
|
})
|
|
740
770
|
})
|
|
741
771
|
], p.prototype, "timeConfig", 2);
|
|
772
|
+
g([
|
|
773
|
+
c({
|
|
774
|
+
default: () => ({
|
|
775
|
+
isShow: !1,
|
|
776
|
+
sampleRate: 500,
|
|
777
|
+
speed: 10,
|
|
778
|
+
gain: 10,
|
|
779
|
+
startTime: "",
|
|
780
|
+
startLineTime: "",
|
|
781
|
+
endLineTime: "",
|
|
782
|
+
color: ""
|
|
783
|
+
})
|
|
784
|
+
})
|
|
785
|
+
], p.prototype, "timeLineConfig", 2);
|
|
742
786
|
g([
|
|
743
787
|
c({
|
|
744
788
|
default: () => ({
|
|
@@ -805,13 +849,13 @@ g([
|
|
|
805
849
|
})
|
|
806
850
|
], p.prototype, "posStart", 2);
|
|
807
851
|
g([
|
|
808
|
-
|
|
852
|
+
G(200)
|
|
809
853
|
], p.prototype, "nativeScrollFunc", 1);
|
|
810
854
|
g([
|
|
811
|
-
|
|
855
|
+
G(200)
|
|
812
856
|
], p.prototype, "handleScroll", 1);
|
|
813
857
|
p = g([
|
|
814
|
-
|
|
858
|
+
T({
|
|
815
859
|
name: "Methods"
|
|
816
860
|
})
|
|
817
861
|
], p);
|
|
@@ -92,3 +92,20 @@ export interface BottomTimeConfig {
|
|
|
92
92
|
speed: number;
|
|
93
93
|
startTime: string;
|
|
94
94
|
}
|
|
95
|
+
/** 顶部时间线设置*/
|
|
96
|
+
export interface TopTimeLineConfig {
|
|
97
|
+
isShow: boolean;
|
|
98
|
+
/** 采样率 */
|
|
99
|
+
sampleRate: number;
|
|
100
|
+
/** 增益 */
|
|
101
|
+
gain: number;
|
|
102
|
+
/** 走纸 */
|
|
103
|
+
speed: number;
|
|
104
|
+
/** 颜色 */
|
|
105
|
+
color: string;
|
|
106
|
+
startTime: string;
|
|
107
|
+
/** 开始画线时间*/
|
|
108
|
+
startLineTime: string;
|
|
109
|
+
/** 结束画线时间*/
|
|
110
|
+
endLineTime: string;
|
|
111
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vue } from 'vue-property-decorator';
|
|
2
2
|
import type { Config as vueScrollConfig } from 'vuescroll';
|
|
3
3
|
import { ZRenderType, Group, Polyline, Line, ElementEvent } from 'zrender';
|
|
4
|
-
import { LeadModle, LongLeadConfig, SingleModeConfig, WaveConfig, BottomRulerConfig, BottomTimeConfig } from './interface';
|
|
4
|
+
import { LeadModle, LongLeadConfig, SingleModeConfig, WaveConfig, BottomRulerConfig, BottomTimeConfig, TopTimeLineConfig } from './interface';
|
|
5
5
|
import { LeadHeadConfig, MXLeadConfig } from '../../types/EcgWave';
|
|
6
6
|
import { MXGridConfig } from '../../types/BackgroundGrid';
|
|
7
7
|
import { HandleScrollParams } from '../../types/Common';
|
|
@@ -21,6 +21,7 @@ export default class Methods extends Vue {
|
|
|
21
21
|
/** 底部导联尺子配置 */
|
|
22
22
|
protected rulerConfig: BottomRulerConfig;
|
|
23
23
|
protected timeConfig: BottomTimeConfig;
|
|
24
|
+
protected timeLineConfig: TopTimeLineConfig;
|
|
24
25
|
/** 导联配置 */
|
|
25
26
|
protected leadConfig: MXLeadConfig;
|
|
26
27
|
/** 网格配置 */
|
|
@@ -180,6 +181,8 @@ export default class Methods extends Vue {
|
|
|
180
181
|
protected drawRulerNotes(): void;
|
|
181
182
|
/** 绘制标尺 */
|
|
182
183
|
protected drawRuler(startTimes?: number): void;
|
|
184
|
+
/** 绘制标尺 */
|
|
185
|
+
protected drawTopTimeLine(startTimes?: number): void;
|
|
183
186
|
timestampToTime(timestamp?: number): string;
|
|
184
187
|
/** 绘制标尺 */
|
|
185
188
|
protected drawTimeLine(startTimes?: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var W=Object.defineProperty,M=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var S=(e,t,i)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,m=(e,t)=>{for(var i in t||(t={}))F.call(t,i)&&S(e,i,t[i]);if(I)for(var i of I(t))H.call(t,i)&&S(e,i,t[i]);return e},C=(e,t)=>M(e,y(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const L=require("vue"),A=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 c=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("lodash"),p=require("@costy-plus/utils"),u=require("zrender"),P=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function b(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const G=P(L),x=b(u);var D=Object.defineProperty,O=Object.getOwnPropertyDescriptor,g=(e,t,i,s)=>{for(var o=s>1?void 0:s?O(t,i):t,n=e.length-1,l;n>=0;n--)(l=e[n])&&(o=(s?l(t,i,o):l(o))||o);return s&&o&&D(t,i,o),o};exports.default=class extends G.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.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.timersCopy=Object.freeze(0),this.range=Object.freeze(5e3),this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({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=Object.freeze(-1),this.publicStep=Object.freeze(0),this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0)}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}destroyed(){var e,t,i,s,o,n,l,h,a,f,d;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(o=this.splitLineGroup)==null||o.removeAll(),(n=this.leadHeadNameGroup)==null||n.removeAll(),(l=this.leadHeadOffAndDelGroup)==null||l.removeAll(),(h=this.rulerGroup)==null||h.removeAll(),(a=this.arrowGroup)==null||a.removeAll(),(f=this.heardBeatLineGroup)==null||f.removeAll(),(d=this.sceneIns)==null||d.dispose()}initCreatedConfig(){this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height,this.initConfig()}init(){this.initWaveFormPeer(),this.combinationDrawing(),this.registPostStart()}registPostStart(){this.posStart!==void 0&&this.posStart!==null&&(this.scrollConfig.isShow?this.$nextTick(()=>{var e;this.scrollConfig.isNativeScroll?(e=this.$refs[this.prefixId+"nativeScroll"])==null||e.scrollBy({left:(this.posStart||0)*(this.publicStep||1),top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:(this.posStart||0)*(this.publicStep||1)})}):(this.scrollWaveFrom(this.posStart),this.scrollRuler(this.posStart),this.scrollArrow(this.posStart)))}resetScroll(e=0){this.scrollConfig.isShow?this.$nextTick(()=>{var t;this.scrollConfig.isNativeScroll?(t=this.$refs[this.prefixId+"nativeScroll"])==null||t.scrollBy({left:e,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:e})}):(this.scrollWaveFrom(e),this.scrollRuler(e),this.scrollArrow(e))}combinationDrawing(){this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}initSlidingWindowInfo(){const e=this.publicStep||0,t=Math.ceil(this.splitPoint/e);if(this.slidingWindowInfo={points:this.slidingWindowInfo.points!==t?t:this.slidingWindowInfo.points,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd!==t?t:this.slidingWindowInfo.endInd},this.scrollConfig.isShow&&!this.leadModel.isSingleMode){const s=p.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),o=this.dataTotalLength*s;this.vuescrollWH.width=this.canvasContainer.width+(o||0)-this.splitPoint}const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points!==i?i:this.addSlidingWindowInfo.points,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd!==i?i:this.addSlidingWindowInfo.endInd}}calcHighestAndLowestPoint(){const e=v.flattenDeep(this.waveLists);return{maxPoints:v.max(e)||0,minPoints:v.min(e)||0}}isLeadOff(e){return!!this.waveConfigs[e].isLeadOff}isLeadDel(e){return!!this.waveConfigs[e].isLeadDelete}initConfig(){var t;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"});let e=this.canvasContainer.width;if(this.leadModel.ecgareawidth===1){const i=p.getPrintLengthToPx(((t=this.waveConfigs[0])==null?void 0:t.sampleRate)||0)+this.leadHeadConfig.leadHedeWidth;i<=e&&(e=i)}else if(this.leadModel.isContinuous){const i=p.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),s=this.dataTotalLength*i;!this.leadModel.isSingleMode&&(s||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(s||0)+this.leadHeadConfig.leadHedeWidth)}this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:this.slidingWindowInfo.points||0,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd||0},this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points||0,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0},this.loopArrowY={add:0,rowAndCol:0},this.leadNameList=this.leadNames.map((i,s)=>s)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=this.calcHighestAndLowestPoint(),this.leadModel.isSingleMode?(this.splitBlockHeight=Math.abs(this.highestAndLowestPoint.maxPoints)+Math.abs(this.highestAndLowestPoint.minPoints)+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6)):this.splitBlockHeight=this.drawArea.height/this.totalRows,this.publicStep=p.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),this.rulerStep=(this.publicStep||1)*(this.leadModel.publicSampleRate||1)/(this.gridConfig.cellMg*2+2)}initWaveFormPeer(){var i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById(`${this.prefixId}wave-from-box`);this.sceneIns=x.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById(`${this.prefixId}MXGrid`);this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp)}sceneInsMousemove(e){var t;this.sceneIsMouseDown&&(this.scrollConfig.isNativeScroll?(t=this.$refs[`${this.prefixId}nativeScroll`])==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs[`${this.prefixId}vueScroll`].scrollBy({dx:e.offsetX-this.sceneIsMouseDownX}))}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}sceneInsEventOff(){var e,t,i;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp)}drawLeadHead(){var n,l,h,a,f;(n=this.leadHeadGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.leadHeadGroup),console.log("this.waveConfigs",this.waveConfigs);let e="",t=!1,i=0,s=0;for(let d=0;d<=this.leadModel.column;d++){s=d*this.leadModel.line;e:for(let r=1;r<=this.leadModel.line;r++){if(!(this.waveConfigs||[])[r-1+s])break e;!this.waveConfigs[r-1+s].isShowLeadHead||(t=!1,e=(this.leadNames||[])[r-1+s]||"",this.waveConfigs[r-1+s].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=this.waveConfigs[r-1+s].posX?this.waveConfigs[r-1+s].posX-this.leadHeadConfig.leadHedeWidth:0,(h=this.leadHeadGroup)==null||h.add(this.createLeadHead(i,this.waveConfigs[r-1+s].posY||r*this.splitBlockHeight,p.getSens(this.waveConfigs[r-1+s].gain,this.gridConfig.cellMg),t)))}}let o=null;for(let d=0;d<this.leadModel.add;d++)!this.waveConfigs[this.longLeadConfig.leadIdxs[d]]||(o=this.waveConfigs[this.longLeadConfig.leadIdxs[d]],e=this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[d]]],t=!1,o.gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=o.posX?o.posX-this.leadHeadConfig.leadHedeWidth:0,(a=this.leadHeadGroup)==null||a.add(this.createLeadHead(i,o.posY||(d+1+this.leadModel.line)*this.splitBlockHeight,p.getSens(o.gain,this.gridConfig.cellMg),t)));o=null,(f=this.sceneIns)==null||f.add(this.leadHeadGroup)}createLeadHead(e,t,i,s){const o=this.leadHeadConfig.leadHedeWidth/4;return i=s?i/2:i,new u.Polyline({cursor:"",shape:{points:[[0+e,0+t],[o+e,0+t],[o+e,-i+t],[3*o+e,-i+t],[3*o+e,0+t],[4*o+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawColSplitLine(){var n,l,h,a,f;(n=this.splitLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/(this.leadModel.column||1);if(this.splitPoint=e,this.leadModel.isSingleMode){const d=p.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),r=p.getDataLenTimes(Math.ceil(this.splitPoint/(d||1))||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),w=parseInt(`${r/1e3%60}`,10);this.splitPoint=w*(this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0)*(d||0)}let t=0,i=0,s=0,o=0;for(let d=1;d<=this.leadModel.column-1;d++){t=d*e+this.leadHeadConfig.leadHedeWidth,i=d*this.leadModel.line;e:for(let r=1;r<=this.leadModel.line;r++){if(!(this.waveConfigs||[])[r-1+i])break e;if((this.waveConfigs||[])[r-1+i].isShowLeadHead)continue e;if((this.waveConfigs||[])[r-1+i].posX!==void 0&&(t=(this.waveConfigs||[])[r-1+i].posX),s=(this.waveConfigs||[])[r-1+i].leadIdx,s===void 0)break;o=p.getSens((this.waveConfigs||[])[r-1+i].gain,this.gridConfig.cellMg),(this.waveConfigs||[])[r-1+i].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.leadNames[s])?(h=this.splitLineGroup)==null||h.add(this.creatSplitLine(t,((this.waveConfigs||[])[r-1+i].posY||r*this.splitBlockHeight)-(o||0)/2*.5,o,!0)):(a=this.splitLineGroup)==null||a.add(this.creatSplitLine(t,((this.waveConfigs||[])[r-1+i].posY||r*this.splitBlockHeight)-(o||0)*.5,o))}}(f=this.sceneIns)==null||f.add(this.splitLineGroup)}creatSplitLine(e,t,i,s){return new u.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(s?(i||0)/2:i||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawRulerNotes(){var s,o;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new u.Text({cursor:"",style:m({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new u.Text({style:m({text:`${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(s=this.sceneIns)==null||s.add(i),(o=this.sceneIns)==null||o.add(t)}drawRuler(e=0){var l,h,a;if(this.timersCopy=e,!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,o=t;const n=p.getStepForSpeed(this.rulerConfig.speed,this.gridConfig.cellMg,this.rulerConfig.sampleRate);if(this.leadModel.isContinuous)o=t*5;else if(!this.leadModel.add&&n){const f=p.getPointIdxForPx(this.splitPoint,n),d=p.getDataLenTimes(f,this.rulerConfig.sampleRate||0)/1e3;o=e+d}for(let f=e;f<=o;f=+(f+.1).toFixed(1))f!==e&&(i+=this.rulerStep),f%1===0?(s=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new u.Text({cursor:"",style:{x:i,y:s-15,text:f+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(h=this.rulerGroup)==null||h.add(new u.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(a=this.sceneIns)==null||a.add(this.rulerGroup)}timestampToTime(e=0){const t=new Date(e),i=t.getFullYear(),s=("0"+(t.getMonth()+1)).slice(-2),o=("0"+t.getDate()).slice(-2),n=("0"+t.getHours()).slice(-2),l=("0"+t.getMinutes()).slice(-2),h=("0"+t.getSeconds()).slice(-2);return`${i}-${s}-${o} ${n}:${l}:${h}`}drawTimeLine(e=0){var h,a,f;if(this.timersCopy=e,!this.timeConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,o=t;const n=p.getStepForSpeed(this.timeConfig.speed,this.gridConfig.cellMg,this.timeConfig.sampleRate);if(this.leadModel.isContinuous)o=t*5;else if(!this.leadModel.add&&n){const d=p.getPointIdxForPx(this.splitPoint,n),r=p.getDataLenTimes(d,this.timeConfig.sampleRate||0)/1e3;o=e+r}const l=new Date(this.timeConfig.startTime).getTime();for(let d=e;d<=o;d=+(d+.1).toFixed(1))d!==e&&(i+=this.rulerStep),d%1===0?(s=this.canvasContainer.height-10,(h=this.rulerGroup)==null||h.add(new u.Text({cursor:"",style:{x:i,y:s-15,text:this.timestampToTime(l+d*1e3).slice(11),fontSize:13,fontFamily:this.fontFamily,fill:"#000"}})),(a=this.rulerGroup)==null||a.add(new u.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#000",lineWidth:1}}))):s=this.canvasContainer.height-5;(f=this.sceneIns)==null||f.add(this.rulerGroup)}drawWaveFrom(){var e,t,i;this.leadModel.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(e=this.sceneIns)==null||e.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(t=this.sceneIns)==null||t.add(this.rowAndColwaveFromGroup),(i=this.sceneIns)==null||i.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(this.timersCopy),this.drawTimeLine(this.timersCopy)}getRednerSinglePoints(){let e=0,t=0;const i=this.waveLists[this.singleModeConfig.defaultSelect]||[];let s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=p.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),l=p.getSens(this.waveConfigs[this.singleModeConfig.defaultSelect].gain,this.gridConfig.cellMg),h=[],a=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let f=0;f<1;f++){e=f*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let d=1;d<=a;d++)t=d*this.splitBlockHeight,d>1&&(t*=.8,s=o,o=s+(this.slidingWindowInfo.points||0)),d===1&&(this.loopArrowY.rowAndCol=t),h.push({pos:[e,t],startInd:s,endInd:o,step:n,sens:l,data:i.slice(s,o).map((r,w)=>this.waveConfigs[this.singleModeConfig.defaultSelect].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName)?p.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,r,l/2):p.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,r,l)).map((r,w)=>[w*(n||0),-r])})}return h}createSingleWaveFrom(){var n,l,h;(n=this.singleWaveFromGroup)==null||n.removeAll();let e=this.getRednerSinglePoints(),t=p.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),i=0,s=0,o=0;for(let a=0;a<e.length&&!(e[a].pos[1]>this.drawArea.height+this.bottomAreaHeight);a++)this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx)||(i=parseInt(`${t/1e3/60}`,10),s=parseInt(`${t/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,(l=this.singleWaveFromGroup)==null||l.add(new u.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+a,shape:{points:e[a].data.map(([f,d],r)=>isNaN(d)?(o===0&&(o=r-1,o=o<0?0:o),[e[a].data[o][0]+e[a].pos[0],e[a].data[o][1]+e[a].pos[1]]):(o=0,[f+e[a].pos[0],d+e[a].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:f=>{console.log(11,f)}})),(h=this.singleWaveFromGroup)==null||h.add(new u.Text({cursor:"",style:{x:e[a].pos[0],y:e[a].pos[1]-(e[a].sens||0)/2,text:a===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),a>0&&(t+=t)),this.createLeadName(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-10,e[0].pos[1]+10),this.createLeadOffAndDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-5,e[0].pos[1]-(e[a].sens||0)/2-15);this.singleWaveDataCopy=e,e=null}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}getAddRednerPoints(){const e=[];let t=this.leadHeadConfig.leadHedeWidth,i=0,s=0,o=[],n=0,l=0;for(let h=0;h<this.leadModel.add;h++)s=this.longLeadConfig.leadIdxs[h],this.waveConfigs[s]&&(t=this.waveConfigs[s].addPosX||t,n=p.getStepForSpeed(this.waveConfigs[s].speed,this.gridConfig.cellMg,this.waveConfigs[s].sampleRate),l=p.getSens(this.waveConfigs[s].gain,this.gridConfig.cellMg),i=this.waveConfigs[s].addPosY||(h+this.leadModel.line+1)*this.splitBlockHeight,o=this.waveLists[s]||[],h===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:o.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((a,f)=>this.waveConfigs[s].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?p.getActualY(this.waveConfigs[s].sensitivity,a,l/2):p.getActualY(this.waveConfigs[s].sensitivity,a,l)).map((a,f)=>[f*(n||0),-a]),sens:l,step:n}));return e}createAddWaveFrom(){var i;let e=this.getAddRednerPoints(),t=0;for(let s=0;s<e.length;s++)this.isLeadDel(this.longLeadConfig.leadIdxs[s])||((i=this.addwaveFromGroup)==null||i.add(new u.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[s]+"_"+s,shape:{points:e[s].data.map(([o,n],l)=>isNaN(n)?(t===0&&(t=l-1,t=t<0?0:t),[e[s].data[t][0]+e[s].pos[0],e[s].data[t][1]+e[s].pos[1]]):(t=0,[o+e[s].pos[0],n+e[s].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:o=>{console.log(22,o)}})),this.createLeadName(this.longLeadConfig.leadNames[s],e[s].pos[0],e[s].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[s],e[s].pos[0]-5,e[s].pos[1]-(e[s].sens||0)/2-15));this.addWaveDataCopy=e,e=null}getRednerPoints(){let e=0,t=0,i=0,s=[],o=0,n=0,l=this.slidingWindowInfo.startInd||0,h=this.slidingWindowInfo.endInd||0;const a=[];for(let f=0;f<this.leadModel.column;f++){e=f*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&f>0&&(l=h,h=l+(this.slidingWindowInfo.points||0));for(let d=1;d<=this.leadModel.line&&(t=d*this.splitBlockHeight,!(i>(this.waveLists||[]).length-1));d++)e=this.waveConfigs[i].posX||e,t=this.waveConfigs[i].posY||t,o=p.getStepForSpeed(this.waveConfigs[i].speed,this.gridConfig.cellMg,this.waveConfigs[i].sampleRate),n=p.getSens(this.waveConfigs[i].gain,this.gridConfig.cellMg),s=this.waveLists[i]||[],this.waveConfigs[i]&&(d===1&&(this.loopArrowY.rowAndCol=t),a.push({pos:[e,t],startInd:l,endInd:h,sens:n,step:o,data:s.slice(l,h).map((r,w)=>this.waveConfigs[i].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[i].leadName)?p.getActualY(this.waveConfigs[i].sensitivity,r,n/2):p.getActualY(this.waveConfigs[i].sensitivity,r,n)).map((r,w)=>[w*(o||0),-r])}),i++)}return a}createRowAndColWaveFrom(){var s,o;(s=this.rowAndColwaveFromGroup)==null||s.removeAll();let e=this.getRednerPoints(),t=0,i=0;for(let n=0;n<e.length;n++)t=this.waveConfigs[n].leadIdx||0,this.isLeadDel(t)||(o=this.rowAndColwaveFromGroup)==null||o.add(new u.Polyline({cursor:"",name:n+"_"+n,shape:{points:e[n].data.map(([l,h],a)=>isNaN(h)?(i===0&&(i=a-1,i=i<0?0:i),[e[n].data[i][0]+e[n].pos[0],e[n].data[i][1]+e[n].pos[1]]):(i=0,[l+e[n].pos[0],h+e[n].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:l=>{console.log(33,l)}})),n<this.leadModel.line?(this.createLeadName(t,e[n].pos[0],e[n].pos[1]-15),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(e[n].sens||0)/2-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-(e[n].sens||0)/2),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(e[n].sens||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var o;(o=this.leadHeadNameGroup)==null||o.add(new u.Text({style:{x:t,y:i,text:this.leadNames[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:n=>{n.event.preventDefault(),this.$emit("notiifyLeadName",{event:C(m({},n),{name:this.leadNames[e],idx:e}),isAdd:s})},onclick:n=>{this.$emit("notiifyLeadName",{event:C(m({},n),{name:this.leadNames[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new u.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}nativeScrollFunc(e){console.log("event",e,e.target.scrollLeft),this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){const t=p.getPointIdxForPx(e,this.publicStep||1);this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",{slidIdxs:t,scrollLeft:e})}scrollWaveFrom(e){var s,o;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,(s=this.rowAndColwaveFromGroup)==null||s.eachChild((n,l)=>{l=l||0,!(!t[l]||!t[l].data)&&n.attr({shape:{points:t[l].data.map(([h,a])=>[h+t[l].pos[0],a+t[l].pos[1]])}})}),(o=this.addwaveFromGroup)==null||o.eachChild((n,l)=>{l=l||0,!(!i[l]||!i[l].data)&&n.attr({shape:{points:i[l].data.map(([h,a])=>[h+i[l].pos[0],a+i[l].pos[1]])}})}),t=null,i=null}scrollRuler(e){var i,s;(i=this.rulerGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.rulerGroup);const t=p.getDataLenTimes(this.leadModel.isSingleMode?0:e,this.leadModel.publicSampleRate||0)/1e3;this.drawRuler(t),this.drawTimeLine(t)}scrollArrow(e){var t,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup)}};g([c.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);g([c.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);g([c.Prop({default:()=>[]})],exports.default.prototype,"waveConfigs",2);g([c.Prop({default:()=>[]})],exports.default.prototype,"waveLists",2);g([c.Prop({default:()=>[]})],exports.default.prototype,"leadNames",2);g([c.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);g([c.Prop({required:!0})],exports.default.prototype,"leadModel",2);g([c.Prop({default:()=>({isShow:!1,gainName:"",speedName:""})})],exports.default.prototype,"rulerConfig",2);g([c.Prop({default:()=>({isShow:!0,sampleRate:500,speed:10,gain:10,startTime:""})})],exports.default.prototype,"timeConfig",2);g([c.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);g([c.Prop({required:!0})],exports.default.prototype,"gridConfig",2);g([c.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);g([c.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeConfig",2);g([c.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);g([c.Prop({default:()=>0})],exports.default.prototype,"dataTotalTimes",2);g([c.Prop({default:()=>0})],exports.default.prototype,"dataTotalLength",2);g([c.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);g([c.Prop({default:()=>0})],exports.default.prototype,"posStart",2);g([p.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);g([p.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=g([A.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";var W=Object.defineProperty,L=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var y=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var S=(e,t,i)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,w=(e,t)=>{for(var i in t||(t={}))y.call(t,i)&&S(e,i,t[i]);if(I)for(var i of I(t))F.call(t,i)&&S(e,i,t[i]);return e},C=(e,t)=>L(e,M(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const H=require("vue"),A=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 c=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("lodash"),p=require("@costy-plus/utils"),u=require("zrender"),P=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function b(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const x=P(H),G=b(u);var D=Object.defineProperty,O=Object.getOwnPropertyDescriptor,g=(e,t,i,s)=>{for(var o=s>1?void 0:s?O(t,i):t,n=e.length-1,a;n>=0;n--)(a=e[n])&&(o=(s?a(t,i,o):a(o))||o);return s&&o&&D(t,i,o),o};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.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.timersCopy=Object.freeze(0),this.range=Object.freeze(5e3),this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.splitBlockHeight=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({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=Object.freeze(-1),this.publicStep=Object.freeze(0),this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0)}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}destroyed(){var e,t,i,s,o,n,a,h,d,f,l;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(o=this.splitLineGroup)==null||o.removeAll(),(n=this.leadHeadNameGroup)==null||n.removeAll(),(a=this.leadHeadOffAndDelGroup)==null||a.removeAll(),(h=this.rulerGroup)==null||h.removeAll(),(d=this.arrowGroup)==null||d.removeAll(),(f=this.heardBeatLineGroup)==null||f.removeAll(),(l=this.sceneIns)==null||l.dispose()}initCreatedConfig(){this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height,this.initConfig()}init(){this.initWaveFormPeer(),this.combinationDrawing(),this.registPostStart()}registPostStart(){this.posStart!==void 0&&this.posStart!==null&&(this.scrollConfig.isShow?this.$nextTick(()=>{var e;this.scrollConfig.isNativeScroll?(e=this.$refs[this.prefixId+"nativeScroll"])==null||e.scrollBy({left:(this.posStart||0)*(this.publicStep||1),top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:(this.posStart||0)*(this.publicStep||1)})}):(this.scrollWaveFrom(this.posStart),this.scrollRuler(this.posStart),this.scrollArrow(this.posStart)))}resetScroll(e=0){this.scrollConfig.isShow?this.$nextTick(()=>{var t;this.scrollConfig.isNativeScroll?(t=this.$refs[this.prefixId+"nativeScroll"])==null||t.scrollBy({left:e,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({x:e})}):(this.scrollWaveFrom(e),this.scrollRuler(e),this.scrollArrow(e))}combinationDrawing(){this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}initSlidingWindowInfo(){const e=this.publicStep||0,t=Math.ceil(this.splitPoint/e);if(this.slidingWindowInfo={points:this.slidingWindowInfo.points!==t?t:this.slidingWindowInfo.points,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd!==t?t:this.slidingWindowInfo.endInd},this.scrollConfig.isShow&&!this.leadModel.isSingleMode){const s=p.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),o=this.dataTotalLength*s;this.vuescrollWH.width=this.canvasContainer.width+(o||0)-this.splitPoint}const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points!==i?i:this.addSlidingWindowInfo.points,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd!==i?i:this.addSlidingWindowInfo.endInd}}calcHighestAndLowestPoint(){const e=v.flattenDeep(this.waveLists);return{maxPoints:v.max(e)||0,minPoints:v.min(e)||0}}isLeadOff(e){return!!this.waveConfigs[e].isLeadOff}isLeadDel(e){return!!this.waveConfigs[e].isLeadDelete}initConfig(){var t;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"});let e=this.canvasContainer.width;if(this.leadModel.ecgareawidth===1){const i=p.getPrintLengthToPx(((t=this.waveConfigs[0])==null?void 0:t.sampleRate)||0)+this.leadHeadConfig.leadHedeWidth;i<=e&&(e=i)}else if(this.leadModel.isContinuous){const i=p.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),s=this.dataTotalLength*i;!this.leadModel.isSingleMode&&(s||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(s||0)+this.leadHeadConfig.leadHedeWidth)}this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:this.slidingWindowInfo.points||0,startInd:this.slidingWindowInfo.startInd||0,endInd:this.slidingWindowInfo.endInd||0},this.addSlidingWindowInfo={points:this.addSlidingWindowInfo.points||0,startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0},this.loopArrowY={add:0,rowAndCol:0},this.leadNameList=this.leadNames.map((i,s)=>s)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=this.calcHighestAndLowestPoint(),this.leadModel.isSingleMode?(this.splitBlockHeight=Math.abs(this.highestAndLowestPoint.maxPoints)+Math.abs(this.highestAndLowestPoint.minPoints)+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6)):this.splitBlockHeight=this.drawArea.height/this.totalRows,this.publicStep=p.getStepForSpeed(this.leadModel.publicSpeed,this.gridConfig.cellMg,this.leadModel.publicSampleRate),this.rulerStep=(this.publicStep||1)*(this.leadModel.publicSampleRate||1)/(this.gridConfig.cellMg*2+2)}initWaveFormPeer(){var i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById(`${this.prefixId}wave-from-box`);this.sceneIns=G.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById(`${this.prefixId}MXGrid`);this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp)}sceneInsMousemove(e){var t;this.sceneIsMouseDown&&(this.scrollConfig.isNativeScroll?(t=this.$refs[`${this.prefixId}nativeScroll`])==null||t.scrollBy({left:e.offsetX-this.sceneIsMouseDownX,top:0}):this.$refs[`${this.prefixId}vueScroll`].scrollBy({dx:e.offsetX-this.sceneIsMouseDownX}))}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}sceneInsEventOff(){var e,t,i;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp)}drawLeadHead(){var n,a,h,d,f;(n=this.leadHeadGroup)==null||n.removeAll(),(a=this.sceneIns)==null||a.remove(this.leadHeadGroup),console.log("this.waveConfigs",this.waveConfigs);let e="",t=!1,i=0,s=0;for(let l=0;l<=this.leadModel.column;l++){s=l*this.leadModel.line;e:for(let r=1;r<=this.leadModel.line;r++){if(!(this.waveConfigs||[])[r-1+s])break e;!this.waveConfigs[r-1+s].isShowLeadHead||(t=!1,e=(this.leadNames||[])[r-1+s]||"",this.waveConfigs[r-1+s].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=this.waveConfigs[r-1+s].posX?this.waveConfigs[r-1+s].posX-this.leadHeadConfig.leadHedeWidth:0,(h=this.leadHeadGroup)==null||h.add(this.createLeadHead(i,this.waveConfigs[r-1+s].posY||r*this.splitBlockHeight,p.getSens(this.waveConfigs[r-1+s].gain,this.gridConfig.cellMg),t)))}}let o=null;for(let l=0;l<this.leadModel.add;l++)!this.waveConfigs[this.longLeadConfig.leadIdxs[l]]||(o=this.waveConfigs[this.longLeadConfig.leadIdxs[l]],e=this.leadNames[this.longLeadConfig.leadNames[this.longLeadConfig.leadNames[l]]],t=!1,o.gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(e)&&(t=!0),i=o.posX?o.posX-this.leadHeadConfig.leadHedeWidth:0,(d=this.leadHeadGroup)==null||d.add(this.createLeadHead(i,o.posY||(l+1+this.leadModel.line)*this.splitBlockHeight,p.getSens(o.gain,this.gridConfig.cellMg),t)));o=null,(f=this.sceneIns)==null||f.add(this.leadHeadGroup)}createLeadHead(e,t,i,s){const o=this.leadHeadConfig.leadHedeWidth/4;return i=s?i/2:i,new u.Polyline({cursor:"",shape:{points:[[0+e,0+t],[o+e,0+t],[o+e,-i+t],[3*o+e,-i+t],[3*o+e,0+t],[4*o+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawColSplitLine(){var n,a,h,d,f;(n=this.splitLineGroup)==null||n.removeAll(),(a=this.sceneIns)==null||a.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/(this.leadModel.column||1);if(this.splitPoint=e,this.leadModel.isSingleMode){const l=p.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),r=p.getDataLenTimes(Math.ceil(this.splitPoint/(l||1))||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),m=parseInt(`${r/1e3%60}`,10);this.splitPoint=m*(this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0)*(l||0)}let t=0,i=0,s=0,o=0;for(let l=1;l<=this.leadModel.column-1;l++){t=l*e+this.leadHeadConfig.leadHedeWidth,i=l*this.leadModel.line;e:for(let r=1;r<=this.leadModel.line;r++){if(!(this.waveConfigs||[])[r-1+i])break e;if((this.waveConfigs||[])[r-1+i].isShowLeadHead)continue e;if((this.waveConfigs||[])[r-1+i].posX!==void 0&&(t=(this.waveConfigs||[])[r-1+i].posX),s=(this.waveConfigs||[])[r-1+i].leadIdx,s===void 0)break;o=p.getSens((this.waveConfigs||[])[r-1+i].gain,this.gridConfig.cellMg),(this.waveConfigs||[])[r-1+i].gainName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.leadNames[s])?(h=this.splitLineGroup)==null||h.add(this.creatSplitLine(t,((this.waveConfigs||[])[r-1+i].posY||r*this.splitBlockHeight)-(o||0)/2*.5,o,!0)):(d=this.splitLineGroup)==null||d.add(this.creatSplitLine(t,((this.waveConfigs||[])[r-1+i].posY||r*this.splitBlockHeight)-(o||0)*.5,o))}}(f=this.sceneIns)==null||f.add(this.splitLineGroup)}creatSplitLine(e,t,i,s){return new u.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(s?(i||0)/2:i||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawRulerNotes(){var s,o;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.canvasContainer.height-25},e)}),i=new u.Text({style:w({text:`${this.rulerConfig.gainName} ${this.rulerConfig.speedName}`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(s=this.sceneIns)==null||s.add(i),(o=this.sceneIns)==null||o.add(t)}drawRuler(e=0){var a,h,d;if(this.timersCopy=e,!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,o=t;const n=p.getStepForSpeed(this.rulerConfig.speed,this.gridConfig.cellMg,this.rulerConfig.sampleRate);if(this.leadModel.isContinuous)o=t*5;else if(!this.leadModel.add&&n){const f=p.getPointIdxForPx(this.splitPoint,n),l=p.getDataLenTimes(f,this.rulerConfig.sampleRate||0)/1e3;o=e+l}for(let f=e;f<=o;f=+(f+.1).toFixed(1))f!==e&&(i+=this.rulerStep),f%1===0?(s=this.canvasContainer.height-10,(a=this.rulerGroup)==null||a.add(new u.Text({cursor:"",style:{x:i,y:s-15,text:f+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(h=this.rulerGroup)==null||h.add(new u.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(d=this.sceneIns)==null||d.add(this.rulerGroup)}drawTopTimeLine(e=0){var d,f;if(this.timersCopy=e,!this.timeLineConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=t;const o=p.getStepForSpeed(this.rulerConfig.speed,this.gridConfig.cellMg,this.rulerConfig.sampleRate);if(this.leadModel.isContinuous)s=t*5;else if(!this.leadModel.add&&o){const l=p.getPointIdxForPx(this.splitPoint,o),r=p.getDataLenTimes(l,this.rulerConfig.sampleRate||0)/1e3;s=e+r}const n=new Date(this.timeLineConfig.startLineTime).getTime()-new Date(this.timeLineConfig.startTime).getTime(),a=Math.floor(n/1e3),h=Math.floor((new Date(this.timeLineConfig.endLineTime).getTime()-new Date(this.timeLineConfig.startTime).getTime())/1e3);for(let l=e;l<=s;l=+(l+.1).toFixed(1))l!==e&&(i+=this.rulerStep),l>=a&&l<=h&&((d=this.rulerGroup)==null||d.add(new u.Line({cursor:"",shape:{x1:i,y1:1,x2:i+this.rulerStep,y2:1},style:{stroke:this.timeLineConfig.color,lineWidth:1}})));(f=this.sceneIns)==null||f.add(this.rulerGroup)}timestampToTime(e=0){const t=new Date(e),i=t.getFullYear(),s=("0"+(t.getMonth()+1)).slice(-2),o=("0"+t.getDate()).slice(-2),n=("0"+t.getHours()).slice(-2),a=("0"+t.getMinutes()).slice(-2),h=("0"+t.getSeconds()).slice(-2);return`${i}-${s}-${o} ${n}:${a}:${h}`}drawTimeLine(e=0){var h,d,f;if(this.timersCopy=e,!this.timeConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,o=t;const n=p.getStepForSpeed(this.timeConfig.speed,this.gridConfig.cellMg,this.timeConfig.sampleRate);if(this.leadModel.isContinuous)o=t*5;else if(!this.leadModel.add&&n){const l=p.getPointIdxForPx(this.splitPoint,n),r=p.getDataLenTimes(l,this.timeConfig.sampleRate||0)/1e3;o=e+r}const a=new Date(this.timeConfig.startTime).getTime();for(let l=e;l<=o;l=+(l+.1).toFixed(1))l!==e&&(i+=this.rulerStep),l%1===0?(s=this.canvasContainer.height-10,(h=this.rulerGroup)==null||h.add(new u.Text({cursor:"",style:{x:i,y:s-15,text:this.timestampToTime(a+l*1e3).slice(11),fontSize:13,fontFamily:this.fontFamily,fill:"#000"}})),(d=this.rulerGroup)==null||d.add(new u.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#000",lineWidth:1}}))):s=this.canvasContainer.height-5;(f=this.sceneIns)==null||f.add(this.rulerGroup)}drawWaveFrom(){var e,t,i;this.leadModel.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(e=this.sceneIns)==null||e.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(t=this.sceneIns)==null||t.add(this.rowAndColwaveFromGroup),(i=this.sceneIns)==null||i.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(this.timersCopy),this.drawTimeLine(this.timersCopy),this.drawTopTimeLine(this.timersCopy)}getRednerSinglePoints(){let e=0,t=0;const i=this.waveLists[this.singleModeConfig.defaultSelect]||[];let s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=p.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),a=p.getSens(this.waveConfigs[this.singleModeConfig.defaultSelect].gain,this.gridConfig.cellMg),h=[],d=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let f=0;f<1;f++){e=f*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let l=1;l<=d;l++)t=l*this.splitBlockHeight,l>1&&(t*=.8,s=o,o=s+(this.slidingWindowInfo.points||0)),l===1&&(this.loopArrowY.rowAndCol=t),h.push({pos:[e,t],startInd:s,endInd:o,step:n,sens:a,data:i.slice(s,o).map((r,m)=>this.waveConfigs[this.singleModeConfig.defaultSelect].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[this.singleModeConfig.defaultSelect].leadName)?p.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,r,a/2):p.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,r,a)).map((r,m)=>[m*(n||0),-r])})}return h}createSingleWaveFrom(){var n,a,h;(n=this.singleWaveFromGroup)==null||n.removeAll();let e=this.getRednerSinglePoints(),t=p.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),i=0,s=0,o=0;for(let d=0;d<e.length&&!(e[d].pos[1]>this.drawArea.height+this.bottomAreaHeight);d++)this.isLeadDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx)||(i=parseInt(`${t/1e3/60}`,10),s=parseInt(`${t/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,(a=this.singleWaveFromGroup)==null||a.add(new u.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+d,shape:{points:e[d].data.map(([f,l],r)=>isNaN(l)?(o===0&&(o=r-1,o=o<0?0:o),[e[d].data[o][0]+e[d].pos[0],e[d].data[o][1]+e[d].pos[1]]):(o=0,[f+e[d].pos[0],l+e[d].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:f=>{console.log(11,f)}})),(h=this.singleWaveFromGroup)==null||h.add(new u.Text({cursor:"",style:{x:e[d].pos[0],y:e[d].pos[1]-(e[d].sens||0)/2,text:d===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),d>0&&(t+=t)),this.createLeadName(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-10,e[0].pos[1]+10),this.createLeadOffAndDel(this.waveConfigs[this.singleModeConfig.defaultSelect].leadIdx,e[0].pos[0]-5,e[0].pos[1]-(e[d].sens||0)/2-15);this.singleWaveDataCopy=e,e=null}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}getAddRednerPoints(){const e=[];let t=this.leadHeadConfig.leadHedeWidth,i=0,s=0,o=[],n=0,a=0;for(let h=0;h<this.leadModel.add;h++)s=this.longLeadConfig.leadIdxs[h],this.waveConfigs[s]&&(t=this.waveConfigs[s].addPosX||t,n=p.getStepForSpeed(this.waveConfigs[s].speed,this.gridConfig.cellMg,this.waveConfigs[s].sampleRate),a=p.getSens(this.waveConfigs[s].gain,this.gridConfig.cellMg),i=this.waveConfigs[s].addPosY||(h+this.leadModel.line+1)*this.splitBlockHeight,o=this.waveLists[s]||[],h===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:o.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((d,f)=>this.waveConfigs[s].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?p.getActualY(this.waveConfigs[s].sensitivity,d,a/2):p.getActualY(this.waveConfigs[s].sensitivity,d,a)).map((d,f)=>[f*(n||0),-d]),sens:a,step:n}));return e}createAddWaveFrom(){var i;let e=this.getAddRednerPoints(),t=0;for(let s=0;s<e.length;s++)this.isLeadDel(this.longLeadConfig.leadIdxs[s])||((i=this.addwaveFromGroup)==null||i.add(new u.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[s]+"_"+s,shape:{points:e[s].data.map(([o,n],a)=>isNaN(n)?(t===0&&(t=a-1,t=t<0?0:t),[e[s].data[t][0]+e[s].pos[0],e[s].data[t][1]+e[s].pos[1]]):(t=0,[o+e[s].pos[0],n+e[s].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:o=>{console.log(22,o)}})),this.createLeadName(this.longLeadConfig.leadNames[s],e[s].pos[0],e[s].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[s],e[s].pos[0]-5,e[s].pos[1]-(e[s].sens||0)/2-15));this.addWaveDataCopy=e,e=null}getRednerPoints(){let e=0,t=0,i=0,s=[],o=0,n=0,a=this.slidingWindowInfo.startInd||0,h=this.slidingWindowInfo.endInd||0;const d=[];for(let f=0;f<this.leadModel.column;f++){e=f*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&f>0&&(a=h,h=a+(this.slidingWindowInfo.points||0));for(let l=1;l<=this.leadModel.line&&(t=l*this.splitBlockHeight,!(i>(this.waveLists||[]).length-1));l++)e=this.waveConfigs[i].posX||e,t=this.waveConfigs[i].posY||t,o=p.getStepForSpeed(this.waveConfigs[i].speed,this.gridConfig.cellMg,this.waveConfigs[i].sampleRate),n=p.getSens(this.waveConfigs[i].gain,this.gridConfig.cellMg),s=this.waveLists[i]||[],this.waveConfigs[i]&&(l===1&&(this.loopArrowY.rowAndCol=t),d.push({pos:[e,t],startInd:a,endInd:h,sens:n,step:o,data:s.slice(a,h).map((r,m)=>this.waveConfigs[i].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[i].leadName)?p.getActualY(this.waveConfigs[i].sensitivity,r,n/2):p.getActualY(this.waveConfigs[i].sensitivity,r,n)).map((r,m)=>[m*(o||0),-r])}),i++)}return d}createRowAndColWaveFrom(){var s,o;(s=this.rowAndColwaveFromGroup)==null||s.removeAll();let e=this.getRednerPoints(),t=0,i=0;for(let n=0;n<e.length;n++)t=this.waveConfigs[n].leadIdx||0,this.isLeadDel(t)||(o=this.rowAndColwaveFromGroup)==null||o.add(new u.Polyline({cursor:"",name:n+"_"+n,shape:{points:e[n].data.map(([a,h],d)=>isNaN(h)?(i===0&&(i=d-1,i=i<0?0:i),[e[n].data[i][0]+e[n].pos[0],e[n].data[i][1]+e[n].pos[1]]):(i=0,[a+e[n].pos[0],h+e[n].pos[1]]))},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:a=>{console.log(33,a)}})),n<this.leadModel.line?(this.createLeadName(t,e[n].pos[0],e[n].pos[1]-15),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(e[n].sens||0)/2-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-(e[n].sens||0)/2),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(e[n].sens||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var o;(o=this.leadHeadNameGroup)==null||o.add(new u.Text({style:{x:t,y:i,text:this.leadNames[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:n=>{n.event.preventDefault(),this.$emit("notiifyLeadName",{event:C(w({},n),{name:this.leadNames[e],idx:e}),isAdd:s})},onclick:n=>{this.$emit("notiifyLeadName",{event:C(w({},n),{name:this.leadNames[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new u.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}nativeScrollFunc(e){console.log("event",e,e.target.scrollLeft),this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){const t=p.getPointIdxForPx(e,this.publicStep||1);this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",{slidIdxs:t,scrollLeft:e})}scrollWaveFrom(e){var s,o;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,(s=this.rowAndColwaveFromGroup)==null||s.eachChild((n,a)=>{a=a||0,!(!t[a]||!t[a].data)&&n.attr({shape:{points:t[a].data.map(([h,d])=>[h+t[a].pos[0],d+t[a].pos[1]])}})}),(o=this.addwaveFromGroup)==null||o.eachChild((n,a)=>{a=a||0,!(!i[a]||!i[a].data)&&n.attr({shape:{points:i[a].data.map(([h,d])=>[h+i[a].pos[0],d+i[a].pos[1]])}})}),t=null,i=null}scrollRuler(e){var i,s;(i=this.rulerGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.rulerGroup);const t=p.getDataLenTimes(this.leadModel.isSingleMode?0:e,this.leadModel.publicSampleRate||0)/1e3;this.drawRuler(t),this.drawTimeLine(t),this.drawTopTimeLine(t)}scrollArrow(e){var t,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup)}};g([c.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);g([c.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);g([c.Prop({default:()=>[]})],exports.default.prototype,"waveConfigs",2);g([c.Prop({default:()=>[]})],exports.default.prototype,"waveLists",2);g([c.Prop({default:()=>[]})],exports.default.prototype,"leadNames",2);g([c.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);g([c.Prop({required:!0})],exports.default.prototype,"leadModel",2);g([c.Prop({default:()=>({isShow:!1,gainName:"",speedName:""})})],exports.default.prototype,"rulerConfig",2);g([c.Prop({default:()=>({isShow:!0,sampleRate:500,speed:10,gain:10,startTime:""})})],exports.default.prototype,"timeConfig",2);g([c.Prop({default:()=>({isShow:!1,sampleRate:500,speed:10,gain:10,startTime:"",startLineTime:"",endLineTime:"",color:""})})],exports.default.prototype,"timeLineConfig",2);g([c.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);g([c.Prop({required:!0})],exports.default.prototype,"gridConfig",2);g([c.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);g([c.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeConfig",2);g([c.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);g([c.Prop({default:()=>0})],exports.default.prototype,"dataTotalTimes",2);g([c.Prop({default:()=>0})],exports.default.prototype,"dataTotalLength",2);g([c.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);g([c.Prop({default:()=>0})],exports.default.prototype,"posStart",2);g([p.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);g([p.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=g([A.default({name:"Methods"})],exports.default);
|