costy-plus 1.0.44-0 → 1.0.46-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/BackgroundGrid/index.vue.d.ts +1 -1
- package/dist/es/src/BackgroundGrid/index.vue_vue_type_script_lang.js +10 -14
- package/dist/es/src/CommonWaveForm/index.vue.d.ts +1 -1
- package/dist/es/src/CommonWaveForm/index.vue_vue_type_script_lang.js +44 -41
- package/dist/es/src/CommonWaveForm/method.js +1 -1
- package/dist/lib/src/BackgroundGrid/index.vue.d.ts +1 -1
- package/dist/lib/src/BackgroundGrid/index.vue_vue_type_script_lang.js +1 -1
- package/dist/lib/src/CommonWaveForm/index.vue.d.ts +1 -1
- package/dist/lib/src/CommonWaveForm/index.vue_vue_type_script_lang.js +1 -1
- package/dist/lib/src/CommonWaveForm/method.js +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ declare class MXBackgroundGrid extends MXBackgroundGrid_base {
|
|
|
7
7
|
protected watchGridConfig(): void;
|
|
8
8
|
protected get cellMg(): number;
|
|
9
9
|
protected mounted(): void;
|
|
10
|
-
protected againInitGrid()
|
|
10
|
+
protected againInitGrid: import("lodash").DebouncedFunc<() => void>;
|
|
11
11
|
protected initGrid(): void;
|
|
12
12
|
protected drawPoints(): void;
|
|
13
13
|
protected drawRowAndCol(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "vue";
|
|
2
2
|
import w, { mixins as m } 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";
|
|
3
3
|
import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
|
|
4
|
-
import { Watch as
|
|
5
|
-
import { debounce as C } from "
|
|
4
|
+
import { Watch 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/Watch.js";
|
|
5
|
+
import { debounce as C } from "lodash";
|
|
6
6
|
import I from "./PropsMinix.js";
|
|
7
7
|
var p = Object.defineProperty, u = Object.getOwnPropertyDescriptor, g = (s, i, t, h) => {
|
|
8
8
|
for (var e = h > 1 ? void 0 : h ? u(i, t) : i, n = s.length - 1, a; n >= 0; n--)
|
|
@@ -11,7 +11,9 @@ var p = Object.defineProperty, u = Object.getOwnPropertyDescriptor, g = (s, i, t
|
|
|
11
11
|
};
|
|
12
12
|
let l = class extends m(I) {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this.canvasIns = Object.freeze(null)
|
|
14
|
+
super(...arguments), this.canvasIns = Object.freeze(null), this.againInitGrid = C(() => {
|
|
15
|
+
this.initGrid();
|
|
16
|
+
}, 100);
|
|
15
17
|
}
|
|
16
18
|
watchWidth() {
|
|
17
19
|
this.againInitGrid();
|
|
@@ -28,9 +30,6 @@ let l = class extends m(I) {
|
|
|
28
30
|
mounted() {
|
|
29
31
|
this.initGrid();
|
|
30
32
|
}
|
|
31
|
-
againInitGrid() {
|
|
32
|
-
this.initGrid();
|
|
33
|
-
}
|
|
34
33
|
initGrid() {
|
|
35
34
|
if (this.canvasIns)
|
|
36
35
|
this.canvasIns.clearRect(0, 0, this.width, this.height);
|
|
@@ -72,7 +71,7 @@ let l = class extends m(I) {
|
|
|
72
71
|
this.afterDrawOver(this.canvasIns);
|
|
73
72
|
}
|
|
74
73
|
drawMesh() {
|
|
75
|
-
var e, n, a, r, o,
|
|
74
|
+
var e, n, a, r, o, d, f, v;
|
|
76
75
|
const s = this.gridConfig.lineWidth === 1 ? 0.5 : 0;
|
|
77
76
|
let i = s, t = s, h = 0;
|
|
78
77
|
for (this.beforeCtxDraw(
|
|
@@ -86,7 +85,7 @@ let l = class extends m(I) {
|
|
|
86
85
|
this.gridConfig.bigCellColor,
|
|
87
86
|
this.gridConfig.lineWidth
|
|
88
87
|
); i < this.width || t < this.height; )
|
|
89
|
-
h % this.cellPoints === 0 && ((o = this.canvasIns) == null || o.moveTo(i, 0), (
|
|
88
|
+
h % this.cellPoints === 0 && ((o = this.canvasIns) == null || o.moveTo(i, 0), (d = this.canvasIns) == null || d.lineTo(i, this.height), (f = this.canvasIns) == null || f.moveTo(0, t), (v = this.canvasIns) == null || v.lineTo(this.width, t)), i < this.width && (i += this.cellMg), t < this.height && (t += this.cellMg), h++;
|
|
90
89
|
this.afterDrawOver(this.canvasIns);
|
|
91
90
|
}
|
|
92
91
|
beforeCtxDraw(s, i, t) {
|
|
@@ -97,17 +96,14 @@ let l = class extends m(I) {
|
|
|
97
96
|
}
|
|
98
97
|
};
|
|
99
98
|
g([
|
|
100
|
-
|
|
99
|
+
c("width")
|
|
101
100
|
], l.prototype, "watchWidth", 1);
|
|
102
101
|
g([
|
|
103
|
-
|
|
102
|
+
c("height")
|
|
104
103
|
], l.prototype, "watchHeight", 1);
|
|
105
104
|
g([
|
|
106
|
-
|
|
105
|
+
c("gridConfig", { deep: !0 })
|
|
107
106
|
], l.prototype, "watchGridConfig", 1);
|
|
108
|
-
g([
|
|
109
|
-
C(200)
|
|
110
|
-
], l.prototype, "againInitGrid", 1);
|
|
111
107
|
l = g([
|
|
112
108
|
w({
|
|
113
109
|
name: "MXBackgroundGrid"
|
|
@@ -10,7 +10,7 @@ declare class CommonWaveForm extends CommonWaveForm_base {
|
|
|
10
10
|
protected watchWidth(): void;
|
|
11
11
|
protected watchHeight(): void;
|
|
12
12
|
protected watchLongLeadConfig(): void;
|
|
13
|
-
protected repaint()
|
|
13
|
+
protected repaint: import("lodash").DebouncedFunc<() => void>;
|
|
14
14
|
created(): void;
|
|
15
15
|
mounted(): void;
|
|
16
16
|
}
|
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
import "./style/index.css";
|
|
2
2
|
import "vue";
|
|
3
|
-
import
|
|
3
|
+
import d, { mixins as l } from "../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js";
|
|
4
4
|
import "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js";
|
|
5
|
-
import { Watch as
|
|
5
|
+
import { Watch as r } from "../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js";
|
|
6
6
|
import c from "../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.7.14/node_modules/vuescroll/dist/vuescroll-native.js";
|
|
7
|
-
import m from "
|
|
7
|
+
import { debounce as m } from "lodash";
|
|
8
|
+
import u from "../MeasuringRuler/index2.js";
|
|
8
9
|
import f from "../MagnifierWave/index.js";
|
|
9
10
|
import g from "../ParallelRuler/index2.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
var
|
|
13
|
-
for (var
|
|
14
|
-
(p = e[h]) && (
|
|
15
|
-
return n &&
|
|
11
|
+
import w from "../BackgroundGrid/index2.js";
|
|
12
|
+
import C from "./method.js";
|
|
13
|
+
var v = Object.defineProperty, L = Object.getOwnPropertyDescriptor, o = (e, i, s, n) => {
|
|
14
|
+
for (var a = n > 1 ? void 0 : n ? L(i, s) : i, h = e.length - 1, p; h >= 0; h--)
|
|
15
|
+
(p = e[h]) && (a = (n ? p(i, s, a) : p(a)) || a);
|
|
16
|
+
return n && a && v(i, s, a), a;
|
|
16
17
|
};
|
|
17
|
-
let t = class extends
|
|
18
|
+
let t = class extends l(C) {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments), this.repaint = m(() => {
|
|
21
|
+
var e, i;
|
|
22
|
+
(e = this.sceneIns) == null || e.clear(), (i = this.sceneIns) == null || i.resize({
|
|
23
|
+
width: this.canvasContainer.width,
|
|
24
|
+
height: this.canvasContainer.height
|
|
25
|
+
}), this.initCreatedConfig(), this.combinationDrawing();
|
|
26
|
+
}, 200);
|
|
27
|
+
}
|
|
18
28
|
watchVuescrollConfig() {
|
|
19
29
|
this.repaint();
|
|
20
30
|
}
|
|
@@ -28,8 +38,8 @@ let t = class extends d(w) {
|
|
|
28
38
|
this.repaint();
|
|
29
39
|
}
|
|
30
40
|
watchLeadHeadConfig() {
|
|
31
|
-
var e,
|
|
32
|
-
(e = this.leadHeadGroup) == null || e.removeAll(), (
|
|
41
|
+
var e, i;
|
|
42
|
+
(e = this.leadHeadGroup) == null || e.removeAll(), (i = this.sceneIns) == null || i.remove(this.leadHeadGroup), this.drawLeadHead();
|
|
33
43
|
}
|
|
34
44
|
watchLeadModel() {
|
|
35
45
|
this.repaint();
|
|
@@ -44,13 +54,6 @@ let t = class extends d(w) {
|
|
|
44
54
|
var e;
|
|
45
55
|
(e = this.sceneIns) == null || e.clear(), this.init();
|
|
46
56
|
}
|
|
47
|
-
repaint() {
|
|
48
|
-
var e, a;
|
|
49
|
-
(e = this.sceneIns) == null || e.clear(), (a = this.sceneIns) == null || a.resize({
|
|
50
|
-
width: this.canvasContainer.width,
|
|
51
|
-
height: this.canvasContainer.height
|
|
52
|
-
}), this.initCreatedConfig(), this.combinationDrawing();
|
|
53
|
-
}
|
|
54
57
|
created() {
|
|
55
58
|
this.initCreatedConfig();
|
|
56
59
|
}
|
|
@@ -58,40 +61,40 @@ let t = class extends d(w) {
|
|
|
58
61
|
this.init();
|
|
59
62
|
}
|
|
60
63
|
};
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
o([
|
|
65
|
+
r("vuescrollConfig", { deep: !0 })
|
|
63
66
|
], t.prototype, "watchVuescrollConfig", 1);
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
o([
|
|
68
|
+
r("analyseValues", { deep: !0 })
|
|
66
69
|
], t.prototype, "watchAnalyseValues", 1);
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
o([
|
|
71
|
+
r("waveConfigs", { deep: !0 })
|
|
69
72
|
], t.prototype, "watchWaveConfigs", 1);
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
o([
|
|
74
|
+
r("waveLists", { deep: !0 })
|
|
72
75
|
], t.prototype, "watchWaveLists", 1);
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
o([
|
|
77
|
+
r("leadHeadConfig", { deep: !0 })
|
|
75
78
|
], t.prototype, "watchLeadHeadConfig", 1);
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
o([
|
|
80
|
+
r("leadModel", { deep: !0 })
|
|
78
81
|
], t.prototype, "watchLeadModel", 1);
|
|
79
|
-
|
|
80
|
-
|
|
82
|
+
o([
|
|
83
|
+
r("width")
|
|
81
84
|
], t.prototype, "watchWidth", 1);
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
o([
|
|
86
|
+
r("height")
|
|
84
87
|
], t.prototype, "watchHeight", 1);
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
o([
|
|
89
|
+
r("longLeadConfig", { deep: !0 })
|
|
87
90
|
], t.prototype, "watchLongLeadConfig", 1);
|
|
88
|
-
t =
|
|
89
|
-
|
|
91
|
+
t = o([
|
|
92
|
+
d({
|
|
90
93
|
name: "CommonWaveForm",
|
|
91
94
|
components: {
|
|
92
95
|
vueScroll: c,
|
|
93
|
-
MXBackgroundGrid:
|
|
94
|
-
MXMeasuringRuler:
|
|
96
|
+
MXBackgroundGrid: w,
|
|
97
|
+
MXMeasuringRuler: u,
|
|
95
98
|
MXParallelRuler: g,
|
|
96
99
|
MXMagnifierWave: f
|
|
97
100
|
}
|
|
@@ -264,7 +264,7 @@ let g = class extends E {
|
|
|
264
264
|
drawColSplitLine() {
|
|
265
265
|
var o, n, l, f, h;
|
|
266
266
|
(o = this.splitLineGroup) == null || o.removeAll(), (n = this.sceneIns) == null || n.remove(this.splitLineGroup);
|
|
267
|
-
const e = (this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / this.leadModel.column;
|
|
267
|
+
const e = (this.drawArea.width - this.leadHeadConfig.leadHedeWidth) / (this.leadModel.column || 1);
|
|
268
268
|
if (this.splitPoint = e, this.leadModel.isSingleMode) {
|
|
269
269
|
const d = W(
|
|
270
270
|
this.waveConfigs[this.singleModeConfig.defaultSelect].speed,
|
|
@@ -7,7 +7,7 @@ declare class MXBackgroundGrid extends MXBackgroundGrid_base {
|
|
|
7
7
|
protected watchGridConfig(): void;
|
|
8
8
|
protected get cellMg(): number;
|
|
9
9
|
protected mounted(): void;
|
|
10
|
-
protected againInitGrid()
|
|
10
|
+
protected againInitGrid: import("lodash").DebouncedFunc<() => void>;
|
|
11
11
|
protected initGrid(): void;
|
|
12
12
|
protected drawPoints(): void;
|
|
13
13
|
protected drawRowAndCol(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("vue");const f=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 d=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),u=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("vue");const f=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 d=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),u=require("lodash"),w=require("./PropsMinix.js");var m=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(s,i,t,e)=>{for(var h=e>1?void 0:e?p(i,t):i,n=s.length-1,o;n>=0;n--)(o=s[n])&&(h=(e?o(i,t,h):o(h))||h);return e&&h&&m(i,t,h),h};exports.default=class extends f.mixins(w.default){constructor(){super(...arguments),this.canvasIns=Object.freeze(null),this.againInitGrid=u.debounce(()=>{this.initGrid()},100)}watchWidth(){this.againInitGrid()}watchHeight(){this.againInitGrid()}watchGridConfig(){this.againInitGrid()}get cellMg(){return this.gridConfig.cellMg*this.magnification}mounted(){this.initGrid()}initGrid(){if(this.canvasIns)this.canvasIns.clearRect(0,0,this.width,this.height);else{const s=document.getElementById(this.layerId);this.canvasIns=s.getContext("2d")}this.model===0?(this.drawPoints(),this.drawRowAndCol()):this.model===1&&this.drawMesh()}drawPoints(){var o,r;let i=this.gridConfig.lineWidth===1?.5:0,t=this.cellMg;const e=[],h=this.magnification>1?this.gridConfig.lineWidth+1:this.gridConfig.lineWidth;for(this.beforeCtxDraw(this.canvasIns,this.gridConfig.smallCellColor,h);t<this.width;)e.push(t),t%this.cellMg===0?t+=h:t+=this.cellMg-h;let n=0;for(;i<this.height;){if(n%this.cellPoints!==0)for(let a=0;a<e.length;a++)(a+2)%this.cellPoints!==0&&a%2===0&&((o=this.canvasIns)==null||o.moveTo(e[a],i),(r=this.canvasIns)==null||r.lineTo(e[a+1],i));i+=this.cellMg,n++}this.afterDrawOver(this.canvasIns)}drawRowAndCol(){var h,n,o,r;const s=this.gridConfig.lineWidth===1?.5:0;let i=s,t=s,e=0;for(this.beforeCtxDraw(this.canvasIns,this.gridConfig.bigCellColor,this.gridConfig.lineWidth);i<this.width||t<this.height;)e%this.cellPoints===0&&((h=this.canvasIns)==null||h.moveTo(i,0),(n=this.canvasIns)==null||n.lineTo(i,this.height),(o=this.canvasIns)==null||o.moveTo(0,t),(r=this.canvasIns)==null||r.lineTo(this.width,t)),i<this.width&&(i+=this.cellMg),t<this.height&&(t+=this.cellMg),e++;this.afterDrawOver(this.canvasIns)}drawMesh(){var h,n,o,r,a,c,g,v;const s=this.gridConfig.lineWidth===1?.5:0;let i=s,t=s,e=0;for(this.beforeCtxDraw(this.canvasIns,this.gridConfig.smallCellColor,this.gridConfig.lineWidth);i<this.width||t<this.height;)e%this.cellPoints!==0&&((h=this.canvasIns)==null||h.moveTo(i,0),(n=this.canvasIns)==null||n.lineTo(i,this.height),(o=this.canvasIns)==null||o.moveTo(0,t),(r=this.canvasIns)==null||r.lineTo(this.width,t)),i<this.width&&(i+=this.cellMg),t<this.height&&(t+=this.cellMg),e++;for(this.afterDrawOver(this.canvasIns),i=t=s,e=0,this.beforeCtxDraw(this.canvasIns,this.gridConfig.bigCellColor,this.gridConfig.lineWidth);i<this.width||t<this.height;)e%this.cellPoints===0&&((a=this.canvasIns)==null||a.moveTo(i,0),(c=this.canvasIns)==null||c.lineTo(i,this.height),(g=this.canvasIns)==null||g.moveTo(0,t),(v=this.canvasIns)==null||v.lineTo(this.width,t)),i<this.width&&(i+=this.cellMg),t<this.height&&(t+=this.cellMg),e++;this.afterDrawOver(this.canvasIns)}beforeCtxDraw(s,i,t){s.save(),s.beginPath(),s.strokeStyle=i,s.lineWidth=t}afterDrawOver(s){s.stroke(),s.restore()}};l([d.Watch("width")],exports.default.prototype,"watchWidth",1);l([d.Watch("height")],exports.default.prototype,"watchHeight",1);l([d.Watch("gridConfig",{deep:!0})],exports.default.prototype,"watchGridConfig",1);exports.default=l([f.default({name:"MXBackgroundGrid"})],exports.default);
|
|
@@ -10,7 +10,7 @@ declare class CommonWaveForm extends CommonWaveForm_base {
|
|
|
10
10
|
protected watchWidth(): void;
|
|
11
11
|
protected watchHeight(): void;
|
|
12
12
|
protected watchLongLeadConfig(): void;
|
|
13
|
-
protected repaint()
|
|
13
|
+
protected repaint: import("lodash").DebouncedFunc<() => void>;
|
|
14
14
|
created(): void;
|
|
15
15
|
mounted(): void;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./style/index.css");require("vue");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./style/index.css");require("vue");const u=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const o=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Watch.js"),l=require("../../node_modules/.pnpm/vuescroll@4.17.5_vue@2.7.14/node_modules/vuescroll/dist/vuescroll-native.js"),c=require("lodash"),h=require("../MeasuringRuler/index2.js"),p=require("../MagnifierWave/index.js"),v=require("../ParallelRuler/index2.js"),f=require("../BackgroundGrid/index2.js"),m=require("./method.js");var g=Object.defineProperty,w=Object.getOwnPropertyDescriptor,a=(e,t,n,s)=>{for(var r=s>1?void 0:s?w(t,n):t,i=e.length-1,d;i>=0;i--)(d=e[i])&&(r=(s?d(t,n,r):d(r))||r);return s&&r&&g(t,n,r),r};exports.default=class extends u.mixins(m.default){constructor(){super(...arguments),this.repaint=c.debounce(()=>{var e,t;(e=this.sceneIns)==null||e.clear(),(t=this.sceneIns)==null||t.resize({width:this.canvasContainer.width,height:this.canvasContainer.height}),this.initCreatedConfig(),this.combinationDrawing()},200)}watchVuescrollConfig(){this.repaint()}watchAnalyseValues(){this.repaint()}watchWaveConfigs(){this.repaint()}watchWaveLists(){this.repaint()}watchLeadHeadConfig(){var e,t;(e=this.leadHeadGroup)==null||e.removeAll(),(t=this.sceneIns)==null||t.remove(this.leadHeadGroup),this.drawLeadHead()}watchLeadModel(){this.repaint()}watchWidth(){this.repaint()}watchHeight(){this.repaint()}watchLongLeadConfig(){var e;(e=this.sceneIns)==null||e.clear(),this.init()}created(){this.initCreatedConfig()}mounted(){this.init()}};a([o.Watch("vuescrollConfig",{deep:!0})],exports.default.prototype,"watchVuescrollConfig",1);a([o.Watch("analyseValues",{deep:!0})],exports.default.prototype,"watchAnalyseValues",1);a([o.Watch("waveConfigs",{deep:!0})],exports.default.prototype,"watchWaveConfigs",1);a([o.Watch("waveLists",{deep:!0})],exports.default.prototype,"watchWaveLists",1);a([o.Watch("leadHeadConfig",{deep:!0})],exports.default.prototype,"watchLeadHeadConfig",1);a([o.Watch("leadModel",{deep:!0})],exports.default.prototype,"watchLeadModel",1);a([o.Watch("width")],exports.default.prototype,"watchWidth",1);a([o.Watch("height")],exports.default.prototype,"watchHeight",1);a([o.Watch("longLeadConfig",{deep:!0})],exports.default.prototype,"watchLongLeadConfig",1);exports.default=a([u.default({name:"CommonWaveForm",components:{vueScroll:l.default,MXBackgroundGrid:f.default,MXMeasuringRuler:h.default,MXParallelRuler:v.default,MXMagnifierWave:p.default}})],exports.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var O=Object.defineProperty,B=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var G=(e,t,i)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,y=(e,t)=>{for(var i in t||(t={}))N.call(t,i)&&G(e,i,t[i]);if(D)for(var i of D(t))k.call(t,i)&&G(e,i,t[i]);return e},F=(e,t)=>B(e,R(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("vue"),z=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),L=require("lodash"),u=require("@costy-plus/utils"),g=require("zrender"),T=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function _(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const $=T(j),X=_(g);var V=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,c=(e,t,i,s)=>{for(var o=s>1?void 0:s?Y(t,i):t,a=e.length-1,n;a>=0;a--)(n=e[a])&&(o=(s?n(t,i,o):n(o))||o);return s&&o&&V(t,i,o),o};exports.default=class extends $.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.range=Object.freeze(5e3),this.heartBeatPosition=[],this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.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,a,n,l,f,h,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(),(a=this.leadHeadNameGroup)==null||a.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(f=this.arrowGroup)==null||f.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.sceneIns)==null||d.dispose()}initCreatedConfig(){this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height,this.initConfig()}init(){this.calcHeartBeatPositions(),this.initWaveFormPeer(),this.combinationDrawing()}combinationDrawing(){this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}calcHeartBeatPositions(){let e=[];for(let t=0;t<this.analyseValues.length;t++){for(let i=1;i<this.analyseValues[t].length;i++)t!==1&&this.analyseValues[t][i].KeyPosByBeat.Rpoint===0||e.push({index:this.analyseValues[t][i].BeatID,position:this.analyseValues[t][i].KeyPosByBeat.Rpoint,heartrate:this.analyseValues[t][i].AnabyBeat.VentricularRate,interval:Math.round(60/this.analyseValues[t][i].AnabyBeat.VentricularRate*1e3),telectricalaxis:this.analyseValues[t][i].AnabyBeat.TAxis===9999?this.range:this.analyseValues[t][i].AnabyBeat.TAxis,qrstCompany:(this.analyseValues[t][i].AnabyBeat.QRS_T===9999?this.range:this.analyseValues[t][i].AnabyBeat.QRS_T)+"\xB0"});this.heartBeatPosition.push(e)}e=null}initSlidingWindowInfo(){const e=this.publicStep||0,t=Math.ceil(this.splitPoint/e);if(this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.scrollConfig.isShow&&!this.leadModel.isSingleMode){const s=u.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:i,startInd:0,endInd:i}}calcHighestAndLowestPoint(){const e=L.flattenDeep(this.waveLists);return{maxPoints:L.max(e)||0,minPoints:L.min(e)||0}}isLeadOff(e){return!!this.waveConfigs[e].isLeadOff}isLeadDel(e){return!!this.waveConfigs[e].isLeadDelete}initConfig(){var t;this.rowAndColwaveFromGroup=new g.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new g.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new g.Group({name:"addwaveFrom"}),this.leadHeadGroup=new g.Group({name:"leadHead"}),this.splitLineGroup=new g.Group({name:"splitLine"}),this.leadHeadNameGroup=new g.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new g.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new g.Group({name:"ruler"}),this.arrowGroup=new g.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new g.Group({name:"heardBeatLine"});let e=this.canvasContainer.width;if(this.leadModel.ecgareawidth===1){const i=u.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=u.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:0,startInd:0,endInd:0},this.addSlidingWindowInfo={points:0,startInd:0,endInd:0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=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.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 a,n,l,f,h;(a=this.leadHeadGroup)==null||a.removeAll(),(n=this.sceneIns)==null||n.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,(l=this.leadHeadGroup)==null||l.add(this.createLeadHead(i,this.waveConfigs[r-1+s].posY||r*this.splitBlockHeight,u.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,(f=this.leadHeadGroup)==null||f.add(this.createLeadHead(i,o.posY||(d+1+this.leadModel.line)*this.splitBlockHeight,u.getSens(o.gain,this.gridConfig.cellMg),t)));o=null,console.log("this.leadHeadGroup",this.leadHeadGroup),(h=this.sceneIns)==null||h.add(this.leadHeadGroup)}createLeadHead(e,t,i,s){const o=this.leadHeadConfig.leadHedeWidth/4;return i=s?i/2:i,new g.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 a,n,l,f,h;(a=this.splitLineGroup)==null||a.removeAll(),(n=this.sceneIns)==null||n.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;if(this.splitPoint=e,this.leadModel.isSingleMode){const d=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),r=u.getDataLenTimes(Math.ceil(this.splitPoint/(d||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)*(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=u.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])?(l=this.splitLineGroup)==null||l.add(this.creatSplitLine(t,((this.waveConfigs||[])[r-1+i].posY||r*this.splitBlockHeight)-(o||0)/2*.5,o,!0)):(f=this.splitLineGroup)==null||f.add(this.creatSplitLine(t,((this.waveConfigs||[])[r-1+i].posY||r*this.splitBlockHeight)-(o||0)*.5,o))}}(h=this.sceneIns)==null||h.add(this.splitLineGroup)}creatSplitLine(e,t,i,s){return new g.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 g.Text({cursor:"",style:y({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new g.Text({style:y({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 n,l,f;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,o=t;const a=u.getStepForSpeed(this.rulerConfig.speed,this.gridConfig.cellMg,this.rulerConfig.sampleRate);if(this.leadModel.isContinuous)o=t*5;else if(!this.leadModel.add&&a){const h=u.getPointIdxForPx(this.splitPoint,a),d=u.getDataLenTimes(h,this.rulerConfig.sampleRate||0)/1e3;o=e+d}for(let h=e;h<=o;h=+(h+.1).toFixed(1))h!==e&&(i+=this.rulerStep),h%1===0?(s=this.canvasContainer.height-10,(n=this.rulerGroup)==null||n.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:h+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(l=this.rulerGroup)==null||l.add(new g.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(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.drawLoopArrow()}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 a=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),n=u.getSens(this.waveConfigs[this.singleModeConfig.defaultSelect].gain,this.gridConfig.cellMg),l=[],f=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let h=0;h<1;h++){e=h*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let d=1;d<=f;d++)t=d*this.splitBlockHeight,d>1&&(t*=.8,s=o,o=s+(this.slidingWindowInfo.points||0)),d===1&&(this.loopArrowY.rowAndCol=t),l.push({pos:[e,t],startInd:s,endInd:o,step:a,sens:n,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)?u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,r,n/2):u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,r,n)).map((r,m)=>[m*(a||0),-r])})}return l}createSingleWaveFrom(){var o,a,n;(o=this.singleWaveFromGroup)==null||o.removeAll();let e=this.getRednerSinglePoints(),t=u.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),i=0,s=0;for(let l=0;l<e.length&&!(e[l].pos[1]>this.drawArea.height+this.bottomAreaHeight);l++)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 g.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+l,shape:{points:e[l].data.map(([f,h])=>[f+e[l].pos[0],h+e[l].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:f=>{this.onDbClickWaveFrom(f,"single")}})),(n=this.singleWaveFromGroup)==null||n.add(new g.Text({cursor:"",style:{x:e[l].pos[0],y:e[l].pos[1]-(e[l].sens||0)/2,text:l===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),l>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[l].sens||0)/2-15);this.singleWaveDataCopy=e,e=null}drawLoopArrow(e=0){var f,h,d,r,m,C,v,H,M,A,P,x;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect]||null,this.drawHeardBeatLine());let t=0,i=0;if(this.leadModel.add){const I=u.getSens(this.waveConfigs[this.longLeadConfig.leadIdxs[0]].gain,this.gridConfig.cellMg);i=this.loopArrowY.add-(I||0)-this.splitBlockHeight/3.5}else i=20;let s=0,o=0;const a={fontSize:12,fill:"red",fontFamily:this.fontFamily},n=u.getStepForSpeed(this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,this.waveConfigs[this.heartFight.showIdxPai].sampleRate);let l=0;for(let I=0;I<(this.heartBeatPosition[this.heartFight.showIdxPai]||[]).length;I++){const p=this.heartBeatPosition[this.heartFight.showIdxPai][I];if(l=((p==null?void 0:p.position)||0)-e,!(e>((p==null?void 0:p.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&l>(this.slidingWindowInfo.points||0))&&!(this.leadModel.isSingleMode&&l>(this.slidingWindowInfo.points||0))){if(((p==null?void 0:p.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=l*(n||0)+this.leadHeadConfig.leadHedeWidth-9.5,o=0,(d=this.arrowGroup)==null||d.add(new g.Polygon({name:"arrow_box",shape:{points:[[4+t,0+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((h=(f=this.currentHeardBeat)==null?void 0:f.heardBeat)==null?void 0:h.index)===(p==null?void 0:p.index)?"blue":"#ccc"},onclick:W=>{var b;!this.heartFight.mode||(W.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(S=>S.name==="arrow_box").forEach(S=>{S.id!==W.target.id&&S.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(p,W.target))}})),this.heartFight.heartrate&&(s=((r=this.AssistCtx)==null?void 0:r.measureText(`${(p==null?void 0:p.heartrate)||""}`).width)||0,(m=this.arrowGroup)==null||m.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:o+i,text:`${(p==null?void 0:p.heartrate)||""}`},a)})),o+=12),this.heartFight.interval&&(s=((C=this.AssistCtx)==null?void 0:C.measureText(`${(p==null?void 0:p.interval)||""}`).width)||0,(v=this.arrowGroup)==null||v.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:o+i,text:`${(p==null?void 0:p.interval)||""}`},a)})),o+=12),this.heartFight.qrstCompany&&(s=((H=this.AssistCtx)==null?void 0:H.measureText(`${(p==null?void 0:p.qrstCompany)||""}`).width)||0,(M=this.arrowGroup)==null||M.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:o+i,text:`${(p==null?void 0:p.qrstCompany)||""}`},a)})),o+=12),this.heartFight.telectricalaxis&&(s=((A=this.AssistCtx)==null?void 0:A.measureText(`${(p==null?void 0:p.telectricalaxis)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:o+i,text:`${(p==null?void 0:p.telectricalaxis)||""}`},a)})))}}(x=this.sceneIns)==null||x.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",g.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,l,f,h,d,r,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t={},i=0,s=this.getRednerPoints(),o=this.getAddRednerPoints(),a;e:for(let C=0;C<s.length;C++){t=((f=this.analyseValues[C])==null?void 0:f[this.currentHeardBeat.heardBeat.index].KeyPosByBeat)||{};for(const v in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(v)&&Object.prototype.hasOwnProperty.call(t,v)){if(i=(t[v]-this.slidingWindowInfo.startInd)*(s[C].step||0),this.isLeadOff(C)||this.isLeadDel(C))continue;if(e>t[v]||!this.leadModel.isContinuous&&t[v]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(a=s[C],this.leadModel.isContinuous&&C>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(a.pos[0]+i,a.pos[1]))}}e:for(let C=0;C<o.length;C++){t=((d=this.analyseValues[C])==null?void 0:d[this.currentHeardBeat.heardBeat.index].KeyPosByBeat)||{};for(const v in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(v)){if(i=(t[v]-this.slidingWindowInfo.startInd)*(o[C].step||0),this.isLeadOff(this.longLeadConfig.leadIdxs[C])&&this.isLeadDel(this.longLeadConfig.leadIdxs[C]))continue;if(e>t[v])break e;a=o[C],(r=this.heardBeatLineGroup)==null||r.add(this.createHeardBeatLine(a.pos[0]+i,a.pos[1]))}}(m=this.sceneIns)==null||m.add(this.heardBeatLineGroup),t=null,s=null,o=null}createHeardBeatLine(e,t){return new g.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}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=[],a=0,n=0;for(let l=0;l<this.leadModel.add;l++)s=this.longLeadConfig.leadIdxs[l],this.waveConfigs[s]&&(t=this.waveConfigs[s].addPosX||t,a=u.getStepForSpeed(this.waveConfigs[s].speed,this.gridConfig.cellMg,this.waveConfigs[s].sampleRate),n=u.getSens(this.waveConfigs[s].gain,this.gridConfig.cellMg),i=this.waveConfigs[s].addPosY||(l+this.leadModel.line+1)*this.splitBlockHeight,o=this.waveLists[s]||[],l===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((f,h)=>this.waveConfigs[s].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?u.getActualY(this.waveConfigs[s].sensitivity,f,n/2):u.getActualY(this.waveConfigs[s].sensitivity,f,n)).map((f,h)=>[h*(a||0),-f]),sens:n,step:a}));return e}createAddWaveFrom(){var t;let e=this.getAddRednerPoints();for(let i=0;i<e.length;i++)this.isLeadDel(this.longLeadConfig.leadIdxs[i])||((t=this.addwaveFromGroup)==null||t.add(new g.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[i]+"_"+i,shape:{points:e[i].data.map(([s,o])=>[s+e[i].pos[0],o+e[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[i],e[i].pos[0],e[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[i],e[i].pos[0]-5,e[i].pos[1]-(e[i].sens||0)/2-15));this.addWaveDataCopy=e,e=null}getRednerPoints(){let e=0,t=0,i=0,s=[],o=0,a=0,n=this.slidingWindowInfo.startInd||0,l=this.slidingWindowInfo.endInd||0;const f=[];for(let h=0;h<this.leadModel.column;h++){e=h*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&h>0&&(n=l,l=n+(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=u.getStepForSpeed(this.waveConfigs[i].speed,this.gridConfig.cellMg,this.waveConfigs[i].sampleRate),a=u.getSens(this.waveConfigs[i].gain,this.gridConfig.cellMg),s=this.waveLists[i]||[],this.waveConfigs[i]&&(d===1&&(this.loopArrowY.rowAndCol=t),f.push({pos:[e,t],startInd:n,endInd:l,sens:a,step:o,data:s.slice(n,l).map((r,m)=>this.waveConfigs[i].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[i].leadName)?u.getActualY(this.waveConfigs[i].sensitivity,r,a/2):u.getActualY(this.waveConfigs[i].sensitivity,r,a)).map((r,m)=>[m*(o||0),-r])}),i++)}return f}createRowAndColWaveFrom(){var i,s;console.time("createRowAndColWaveFrom"),(i=this.rowAndColwaveFromGroup)==null||i.removeAll();let e=this.getRednerPoints(),t=0;for(let o=0;o<e.length;o++)t=this.waveConfigs[o].leadIdx||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new g.Polyline({cursor:"",name:o+"_"+o,shape:{points:e[o].data.map(([a,n])=>[a+e[o].pos[0],n+e[o].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:a=>{this.onDbClickWaveFrom(a,"rowAndCol")}})),o<this.leadModel.line?(this.createLeadName(t,e[o].pos[0],e[o].pos[1]-15),this.createLeadOffAndDel(t,e[o].pos[0]-5,e[o].pos[1]-(e[o].sens||0)/2-15)):(this.createLeadName(t,e[o].pos[0]+5,e[o].pos[1]-(e[o].sens||0)/2),this.createLeadOffAndDel(t,e[o].pos[0]-5,e[o].pos[1]-(e[o].sens||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var o;(o=this.leadHeadNameGroup)==null||o.add(new g.Text({style:{x:t,y:i,text:this.leadNames[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:a=>{a.event.preventDefault(),this.$emit("notiifyLeadName",{event:F(y({},a),{name:this.leadNames[e],idx:e}),isAdd:s})},onclick:a=>{this.$emit("notiifyLeadName",{event:F(y({},a),{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 g.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const i=Date.now(),s=()=>{const o=e.target.name.split("_");this.activeLeadIdx=+o[0];const a=+o[1];let n=0,l=0,f=0,h=0,d=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[a].pos[0],l=this.singleWaveDataCopy[a].startInd,f=u.getPointIdxForPx(n,this.singleWaveDataCopy[a].step||1),h=this.singleWaveDataCopy[a].sens,d=this.singleWaveDataCopy[a].step):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[a].pos[0],l=this.waveDataCopy[a].startInd||0,f=u.getPointIdxForPx(n,this.waveDataCopy[a].step||1),h=this.waveDataCopy[a].sens,d=this.waveDataCopy[a].step):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[a].pos[0],l=this.addWaveDataCopy[a].startInd||0,f=u.getPointIdxForPx(n,this.addWaveDataCopy[a].step||1),h=this.addWaveDataCopy[a].sens,d=this.addWaveDataCopy[a].step),f+=l,this.$emit("notifyActiveEnlargr",{sens:h,step:d,activeLeadIdx:this.activeLeadIdx,pointIdx:f})};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):this.dbClickWaveFromTime=i}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=u.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((a,n)=>{n=n||0,a.attr({shape:{points:t[n].data.map(([l,f])=>[l+t[n].pos[0],f+t[n].pos[1]])}})}),(o=this.addwaveFromGroup)==null||o.eachChild((a,n)=>{n=n||0,a.attr({shape:{points:i[n].data.map(([l,f])=>[l+i[n].pos[0],f+i[n].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=u.getDataLenTimes(this.leadModel.isSingleMode?0:e,this.leadModel.publicSampleRate||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"waveConfigs",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"waveLists",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"leadNames",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"analyseValues",2);c([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([w.Prop({default:()=>({isShow:!1,gainName:"",speedName:""})})],exports.default.prototype,"rulerConfig",2);c([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([w.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,heartRate:60,speed:0,sens:0})})],exports.default.prototype,"paralleRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,speed:0})})],exports.default.prototype,"magnifierRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1,showIdxPai:0})})],exports.default.prototype,"heartFight",2);c([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeConfig",2);c([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);c([w.Prop({default:()=>0})],exports.default.prototype,"dataTotalTimes",2);c([w.Prop({default:()=>0})],exports.default.prototype,"dataTotalLength",2);c([w.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);c([u.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);c([u.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([z.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";var O=Object.defineProperty,B=Object.defineProperties;var R=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var G=(e,t,i)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,y=(e,t)=>{for(var i in t||(t={}))N.call(t,i)&&G(e,i,t[i]);if(D)for(var i of D(t))k.call(t,i)&&G(e,i,t[i]);return e},F=(e,t)=>B(e,R(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("vue"),z=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),L=require("lodash"),u=require("@costy-plus/utils"),g=require("zrender"),T=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function _(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const $=T(j),X=_(g);var V=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,c=(e,t,i,s)=>{for(var o=s>1?void 0:s?Y(t,i):t,a=e.length-1,n;a>=0;a--)(n=e[a])&&(o=(s?n(t,i,o):n(o))||o);return s&&o&&V(t,i,o),o};exports.default=class extends $.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.range=Object.freeze(5e3),this.heartBeatPosition=[],this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.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,a,n,l,f,h,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(),(a=this.leadHeadNameGroup)==null||a.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(f=this.arrowGroup)==null||f.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.sceneIns)==null||d.dispose()}initCreatedConfig(){this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height,this.initConfig()}init(){this.calcHeartBeatPositions(),this.initWaveFormPeer(),this.combinationDrawing()}combinationDrawing(){this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}calcHeartBeatPositions(){let e=[];for(let t=0;t<this.analyseValues.length;t++){for(let i=1;i<this.analyseValues[t].length;i++)t!==1&&this.analyseValues[t][i].KeyPosByBeat.Rpoint===0||e.push({index:this.analyseValues[t][i].BeatID,position:this.analyseValues[t][i].KeyPosByBeat.Rpoint,heartrate:this.analyseValues[t][i].AnabyBeat.VentricularRate,interval:Math.round(60/this.analyseValues[t][i].AnabyBeat.VentricularRate*1e3),telectricalaxis:this.analyseValues[t][i].AnabyBeat.TAxis===9999?this.range:this.analyseValues[t][i].AnabyBeat.TAxis,qrstCompany:(this.analyseValues[t][i].AnabyBeat.QRS_T===9999?this.range:this.analyseValues[t][i].AnabyBeat.QRS_T)+"\xB0"});this.heartBeatPosition.push(e)}e=null}initSlidingWindowInfo(){const e=this.publicStep||0,t=Math.ceil(this.splitPoint/e);if(this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.scrollConfig.isShow&&!this.leadModel.isSingleMode){const s=u.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:i,startInd:0,endInd:i}}calcHighestAndLowestPoint(){const e=L.flattenDeep(this.waveLists);return{maxPoints:L.max(e)||0,minPoints:L.min(e)||0}}isLeadOff(e){return!!this.waveConfigs[e].isLeadOff}isLeadDel(e){return!!this.waveConfigs[e].isLeadDelete}initConfig(){var t;this.rowAndColwaveFromGroup=new g.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new g.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new g.Group({name:"addwaveFrom"}),this.leadHeadGroup=new g.Group({name:"leadHead"}),this.splitLineGroup=new g.Group({name:"splitLine"}),this.leadHeadNameGroup=new g.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new g.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new g.Group({name:"ruler"}),this.arrowGroup=new g.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new g.Group({name:"heardBeatLine"});let e=this.canvasContainer.width;if(this.leadModel.ecgareawidth===1){const i=u.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=u.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:0,startInd:0,endInd:0},this.addSlidingWindowInfo={points:0,startInd:0,endInd:0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=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.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 a,n,l,f,h;(a=this.leadHeadGroup)==null||a.removeAll(),(n=this.sceneIns)==null||n.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,(l=this.leadHeadGroup)==null||l.add(this.createLeadHead(i,this.waveConfigs[r-1+s].posY||r*this.splitBlockHeight,u.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,(f=this.leadHeadGroup)==null||f.add(this.createLeadHead(i,o.posY||(d+1+this.leadModel.line)*this.splitBlockHeight,u.getSens(o.gain,this.gridConfig.cellMg),t)));o=null,console.log("this.leadHeadGroup",this.leadHeadGroup),(h=this.sceneIns)==null||h.add(this.leadHeadGroup)}createLeadHead(e,t,i,s){const o=this.leadHeadConfig.leadHedeWidth/4;return i=s?i/2:i,new g.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 a,n,l,f,h;(a=this.splitLineGroup)==null||a.removeAll(),(n=this.sceneIns)==null||n.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/(this.leadModel.column||1);if(this.splitPoint=e,this.leadModel.isSingleMode){const d=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),r=u.getDataLenTimes(Math.ceil(this.splitPoint/(d||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)*(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=u.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])?(l=this.splitLineGroup)==null||l.add(this.creatSplitLine(t,((this.waveConfigs||[])[r-1+i].posY||r*this.splitBlockHeight)-(o||0)/2*.5,o,!0)):(f=this.splitLineGroup)==null||f.add(this.creatSplitLine(t,((this.waveConfigs||[])[r-1+i].posY||r*this.splitBlockHeight)-(o||0)*.5,o))}}(h=this.sceneIns)==null||h.add(this.splitLineGroup)}creatSplitLine(e,t,i,s){return new g.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 g.Text({cursor:"",style:y({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new g.Text({style:y({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 n,l,f;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,o=t;const a=u.getStepForSpeed(this.rulerConfig.speed,this.gridConfig.cellMg,this.rulerConfig.sampleRate);if(this.leadModel.isContinuous)o=t*5;else if(!this.leadModel.add&&a){const h=u.getPointIdxForPx(this.splitPoint,a),d=u.getDataLenTimes(h,this.rulerConfig.sampleRate||0)/1e3;o=e+d}for(let h=e;h<=o;h=+(h+.1).toFixed(1))h!==e&&(i+=this.rulerStep),h%1===0?(s=this.canvasContainer.height-10,(n=this.rulerGroup)==null||n.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:h+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(l=this.rulerGroup)==null||l.add(new g.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(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.drawLoopArrow()}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 a=u.getStepForSpeed(this.waveConfigs[this.singleModeConfig.defaultSelect].speed,this.gridConfig.cellMg,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate),n=u.getSens(this.waveConfigs[this.singleModeConfig.defaultSelect].gain,this.gridConfig.cellMg),l=[],f=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let h=0;h<1;h++){e=h*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let d=1;d<=f;d++)t=d*this.splitBlockHeight,d>1&&(t*=.8,s=o,o=s+(this.slidingWindowInfo.points||0)),d===1&&(this.loopArrowY.rowAndCol=t),l.push({pos:[e,t],startInd:s,endInd:o,step:a,sens:n,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)?u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,r,n/2):u.getActualY(this.waveConfigs[this.singleModeConfig.defaultSelect].sensitivity,r,n)).map((r,m)=>[m*(a||0),-r])})}return l}createSingleWaveFrom(){var o,a,n;(o=this.singleWaveFromGroup)==null||o.removeAll();let e=this.getRednerSinglePoints(),t=u.getDataLenTimes(this.slidingWindowInfo.points||0,this.waveConfigs[this.singleModeConfig.defaultSelect].sampleRate||0),i=0,s=0;for(let l=0;l<e.length&&!(e[l].pos[1]>this.drawArea.height+this.bottomAreaHeight);l++)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 g.Polyline({cursor:"",name:this.singleModeConfig.defaultSelect+"_"+l,shape:{points:e[l].data.map(([f,h])=>[f+e[l].pos[0],h+e[l].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:f=>{this.onDbClickWaveFrom(f,"single")}})),(n=this.singleWaveFromGroup)==null||n.add(new g.Text({cursor:"",style:{x:e[l].pos[0],y:e[l].pos[1]-(e[l].sens||0)/2,text:l===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),l>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[l].sens||0)/2-15);this.singleWaveDataCopy=e,e=null}drawLoopArrow(e=0){var f,h,d,r,m,C,v,H,M,A,P,x;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=this.heartBeatPosition[this.heartFight.showIdxPai][this.heartFight.defaultSelect]||null,this.drawHeardBeatLine());let t=0,i=0;if(this.leadModel.add){const I=u.getSens(this.waveConfigs[this.longLeadConfig.leadIdxs[0]].gain,this.gridConfig.cellMg);i=this.loopArrowY.add-(I||0)-this.splitBlockHeight/3.5}else i=20;let s=0,o=0;const a={fontSize:12,fill:"red",fontFamily:this.fontFamily},n=u.getStepForSpeed(this.waveConfigs[this.heartFight.showIdxPai].speed,this.gridConfig.cellMg,this.waveConfigs[this.heartFight.showIdxPai].sampleRate);let l=0;for(let I=0;I<(this.heartBeatPosition[this.heartFight.showIdxPai]||[]).length;I++){const p=this.heartBeatPosition[this.heartFight.showIdxPai][I];if(l=((p==null?void 0:p.position)||0)-e,!(e>((p==null?void 0:p.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&l>(this.slidingWindowInfo.points||0))&&!(this.leadModel.isSingleMode&&l>(this.slidingWindowInfo.points||0))){if(((p==null?void 0:p.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=l*(n||0)+this.leadHeadConfig.leadHedeWidth-9.5,o=0,(d=this.arrowGroup)==null||d.add(new g.Polygon({name:"arrow_box",shape:{points:[[4+t,0+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((h=(f=this.currentHeardBeat)==null?void 0:f.heardBeat)==null?void 0:h.index)===(p==null?void 0:p.index)?"blue":"#ccc"},onclick:W=>{var b;!this.heartFight.mode||(W.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(S=>S.name==="arrow_box").forEach(S=>{S.id!==W.target.id&&S.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(p,W.target))}})),this.heartFight.heartrate&&(s=((r=this.AssistCtx)==null?void 0:r.measureText(`${(p==null?void 0:p.heartrate)||""}`).width)||0,(m=this.arrowGroup)==null||m.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:o+i,text:`${(p==null?void 0:p.heartrate)||""}`},a)})),o+=12),this.heartFight.interval&&(s=((C=this.AssistCtx)==null?void 0:C.measureText(`${(p==null?void 0:p.interval)||""}`).width)||0,(v=this.arrowGroup)==null||v.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:o+i,text:`${(p==null?void 0:p.interval)||""}`},a)})),o+=12),this.heartFight.qrstCompany&&(s=((H=this.AssistCtx)==null?void 0:H.measureText(`${(p==null?void 0:p.qrstCompany)||""}`).width)||0,(M=this.arrowGroup)==null||M.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:o+i,text:`${(p==null?void 0:p.qrstCompany)||""}`},a)})),o+=12),this.heartFight.telectricalaxis&&(s=((A=this.AssistCtx)==null?void 0:A.measureText(`${(p==null?void 0:p.telectricalaxis)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new g.Text({cursor:"",style:y({x:4+t-s*1.5,y:o+i,text:`${(p==null?void 0:p.telectricalaxis)||""}`},a)})))}}(x=this.sceneIns)==null||x.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",g.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,l,f,h,d,r,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t={},i=0,s=this.getRednerPoints(),o=this.getAddRednerPoints(),a;e:for(let C=0;C<s.length;C++){t=((f=this.analyseValues[C])==null?void 0:f[this.currentHeardBeat.heardBeat.index].KeyPosByBeat)||{};for(const v in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(v)&&Object.prototype.hasOwnProperty.call(t,v)){if(i=(t[v]-this.slidingWindowInfo.startInd)*(s[C].step||0),this.isLeadOff(C)||this.isLeadDel(C))continue;if(e>t[v]||!this.leadModel.isContinuous&&t[v]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(a=s[C],this.leadModel.isContinuous&&C>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(a.pos[0]+i,a.pos[1]))}}e:for(let C=0;C<o.length;C++){t=((d=this.analyseValues[C])==null?void 0:d[this.currentHeardBeat.heardBeat.index].KeyPosByBeat)||{};for(const v in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(v)){if(i=(t[v]-this.slidingWindowInfo.startInd)*(o[C].step||0),this.isLeadOff(this.longLeadConfig.leadIdxs[C])&&this.isLeadDel(this.longLeadConfig.leadIdxs[C]))continue;if(e>t[v])break e;a=o[C],(r=this.heardBeatLineGroup)==null||r.add(this.createHeardBeatLine(a.pos[0]+i,a.pos[1]))}}(m=this.sceneIns)==null||m.add(this.heardBeatLineGroup),t=null,s=null,o=null}createHeardBeatLine(e,t){return new g.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}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=[],a=0,n=0;for(let l=0;l<this.leadModel.add;l++)s=this.longLeadConfig.leadIdxs[l],this.waveConfigs[s]&&(t=this.waveConfigs[s].addPosX||t,a=u.getStepForSpeed(this.waveConfigs[s].speed,this.gridConfig.cellMg,this.waveConfigs[s].sampleRate),n=u.getSens(this.waveConfigs[s].gain,this.gridConfig.cellMg),i=this.waveConfigs[s].addPosY||(l+this.leadModel.line+1)*this.splitBlockHeight,o=this.waveLists[s]||[],l===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((f,h)=>this.waveConfigs[s].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[s].leadName)?u.getActualY(this.waveConfigs[s].sensitivity,f,n/2):u.getActualY(this.waveConfigs[s].sensitivity,f,n)).map((f,h)=>[h*(a||0),-f]),sens:n,step:a}));return e}createAddWaveFrom(){var t;let e=this.getAddRednerPoints();for(let i=0;i<e.length;i++)this.isLeadDel(this.longLeadConfig.leadIdxs[i])||((t=this.addwaveFromGroup)==null||t.add(new g.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[i]+"_"+i,shape:{points:e[i].data.map(([s,o])=>[s+e[i].pos[0],o+e[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[i],e[i].pos[0],e[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[i],e[i].pos[0]-5,e[i].pos[1]-(e[i].sens||0)/2-15));this.addWaveDataCopy=e,e=null}getRednerPoints(){let e=0,t=0,i=0,s=[],o=0,a=0,n=this.slidingWindowInfo.startInd||0,l=this.slidingWindowInfo.endInd||0;const f=[];for(let h=0;h<this.leadModel.column;h++){e=h*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&h>0&&(n=l,l=n+(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=u.getStepForSpeed(this.waveConfigs[i].speed,this.gridConfig.cellMg,this.waveConfigs[i].sampleRate),a=u.getSens(this.waveConfigs[i].gain,this.gridConfig.cellMg),s=this.waveLists[i]||[],this.waveConfigs[i]&&(d===1&&(this.loopArrowY.rowAndCol=t),f.push({pos:[e,t],startInd:n,endInd:l,sens:a,step:o,data:s.slice(n,l).map((r,m)=>this.waveConfigs[i].leadName==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.waveConfigs[i].leadName)?u.getActualY(this.waveConfigs[i].sensitivity,r,a/2):u.getActualY(this.waveConfigs[i].sensitivity,r,a)).map((r,m)=>[m*(o||0),-r])}),i++)}return f}createRowAndColWaveFrom(){var i,s;console.time("createRowAndColWaveFrom"),(i=this.rowAndColwaveFromGroup)==null||i.removeAll();let e=this.getRednerPoints(),t=0;for(let o=0;o<e.length;o++)t=this.waveConfigs[o].leadIdx||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new g.Polyline({cursor:"",name:o+"_"+o,shape:{points:e[o].data.map(([a,n])=>[a+e[o].pos[0],n+e[o].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:a=>{this.onDbClickWaveFrom(a,"rowAndCol")}})),o<this.leadModel.line?(this.createLeadName(t,e[o].pos[0],e[o].pos[1]-15),this.createLeadOffAndDel(t,e[o].pos[0]-5,e[o].pos[1]-(e[o].sens||0)/2-15)):(this.createLeadName(t,e[o].pos[0]+5,e[o].pos[1]-(e[o].sens||0)/2),this.createLeadOffAndDel(t,e[o].pos[0]-5,e[o].pos[1]-(e[o].sens||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var o;(o=this.leadHeadNameGroup)==null||o.add(new g.Text({style:{x:t,y:i,text:this.leadNames[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:a=>{a.event.preventDefault(),this.$emit("notiifyLeadName",{event:F(y({},a),{name:this.leadNames[e],idx:e}),isAdd:s})},onclick:a=>{this.$emit("notiifyLeadName",{event:F(y({},a),{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 g.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const i=Date.now(),s=()=>{const o=e.target.name.split("_");this.activeLeadIdx=+o[0];const a=+o[1];let n=0,l=0,f=0,h=0,d=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[a].pos[0],l=this.singleWaveDataCopy[a].startInd,f=u.getPointIdxForPx(n,this.singleWaveDataCopy[a].step||1),h=this.singleWaveDataCopy[a].sens,d=this.singleWaveDataCopy[a].step):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[a].pos[0],l=this.waveDataCopy[a].startInd||0,f=u.getPointIdxForPx(n,this.waveDataCopy[a].step||1),h=this.waveDataCopy[a].sens,d=this.waveDataCopy[a].step):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[a].pos[0],l=this.addWaveDataCopy[a].startInd||0,f=u.getPointIdxForPx(n,this.addWaveDataCopy[a].step||1),h=this.addWaveDataCopy[a].sens,d=this.addWaveDataCopy[a].step),f+=l,this.$emit("notifyActiveEnlargr",{sens:h,step:d,activeLeadIdx:this.activeLeadIdx,pointIdx:f})};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):this.dbClickWaveFromTime=i}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=u.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((a,n)=>{n=n||0,a.attr({shape:{points:t[n].data.map(([l,f])=>[l+t[n].pos[0],f+t[n].pos[1]])}})}),(o=this.addwaveFromGroup)==null||o.eachChild((a,n)=>{n=n||0,a.attr({shape:{points:i[n].data.map(([l,f])=>[l+i[n].pos[0],f+i[n].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=u.getDataLenTimes(this.leadModel.isSingleMode?0:e,this.leadModel.publicSampleRate||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"waveConfigs",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"waveLists",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"leadNames",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"analyseValues",2);c([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([w.Prop({default:()=>({isShow:!1,gainName:"",speedName:""})})],exports.default.prototype,"rulerConfig",2);c([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([w.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,heartRate:60,speed:0,sens:0})})],exports.default.prototype,"paralleRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,speed:0})})],exports.default.prototype,"magnifierRulerConfig",2);c([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1,showIdxPai:0})})],exports.default.prototype,"heartFight",2);c([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeConfig",2);c([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);c([w.Prop({default:()=>0})],exports.default.prototype,"dataTotalTimes",2);c([w.Prop({default:()=>0})],exports.default.prototype,"dataTotalLength",2);c([w.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);c([u.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);c([u.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([z.default({name:"Methods"})],exports.default);
|