costy-plus 1.0.89-0 → 1.0.91-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/EnlargeWaveView/index.vue.d.ts +3 -0
- package/dist/es/src/EnlargeWaveView/index.vue_vue_type_script_lang.js +24 -21
- package/dist/es/src/EnlargeWaveView/index.vue_vue_type_template_lang.js +3 -0
- package/dist/es/src/EnlargeWaveView/medthod.js +1 -1
- package/dist/lib/src/EnlargeWaveView/index.vue.d.ts +3 -0
- package/dist/lib/src/EnlargeWaveView/index.vue_vue_type_script_lang.js +1 -1
- package/dist/lib/src/EnlargeWaveView/index.vue_vue_type_template_lang.js +1 -1
- package/dist/lib/src/EnlargeWaveView/medthod.js +1 -1
- package/package.json +1 -1
|
@@ -4,6 +4,9 @@ declare class EnlargeWaveView extends EnlargeWaveView_base {
|
|
|
4
4
|
protected mounted(): void;
|
|
5
5
|
protected init(): void;
|
|
6
6
|
protected initWaveFormPeer(): void;
|
|
7
|
+
protected notifyMeasuringRuler(params: {
|
|
8
|
+
name: string;
|
|
9
|
+
}): void;
|
|
7
10
|
protected combinationDrawing(): void;
|
|
8
11
|
}
|
|
9
12
|
declare const _sfc_main: typeof EnlargeWaveView;
|
|
@@ -5,19 +5,19 @@ import "element-ui/lib/theme-chalk/descriptions.css";
|
|
|
5
5
|
import "element-ui/lib/theme-chalk/descriptions-item.css";
|
|
6
6
|
import "./style/index.css";
|
|
7
7
|
import "vue";
|
|
8
|
-
import
|
|
8
|
+
import l, { mixins as d } 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";
|
|
9
9
|
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";
|
|
10
|
-
import { Button as a, Checkbox as m, Descriptions as c, DescriptionsItem as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import { Button as a, Checkbox as m, Descriptions as c, DescriptionsItem as h } from "element-ui";
|
|
11
|
+
import u from "../BackgroundGrid/index2.js";
|
|
12
|
+
import f from "../MeasuringRuler/index2.js";
|
|
13
13
|
import { init as g } from "zrender";
|
|
14
|
-
import
|
|
15
|
-
var
|
|
16
|
-
for (var
|
|
17
|
-
(s =
|
|
18
|
-
return r &&
|
|
14
|
+
import v from "./medthod.js";
|
|
15
|
+
var x = Object.defineProperty, w = Object.getOwnPropertyDescriptor, M = (e, i, n, r) => {
|
|
16
|
+
for (var t = r > 1 ? void 0 : r ? w(i, n) : i, o = e.length - 1, s; o >= 0; o--)
|
|
17
|
+
(s = e[o]) && (t = (r ? s(i, n, t) : s(t)) || t);
|
|
18
|
+
return r && t && x(i, n, t), t;
|
|
19
19
|
};
|
|
20
|
-
let
|
|
20
|
+
let p = class extends d(v) {
|
|
21
21
|
mounted() {
|
|
22
22
|
this.init();
|
|
23
23
|
}
|
|
@@ -25,36 +25,39 @@ let h = class extends l(u) {
|
|
|
25
25
|
this.initWaveFormPeer(), this.combinationDrawing();
|
|
26
26
|
}
|
|
27
27
|
initWaveFormPeer() {
|
|
28
|
-
const
|
|
28
|
+
const e = document.getElementById(
|
|
29
29
|
`${this.prefixId}enlarge-wave-from-box`
|
|
30
30
|
);
|
|
31
|
-
this.sceneIns = g(
|
|
31
|
+
this.sceneIns = g(e, {
|
|
32
32
|
width: this.containerWH.width,
|
|
33
33
|
height: this.containerWH.height,
|
|
34
34
|
devicePixelRatio: 2
|
|
35
35
|
});
|
|
36
|
-
const
|
|
36
|
+
const i = document.getElementById(
|
|
37
37
|
`${this.prefixId}MXEnlargeGrid`
|
|
38
38
|
);
|
|
39
|
-
this.AssistCtx =
|
|
39
|
+
this.AssistCtx = i.getContext("2d");
|
|
40
|
+
}
|
|
41
|
+
notifyMeasuringRuler(e) {
|
|
42
|
+
e.name === "contextmenu" && (this.isMeasureRule = !1), this.$emit("notifyMeasuringRuler", e);
|
|
40
43
|
}
|
|
41
44
|
combinationDrawing() {
|
|
42
45
|
this.createLeadHead(), this.createLeadName(), this.createSensAndSpeed(), this.createWaveFrom(), this.drawWaveFrom(), this.drawMeasureLine(), this.calculatedValue(), this.electricAxisAnalyse(), this.processEnlargeAnalysis();
|
|
43
46
|
}
|
|
44
47
|
};
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
p = M([
|
|
49
|
+
l({
|
|
47
50
|
name: "EnlargeWaveView",
|
|
48
51
|
components: {
|
|
49
|
-
MXBackgroundGrid:
|
|
50
|
-
MXMeasuringRuler:
|
|
52
|
+
MXBackgroundGrid: u,
|
|
53
|
+
MXMeasuringRuler: f,
|
|
51
54
|
[a.name]: a,
|
|
52
55
|
[m.name]: m,
|
|
53
56
|
[c.name]: c,
|
|
54
|
-
[
|
|
57
|
+
[h.name]: h
|
|
55
58
|
}
|
|
56
59
|
})
|
|
57
|
-
],
|
|
60
|
+
], p);
|
|
58
61
|
export {
|
|
59
|
-
|
|
62
|
+
p as default
|
|
60
63
|
};
|
|
@@ -77,6 +77,9 @@ var s = function() {
|
|
|
77
77
|
"speed-value": e.measurRulerConfig.speed || 0,
|
|
78
78
|
sens: e.measurRulerConfig.sens || 0,
|
|
79
79
|
"prefix-id": e.prefixId
|
|
80
|
+
},
|
|
81
|
+
on: {
|
|
82
|
+
notifyMeasuringRuler: e.notifyMeasuringRuler
|
|
80
83
|
}
|
|
81
84
|
}, e.$listeners)) : e._e()], 1), i("div", {
|
|
82
85
|
staticClass: "table-box",
|
|
@@ -594,7 +594,7 @@ let r = class extends N {
|
|
|
594
594
|
}
|
|
595
595
|
mainBoxDbClick() {
|
|
596
596
|
const e = Date.now();
|
|
597
|
-
e - this.dbClickTime < 400 ? (this.dbClickTime = 0, this.$emit("notifyCancelEnlargr"), this.$emit("update:isShowEnlargeWave", !1), this.isShowSyncAnalyseValue && this.isSyncAnalyseValue && this.$emit("notifyModifyAnalyse", this.modifyAnalysed)) : this.dbClickTime = e;
|
|
597
|
+
e - this.dbClickTime < 400 ? (this.dbClickTime = 0, this.isMeasureRule = !this.isMeasureRule, this.$emit("notifyCancelEnlargr"), this.$emit("update:isShowEnlargeWave", !1), this.isShowSyncAnalyseValue && this.isSyncAnalyseValue && this.$emit("notifyModifyAnalyse", this.modifyAnalysed)) : this.dbClickTime = e;
|
|
598
598
|
}
|
|
599
599
|
};
|
|
600
600
|
l([
|
|
@@ -4,6 +4,9 @@ declare class EnlargeWaveView extends EnlargeWaveView_base {
|
|
|
4
4
|
protected mounted(): void;
|
|
5
5
|
protected init(): void;
|
|
6
6
|
protected initWaveFormPeer(): void;
|
|
7
|
+
protected notifyMeasuringRuler(params: {
|
|
8
|
+
name: string;
|
|
9
|
+
}): void;
|
|
7
10
|
protected combinationDrawing(): void;
|
|
8
11
|
}
|
|
9
12
|
declare const _sfc_main: typeof EnlargeWaveView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("element-ui/lib/theme-chalk/button.css");require("element-ui/lib/theme-chalk/icon.css");require("element-ui/lib/theme-chalk/checkbox.css");require("element-ui/lib/theme-chalk/descriptions.css");require("element-ui/lib/theme-chalk/descriptions-item.css");require("./style/index.css");require("vue");const c=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 e=require("element-ui"),u=require("../BackgroundGrid/index2.js"),l=require("../MeasuringRuler/index2.js"),d=require("zrender"),m=require("./medthod.js");var h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,v=(s,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("element-ui/lib/theme-chalk/button.css");require("element-ui/lib/theme-chalk/icon.css");require("element-ui/lib/theme-chalk/checkbox.css");require("element-ui/lib/theme-chalk/descriptions.css");require("element-ui/lib/theme-chalk/descriptions-item.css");require("./style/index.css");require("vue");const c=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 e=require("element-ui"),u=require("../BackgroundGrid/index2.js"),l=require("../MeasuringRuler/index2.js"),d=require("zrender"),m=require("./medthod.js");var h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,v=(t,s,r,n)=>{for(var i=n>1?void 0:n?p(s,r):s,o=t.length-1,a;o>=0;o--)(a=t[o])&&(i=(n?a(s,r,i):a(i))||i);return n&&i&&h(s,r,i),i};exports.default=class extends c.mixins(m.default){mounted(){this.init()}init(){this.initWaveFormPeer(),this.combinationDrawing()}initWaveFormPeer(){const t=document.getElementById(`${this.prefixId}enlarge-wave-from-box`);this.sceneIns=d.init(t,{width:this.containerWH.width,height:this.containerWH.height,devicePixelRatio:2});const s=document.getElementById(`${this.prefixId}MXEnlargeGrid`);this.AssistCtx=s.getContext("2d")}notifyMeasuringRuler(t){t.name==="contextmenu"&&(this.isMeasureRule=!1),this.$emit("notifyMeasuringRuler",t)}combinationDrawing(){this.createLeadHead(),this.createLeadName(),this.createSensAndSpeed(),this.createWaveFrom(),this.drawWaveFrom(),this.drawMeasureLine(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}};exports.default=v([c.default({name:"EnlargeWaveView",components:{MXBackgroundGrid:u.default,MXMeasuringRuler:l.default,[e.Button.name]:e.Button,[e.Checkbox.name]:e.Checkbox,[e.Descriptions.name]:e.Descriptions,[e.DescriptionsItem.name]:e.DescriptionsItem}})],exports.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var n=function(){var e=this,a=e.$createElement,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var n=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("div",{staticClass:"mx-enlarge-wave_container",class:e.className,style:{width:`${e.width}px`,height:`${e.height}px`},attrs:{id:e.prefixId+"mx-enlarge-wave"}},[i("div",{staticClass:"wave-selects"},[i("div",[e._l(e.leadNames,function(t){return i("el-button",{key:t.val,class:{active:e.leadNameActive.val===t.val},attrs:{size:"mini"},on:{click:function(l){return e.selectLeadName(t)}}},[e._v(" "+e._s(t.name)+" ")])}),i("el-button",{class:{active:e.isMeasureRule},attrs:{size:"mini"},on:{click:e.measureRule}},[e._v(" \u6D4B\u91CF\u5C3A ")])],2),e.isShowSyncAnalyseValue?i("el-checkbox",{model:{value:e.isSyncAnalyseValue,callback:function(t){e.isSyncAnalyseValue=t},expression:"isSyncAnalyseValue"}},[e._v(" \u540C\u6B65\u5206\u6790\u503C ")]):e._e()],1),i("div",{staticClass:"container-box"},[i("div",{staticClass:"main-box",on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.mainBoxDbClick.apply(null,arguments)}}},[i("MXBackgroundGrid",{attrs:{width:e.containerWH.width,height:e.containerWH.height,"grid-config":e.gridConfig,"layer-id":e.prefixId+"MXEnlargeGrid",magnification:e.magnification}}),i("div",{staticClass:"enlarge-wave-from-box_container",attrs:{id:e.prefixId+"enlarge-wave-from-box"}}),e.measurRulerConfig.isShow?i("MXMeasuringRuler",e._g({staticClass:"enlargeWaveView_measuring-ruler",attrs:{config:e.measurRulerConfig.config,width:e.containerWH.width,height:e.containerWH.height,"cell-mg":e.gridConfig.cellMg,"speed-value":e.measurRulerConfig.speed||0,sens:e.measurRulerConfig.sens||0,"prefix-id":e.prefixId},on:{notifyMeasuringRuler:e.notifyMeasuringRuler}},e.$listeners)):e._e()],1),i("div",{staticClass:"table-box",style:{height:`${e.containerWH.height}px`}},[i("div",[i("div",{staticClass:"header"},[e._v(e._s(e.typeClass)+" \u7EFC\u5408\u53C2\u6570\u8868")]),i("el-descriptions",{attrs:{column:1}},e._l(e.AnalyseParameterTable,function(t){return i("el-descriptions-item",{key:t.key,attrs:{label:t.name}},[i("div",{staticClass:"el-descriptions-item__info"},[i("span",[e._v(e._s(e.enlargeAnalysisData&&e.enlargeAnalysisData[t.key]||0))]),i("span",[e._v(e._s(t.unit))])])])}),1)],1)])]),i("div",{staticClass:"operate-box"},[i("div",{staticClass:"operate-box_item"},[i("span",[e._v("\u589E\u76CA")]),i("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-circle-plus-outline",circle:""},on:{click:function(t){return e.toggleGain(!0)}}}),i("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-remove-outline",circle:""},on:{click:function(t){return e.toggleGain(!1)}}})],1),i("div",{staticClass:"operate-box_item"},[i("span",[e._v("\u8D70\u7EB8\u901F\u5EA6")]),i("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-circle-plus-outline",circle:""},on:{click:function(t){return e.toggleSpeeds(!0)}}}),i("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-remove-outline",circle:""},on:{click:function(t){return e.toggleSpeeds(!1)}}})],1)])])},s=[];exports.render=n;exports.staticRenderFns=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var B=Object.defineProperty,D=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var S=(e,t,a)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,c=(e,t)=>{for(var a in t||(t={}))R.call(t,a)&&S(e,a,t[a]);if(P)for(var a of P(t))F.call(t,a)&&S(e,a,t[a]);return e},y=(e,t)=>D(e,M(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const w=require("vue"),b=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/Prop.js"),x=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"),n=require("@costy-plus/utils"),f=require("zrender"),C=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Q=C(w);var T=Object.defineProperty,W=Object.getOwnPropertyDescriptor,l=(e,t,a,s)=>{for(var i=s>1?void 0:s?W(t,a):t,r=e.length-1,u;r>=0;r--)(u=e[r])&&(i=(s?u(t,a,i):u(i))||i);return s&&i&&T(t,a,i),i};exports.default=class extends Q.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=[{key:"QRSd",name:"FQRS\u95F4\u671F",unit:"ms"},{key:"main_peak",name:"FQRS\u632F\u5E45",unit:"uV"}],this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.RR=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.modifyAnalysed=Object.freeze(null),this.measureLineMoveInfo=Object.freeze({x:0,findIdx:0,name:"",offLeftX:0}),this.measureLineList=Object.freeze([]),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.isSyncAnalyseValue=!1,this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0,this.currentLeadAnalyseValue=null,this.complexAnalysisvalue=Object.freeze(null),this.enlargeAnalysisData={},this.difference={timeDifference:0,amplitudeDifference:""},this.isMeasureRule=!1,this.currentDisplayLeadInfo=null}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(a=>a.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,a)=>{var s;return this.activeLeadIdx===a&&((s=this.leadNameIns)==null||s.attr({style:{text:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t]}}),this.leadNameActive={name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}),{name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,r,u,h,d,m,p,A;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(a=this.M1)==null||a.removeAll(),(s=this.M2)==null||s.removeAll(),(i=this.P1)==null||i.removeAll(),(r=this.P2)==null||r.removeAll(),(u=this.R1)==null||u.removeAll(),(h=this.RR)==null||h.removeAll(),(d=this.R2)==null||d.removeAll(),(m=this.T1)==null||m.removeAll(),(p=this.T2)==null||p.removeAll();try{(A=this.sceneIns)==null||A.dispose()}catch(L){}}resetDefaultValue(){this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0}}created(){this.modifyAnalysed=new Map,this.resetDefaultValue(),this.currentGainIdx=this.enlargeGains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.enlargeSpeeds.findIndex(e=>e.value===this.speedValue),this.currentLeadAnalyseValueIdx=this.analyseValue.findIndex(e=>{var t;return e.BeatID===((t=this.activeLeadAnalyseValue)==null?void 0:t.BeatID)}),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.currentLeadAnalyseValue=f.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=f.util.clone(this.analyseValue[0])||null,this.isSyncAnalyseValueCheck&&(this.isSyncAnalyseValue=!0),this.currentDisplayLeadInfo=f.util.clone(this.DisplayLeadInfo),this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i,r;this.enlargeAnalysisData=Object.assign({},y(c({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QRSd:((r=this.currentLeadAnalyseValue)==null?void 0:r.AnabyBeat).qrsd,main_peak:"",QTc:""}))}measureRule(){this.isMeasureRule=!this.isMeasureRule,this.$emit("notifyMeasureRule",{val:this.isMeasureRule,sens:this.currentSens,speed:this.currentSpeedValue})}selectLeadName(e){var t;console.log("params",e),this.$emit("notifyChangeLeadName",e),this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var e,t;if(this.leadHeadConfig.isShowLeadCalibration!==!1){const s=this.containerWH.height/2,i=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((e=this.sceneIns)==null||e.remove(this.leadHeadIns)),this.leadHeadIns=new f.Polyline({cursor:"",shape:{points:[[0+0,0+s],[i+0,0+s],[i+0,-this.currentSens+s],[3*i+0,-this.currentSens+s],[3*i+0,0+s],[4*i+0,0+s]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(t=this.sceneIns)==null||t.add(this.leadHeadIns)}}createLeadName(){var t;let e=this.leadHeadConfig.leadHedeWidth;this.leadHeadConfig.isShowLeadCalibration===!1&&(e=5),this.leadNameIns=new f.Text({style:{x:e,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new f.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new f.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}drawAllLead(){var t,a,s;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new f.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let i=0;i<this.leadNames.length-1;i++){const{beatData:r,startPos:u}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=u,this.waveFromLenPX=r.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new f.Polyline({cursor:"",name:`${i}`,shape:{points:r.map((h,d)=>[d*this.currentStep+this.drawWaveFromX,-h+e])},style:{stroke:this.leadColors[i]||this.leadColors[i%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(s=this.sceneIns)==null||s.add(this.waveFromGroup)}drawSingleLead(){var i,r,u;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=a;const s=this.containerWH.height/2;(r=this.waveFromIns)==null||r.attr({shape:{points:e.map((h,d)=>[d*this.currentStep+this.drawWaveFromX,-h+s])}}),(u=this.waveFromIns)==null||u.show()}getWaveFrom(e,t){var s;e=e!==void 0?e:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val;let a=[];return this.enlargeWaveMode===n.AnalysisMode.CompoundWave?a=(this.complexData[t||0]||[]).slice(this.currentDisplayLeadInfo.startPos,this.currentDisplayLeadInfo.endPos+1):a=(this.normalData[t||0]||[]).slice(this.currentDisplayLeadInfo.startPos,this.currentDisplayLeadInfo.endPos+1),{originData:a,beatData:a.map(i=>n.getActualY(this.sensitivity,i,this.currentSens)),startPos:this.currentDisplayLeadInfo.startPos}}drawMeasureLine(){var t,a,s,i,r,u,h,d;this.measureGroup?(this.measureGroup.removeAll(),(t=this.sceneIns)==null||t.remove(this.measureGroup)):this.measureGroup=new f.Group({name:"measureGroup"}),n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);const e={stroke:"#FF09FF",lineWidth:1.5};e.stroke="blue",this.R1=this.createMeasureLineGroup("Q",((((s=(a=this.currentLeadAnalyseValue)==null?void 0:a.KeyPosByBeat)==null?void 0:s.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.R2=this.createMeasureLineGroup("S",((((r=(i=this.currentLeadAnalyseValue)==null?void 0:i.KeyPosByBeat)==null?void 0:r.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.RR=this.createMeasureLineGroup("R",((((h=(u=this.currentLeadAnalyseValue)==null?void 0:u.KeyPosByBeat)==null?void 0:h.Rpoint)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.RR),(d=this.sceneIns)==null||d.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new f.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new f.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new f.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new f.Text({cursor:"",name:"Text",style:{x:t-7,y:i+12+10,text:e,fontSize:12,fill:"#000",fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1"}})),e!=="M1"&&e!=="M2"&&(this.measureLineList=[...this.measureLineList,{ins:s,x:t}].sort((r,u)=>r.x-u.x)),s}measureLineDrag(e){e.target.name==="M1"||e.target.name==="M2"?this.calculatedValue():this.calcMeasureLineMove(e)}calcMeasureLineMove(e){if(e.target.name!==this.measureLineMoveInfo.name){const a=this.measureLineList.findIndex(s=>s.ins.name===e.target.name);this.measureLineMoveInfo.findIdx=a,this.measureLineMoveInfo.name=e.target.name}if(this.measureLineMoveInfo.findIdx===-1)return;let t=0;if(this.calcMeasureLineOffx(),this.measureLineMoveInfo.findIdx===0){const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t<this.drawWaveFromX||t>a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else if(this.measureLineMoveInfo.findIdx===this.measureLineList.length-1){const a=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(!a)return;if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>this.waveFromLenPX+this.drawWaveFromX||t<a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else{const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1],s=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>a.x+a.ins.x-1.5||t<s.x+s.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}this.measureLineMoveInfo.x=e.target.x}calcMeasureLineOffx(){var t,a,s;const e=Math.round((this.measureLineMoveInfo.offLeftX-this.drawWaveFromX)/this.currentStep)+this.startPos;switch(this.measureLineMoveInfo.name){case"P1":this.currentLeadAnalyseValue.KeyPosByBeat.Pstart=e;break;case"P2":this.currentLeadAnalyseValue.KeyPosByBeat.Pend=e;break;case"Q":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R":this.currentLeadAnalyseValue.KeyPosByBeat.Rpoint=e;break;case"S":this.currentLeadAnalyseValue.KeyPosByBeat.QRSend=e;break;case"T1":this.currentLeadAnalyseValue.KeyPosByBeat.Tstart=e;break;case"T2":this.currentLeadAnalyseValue.KeyPosByBeat.Tend=e;break}if(this.electricAxisAnalyse(),this.processEnlargeAnalysis(),this.isShowSyncAnalyseValue){const i=c(c({},((t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)||{}),this.enlargeAnalysisData);this.modifyAnalysed.set(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,y(c({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i;const e={start_pos:this.startPos,Sensitivity:this.sensitivity,SampleRate:this.sampleRate,longdata:this.longdata};if((this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="Q")&&(this.enlargeAnalysisData.PR=Math.round(n.calcPRInterval(this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2")&&(this.enlargeAnalysisData.Pd=Math.round(n.calcPD(this.currentLeadAnalyseValue.KeyPosByBeat.Pend,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="T2"){const{QT:r,QTC:u}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(this.QtdAlgorithm||1),((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(r),this.enlargeAnalysisData.QTc=Math.round(u||(Array.isArray(this.enlargeAnalysisData.QTc)?this.enlargeAnalysisData.QTc[0]:this.enlargeAnalysisData.QTc))}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.Td=Math.round(n.caclTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,this.sampleRate));const{TA:r}=n.calcTA(y(c({},e),{Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}));this.enlargeAnalysisData.TtypeA=n.toFixedFun(r||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,data:this.longdata}))||"",this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){const{PA:r}=n.calcPA(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(r||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S"){const{qrs_morph_type:r,QA:u,QD:h,RA:d,RD:m,SD:p,RPD:A,SA:L,RPA:v,main_peak:g}=n.calcQRS(y(c({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.main_peak=g!==void 0?n.toFixedFun(Math.abs(g)||0,2):"",this.enlargeAnalysisData.QRStype=r||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(u||0,2),this.enlargeAnalysisData.QD=Math.round(h||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(d||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(m||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(p||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(A||0,2);const I=n.calcSTJA(e.start_pos,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,e.Sensitivity,e.longdata);this.enlargeAnalysisData.STJtypeA=n.toFixedFun(I||0,2),this.enlargeAnalysisData.STstate=n.clacST(I||0,e.longdata)||"";const V=n.calcIaddIIaddIII(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(V,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.SV1Amp=n.toFixedFun(n.calcSv1(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+""}}electricAxisAnalyse(){var a;const e={ComplexData:this.complexData,Data:this.normalData,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,SampleRate:this.sampleRate,Sensitivity:this.sensitivity,leadNameList:this.leadNameList,start_pos:this.startPos};if(this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){this.enlargeAnalysisData.PAxis=n.calcPelectricAxis(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend}));return}const t=()=>{var i,r;let s=Math.abs((((i=this.enlargeAnalysisData)==null?void 0:i.QRSAxis)||0)-(((r=this.enlargeAnalysisData)==null?void 0:r.TAxis)||0));s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart})),t();return}if(this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.TAxis=n.calcTelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend})),t();return}}calculatedValue(){var m,p,A,L;const e=(m=this.M1)==null?void 0:m.childOfName("Line_M1"),t=(p=this.M2)==null?void 0:p.childOfName("Line_M2");if(!e||!t)return;const a=e.shape.x1+(e.transform&&e.transform[4]||0),s=t.shape.x1+(t.transform&&t.transform[4]||0),i=Math.abs(a-s),r=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=r;const u=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),h=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let d=[];if(this.leadNameActive.val===-1?d=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:d=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],h>0&&u>0&&h<=d.length-1&&u<=d.length-1){const g=(Math.abs(d[h][1]-d[u][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=g}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.enlargeGains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender()),this.$emit("notifyToggleGain",this.currentSens);return}this.currentGainIdx>0&&this.currentGainIdx<=this.enlargeGains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender(),this.$emit("notifyToggleGain",this.currentSens))}toggleSpeeds(e){const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification,this.$emit("notifyToggleSpeeds",this.currentSpeedValue)};if(e){this.currentSpeedIdx<this.enlargeSpeeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.enlargeSpeeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var s,i,r,u,h,d,m,p;e?this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatCount)||0})):this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatCount)||0})),this.enlargeAnalysisData.PAxis=((u=(r=this.currentLeadAnalyseValue)==null?void 0:r.AnabyBeat)==null?void 0:u.PAxis)||0,this.enlargeAnalysisData.TAxis=((d=(h=this.currentLeadAnalyseValue)==null?void 0:h.AnabyBeat)==null?void 0:d.TAxis)||0;const t=parseInt(`${1*1e3}`),a=((p=(m=this.currentLeadAnalyseValue)==null?void 0:m.KeyPosByBeat)==null?void 0:p.Rpoint)||0;this.currentDisplayLeadInfo={startPos:a-t<0?0:a-t,endPos:a+t},this.toggleRender()}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom(),this.drawMeasureLine(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1),this.isShowSyncAnalyseValue&&this.isSyncAnalyseValue&&this.$emit("notifyModifyAnalyse",this.modifyAnalysed)):this.dbClickTime=e}};l([o.Prop({default:()=>({startPos:200,endPos:899})})],exports.default.prototype,"DisplayLeadInfo",2);l([o.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);l([o.Prop({default:()=>n.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);l([o.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);l([o.Prop({default:()=>""})],exports.default.prototype,"className",2);l([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);l([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);l([o.Prop({required:!0})],exports.default.prototype,"gridConfig",2);l([o.Prop({required:!0})],exports.default.prototype,"speedValue",2);l([o.Prop({default:1})],exports.default.prototype,"sens",2);l([o.Prop({default:1})],exports.default.prototype,"step",2);l([o.Prop({required:!0})],exports.default.prototype,"sampleRate",2);l([o.Prop({required:!0})],exports.default.prototype,"sensitivity",2);l([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);l([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);l([o.Prop({default:null})],exports.default.prototype,"outLeadNames",2);l([o.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);l([o.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);l([o.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);l([o.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);l([o.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);l([o.Prop({default:5})],exports.default.prototype,"magnification",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);l([o.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);l([o.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);l([o.Prop({required:!0})],exports.default.prototype,"analyseValue",2);l([o.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);l([o.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);l([o.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);l([o.Prop({required:!0})],exports.default.prototype,"QtdAlgorithm",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);l([x.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);l([x.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);exports.default=l([b.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";var B=Object.defineProperty,D=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var S=(e,t,a)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,c=(e,t)=>{for(var a in t||(t={}))R.call(t,a)&&S(e,a,t[a]);if(P)for(var a of P(t))F.call(t,a)&&S(e,a,t[a]);return e},y=(e,t)=>D(e,M(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const w=require("vue"),b=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/Prop.js"),x=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"),n=require("@costy-plus/utils"),f=require("zrender"),C=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Q=C(w);var T=Object.defineProperty,W=Object.getOwnPropertyDescriptor,l=(e,t,a,s)=>{for(var i=s>1?void 0:s?W(t,a):t,r=e.length-1,u;r>=0;r--)(u=e[r])&&(i=(s?u(t,a,i):u(i))||i);return s&&i&&T(t,a,i),i};exports.default=class extends Q.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=[{key:"QRSd",name:"FQRS\u95F4\u671F",unit:"ms"},{key:"main_peak",name:"FQRS\u632F\u5E45",unit:"uV"}],this.sceneIns=Object.freeze(null),this.AssistCtx=Object.freeze(null),this.leadNameIns=Object.freeze(null),this.sensAndSpeedIns=Object.freeze(null),this.waveFromIns=Object.freeze(null),this.waveFromGroup=Object.freeze(null),this.measureGroup=Object.freeze(null),this.leadHeadIns=Object.freeze(null),this.M1=Object.freeze(null),this.M2=Object.freeze(null),this.P1=Object.freeze(null),this.P2=Object.freeze(null),this.RR=Object.freeze(null),this.R1=Object.freeze(null),this.R2=Object.freeze(null),this.T1=Object.freeze(null),this.T2=Object.freeze(null),this.bottomSafeAreaH=Object.freeze(63),this.drawWaveFromX=Object.freeze(0),this.dbClickTime=Object.freeze(0),this.startPos=Object.freeze(0),this.currentGainIdx=Object.freeze(0),this.currentSpeedIdx=Object.freeze(0),this.currentLeadAnalyseValueIdx=Object.freeze(0),this.longdata=Object.freeze(void 0),this.modifyAnalysed=Object.freeze(null),this.measureLineMoveInfo=Object.freeze({x:0,findIdx:0,name:"",offLeftX:0}),this.measureLineList=Object.freeze([]),this.waveFromLenPX=Object.freeze(0),this.leadNames=[],this.leadNameActive={name:"",val:-2},this.isSyncAnalyseValue=!1,this.currentSens=0,this.currentSpeedValue=0,this.currentStep=0,this.currentLeadAnalyseValue=null,this.complexAnalysisvalue=Object.freeze(null),this.enlargeAnalysisData={},this.difference={timeDifference:0,amplitudeDifference:""},this.isMeasureRule=!1,this.currentDisplayLeadInfo=null}watchActiveLeadIdx(e){var t;this.leadNameActive=this.leadNames.find(a=>a.val===e)||{name:"",val:-2},(t=this.leadNameIns)==null||t.attr({style:{text:this.leadNameActive.name}})}watchLeadNameList(e){this.leadNames=e.map((t,a)=>{var s;return this.activeLeadIdx===a&&((s=this.leadNameIns)==null||s.attr({style:{text:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t]}}),this.leadNameActive={name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}),{name:this.outLeadNames?this.outLeadNames[t]:this.LeadNameTextsPorps[t],val:a}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,r,u,h,d,m,p,A;(e=this.waveFromGroup)==null||e.removeAll(),(t=this.measureGroup)==null||t.removeAll(),(a=this.M1)==null||a.removeAll(),(s=this.M2)==null||s.removeAll(),(i=this.P1)==null||i.removeAll(),(r=this.P2)==null||r.removeAll(),(u=this.R1)==null||u.removeAll(),(h=this.RR)==null||h.removeAll(),(d=this.R2)==null||d.removeAll(),(m=this.T1)==null||m.removeAll(),(p=this.T2)==null||p.removeAll();try{(A=this.sceneIns)==null||A.dispose()}catch(L){}}resetDefaultValue(){this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0}}created(){this.modifyAnalysed=new Map,this.resetDefaultValue(),this.currentGainIdx=this.enlargeGains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.enlargeSpeeds.findIndex(e=>e.value===this.speedValue),this.currentLeadAnalyseValueIdx=this.analyseValue.findIndex(e=>{var t;return e.BeatID===((t=this.activeLeadAnalyseValue)==null?void 0:t.BeatID)}),this.currentSens=this.sens*this.magnification,this.currentSpeedValue=this.speedValue,this.currentStep=this.step*this.magnification,this.currentLeadAnalyseValue=f.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=f.util.clone(this.analyseValue[0])||null,this.isSyncAnalyseValueCheck&&(this.isSyncAnalyseValue=!0),this.currentDisplayLeadInfo=f.util.clone(this.DisplayLeadInfo),this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i,r;this.enlargeAnalysisData=Object.assign({},y(c({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QRSd:((r=this.currentLeadAnalyseValue)==null?void 0:r.AnabyBeat).qrsd,main_peak:"",QTc:""}))}measureRule(){this.isMeasureRule=!this.isMeasureRule,this.$emit("notifyMeasureRule",{val:this.isMeasureRule,sens:this.currentSens,speed:this.currentSpeedValue})}selectLeadName(e){var t;console.log("params",e),this.$emit("notifyChangeLeadName",e),this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var e,t;if(this.leadHeadConfig.isShowLeadCalibration!==!1){const s=this.containerWH.height/2,i=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((e=this.sceneIns)==null||e.remove(this.leadHeadIns)),this.leadHeadIns=new f.Polyline({cursor:"",shape:{points:[[0+0,0+s],[i+0,0+s],[i+0,-this.currentSens+s],[3*i+0,-this.currentSens+s],[3*i+0,0+s],[4*i+0,0+s]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(t=this.sceneIns)==null||t.add(this.leadHeadIns)}}createLeadName(){var t;let e=this.leadHeadConfig.leadHedeWidth;this.leadHeadConfig.isShowLeadCalibration===!1&&(e=5),this.leadNameIns=new f.Text({style:{x:e,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new f.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg/this.magnification}mm/mV ${this.currentSpeedValue}mm/s`,fontSize:12,fill:"#FF0080",fontFamily:this.leadConfig.fontFamily}}),(t=this.sceneIns)==null||t.add(this.sensAndSpeedIns)}createWaveFrom(){var e;this.waveFromIns=new f.Polyline({cursor:"",shape:{points:[]},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}}),(e=this.sceneIns)==null||e.add(this.waveFromIns)}drawWaveFrom(){this.leadNameActive.val===-1?this.drawAllLead():this.drawSingleLead(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}drawAllLead(){var t,a,s;(t=this.waveFromIns)==null||t.hide(),this.waveFromGroup?this.waveFromGroup.removeAll():this.waveFromGroup=new f.Group({name:"waveFromGroup"}),this.longdata=void 0;const e=this.containerWH.height/2;for(let i=0;i<this.leadNames.length-1;i++){const{beatData:r,startPos:u}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=u,this.waveFromLenPX=r.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.waveFromGroup.add(new f.Polyline({cursor:"",name:`${i}`,shape:{points:r.map((h,d)=>[d*this.currentStep+this.drawWaveFromX,-h+e])},style:{stroke:this.leadColors[i]||this.leadColors[i%this.leadColors.length],lineWidth:this.leadConfig.lineWidth}}))}(s=this.sceneIns)==null||s.add(this.waveFromGroup)}drawSingleLead(){var i,r,u;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.waveFromLenPX=e.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth,this.longdata=a;const s=this.containerWH.height/2;(r=this.waveFromIns)==null||r.attr({shape:{points:e.map((h,d)=>[d*this.currentStep+this.drawWaveFromX,-h+s])}}),(u=this.waveFromIns)==null||u.show()}getWaveFrom(e,t){var s;e=e!==void 0?e:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val;let a=[];return this.enlargeWaveMode===n.AnalysisMode.CompoundWave?a=(this.complexData[t||0]||[]).slice(this.currentDisplayLeadInfo.startPos,this.currentDisplayLeadInfo.endPos+1):a=(this.normalData[t||0]||[]).slice(this.currentDisplayLeadInfo.startPos,this.currentDisplayLeadInfo.endPos+1),{originData:a,beatData:a.map(i=>n.getActualY(this.sensitivity,i,this.currentSens)),startPos:this.currentDisplayLeadInfo.startPos}}drawMeasureLine(){var t,a,s,i,r,u,h,d;this.measureGroup?(this.measureGroup.removeAll(),(t=this.sceneIns)==null||t.remove(this.measureGroup)):this.measureGroup=new f.Group({name:"measureGroup"}),n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);const e={stroke:"#FF09FF",lineWidth:1.5};e.stroke="blue",this.R1=this.createMeasureLineGroup("Q",((((s=(a=this.currentLeadAnalyseValue)==null?void 0:a.KeyPosByBeat)==null?void 0:s.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.R2=this.createMeasureLineGroup("S",((((r=(i=this.currentLeadAnalyseValue)==null?void 0:i.KeyPosByBeat)==null?void 0:r.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.RR=this.createMeasureLineGroup("R",((((h=(u=this.currentLeadAnalyseValue)==null?void 0:u.KeyPosByBeat)==null?void 0:h.Rpoint)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,e),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.RR),(d=this.sceneIns)==null||d.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new f.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new f.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new f.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new f.Text({cursor:"",name:"Text",style:{x:t-7,y:i+12+10,text:e,fontSize:12,fill:"#000",fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1"}})),e!=="M1"&&e!=="M2"&&(this.measureLineList=[...this.measureLineList,{ins:s,x:t}].sort((r,u)=>r.x-u.x)),s}measureLineDrag(e){e.target.name==="M1"||e.target.name==="M2"?this.calculatedValue():this.calcMeasureLineMove(e)}calcMeasureLineMove(e){if(e.target.name!==this.measureLineMoveInfo.name){const a=this.measureLineList.findIndex(s=>s.ins.name===e.target.name);this.measureLineMoveInfo.findIdx=a,this.measureLineMoveInfo.name=e.target.name}if(this.measureLineMoveInfo.findIdx===-1)return;let t=0;if(this.calcMeasureLineOffx(),this.measureLineMoveInfo.findIdx===0){const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t<this.drawWaveFromX||t>a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else if(this.measureLineMoveInfo.findIdx===this.measureLineList.length-1){const a=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(!a)return;if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>this.waveFromLenPX+this.drawWaveFromX||t<a.x+a.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}else{const a=this.measureLineList[this.measureLineMoveInfo.findIdx+1],s=this.measureLineList[this.measureLineMoveInfo.findIdx-1];if(t=e.target.childAt(0).shape.x1+e.target.transform[4]||0,this.measureLineMoveInfo.offLeftX=t,t>a.x+a.ins.x-1.5||t<s.x+s.ins.x-1.5){e.target.x=this.measureLineMoveInfo.x,this.measureLineMoveInfo.offLeftX=t;return}}this.measureLineMoveInfo.x=e.target.x}calcMeasureLineOffx(){var t,a,s;const e=Math.round((this.measureLineMoveInfo.offLeftX-this.drawWaveFromX)/this.currentStep)+this.startPos;switch(this.measureLineMoveInfo.name){case"P1":this.currentLeadAnalyseValue.KeyPosByBeat.Pstart=e;break;case"P2":this.currentLeadAnalyseValue.KeyPosByBeat.Pend=e;break;case"Q":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R":this.currentLeadAnalyseValue.KeyPosByBeat.Rpoint=e;break;case"S":this.currentLeadAnalyseValue.KeyPosByBeat.QRSend=e;break;case"T1":this.currentLeadAnalyseValue.KeyPosByBeat.Tstart=e;break;case"T2":this.currentLeadAnalyseValue.KeyPosByBeat.Tend=e;break}if(this.electricAxisAnalyse(),this.processEnlargeAnalysis(),this.isShowSyncAnalyseValue){const i=c(c({},((t=this.currentLeadAnalyseValue)==null?void 0:t.AnabyBeat)||{}),this.enlargeAnalysisData);this.modifyAnalysed.set(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,y(c({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i;const e={start_pos:this.startPos,Sensitivity:this.sensitivity,SampleRate:this.sampleRate,longdata:this.longdata};if((this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="Q")&&(this.enlargeAnalysisData.PR=Math.round(n.calcPRInterval(this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2")&&(this.enlargeAnalysisData.Pd=Math.round(n.calcPD(this.currentLeadAnalyseValue.KeyPosByBeat.Pend,this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,this.sampleRate))),(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="T2"){const{QT:r,QTC:u}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(this.QtdAlgorithm||1),((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(r),this.enlargeAnalysisData.QTc=Math.round(u||(Array.isArray(this.enlargeAnalysisData.QTc)?this.enlargeAnalysisData.QTc[0]:this.enlargeAnalysisData.QTc))}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.Td=Math.round(n.caclTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,this.sampleRate));const{TA:r}=n.calcTA(y(c({},e),{Tstart:this.currentLeadAnalyseValue.KeyPosByBeat.Tstart,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,TPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.TPpeak}));this.enlargeAnalysisData.TtypeA=n.toFixedFun(r||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,data:this.longdata}))||"",this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){const{PA:r}=n.calcPA(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(r||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S"){const{qrs_morph_type:r,QA:u,QD:h,RA:d,RD:m,SD:p,RPD:A,SA:L,RPA:v,main_peak:g}=n.calcQRS(y(c({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.main_peak=g!==void 0?n.toFixedFun(Math.abs(g)||0,2):"",this.enlargeAnalysisData.QRStype=r||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(u||0,2),this.enlargeAnalysisData.QD=Math.round(h||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(d||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(m||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(p||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(A||0,2);const I=n.calcSTJA(e.start_pos,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,e.Sensitivity,e.longdata);this.enlargeAnalysisData.STJtypeA=n.toFixedFun(I||0,2),this.enlargeAnalysisData.STstate=n.clacST(I||0,e.longdata)||"";const V=n.calcIaddIIaddIII(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(V,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.SV1Amp=n.toFixedFun(n.calcSv1(y(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+""}}electricAxisAnalyse(){var a;const e={ComplexData:this.complexData,Data:this.normalData,BeatID:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,AnalyseValue:this.analyseValue,SampleRate:this.sampleRate,Sensitivity:this.sensitivity,leadNameList:this.leadNameList,start_pos:this.startPos};if(this.measureLineMoveInfo.name==="P1"||this.measureLineMoveInfo.name==="P2"){this.enlargeAnalysisData.PAxis=n.calcPelectricAxis(y(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend}));return}const t=()=>{var i,r;let s=Math.abs((((i=this.enlargeAnalysisData)==null?void 0:i.QRSAxis)||0)-(((r=this.enlargeAnalysisData)==null?void 0:r.TAxis)||0));s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="Q"||this.measureLineMoveInfo.name==="S"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart})),t();return}if(this.measureLineMoveInfo.name==="T1"||this.measureLineMoveInfo.name==="T2"){this.enlargeAnalysisData.TAxis=n.calcTelectricAxis(y(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend})),t();return}}calculatedValue(){var m,p,A,L;const e=(m=this.M1)==null?void 0:m.childOfName("Line_M1"),t=(p=this.M2)==null?void 0:p.childOfName("Line_M2");if(!e||!t)return;const a=e.shape.x1+(e.transform&&e.transform[4]||0),s=t.shape.x1+(t.transform&&t.transform[4]||0),i=Math.abs(a-s),r=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=r;const u=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),h=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let d=[];if(this.leadNameActive.val===-1?d=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:d=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],h>0&&u>0&&h<=d.length-1&&u<=d.length-1){const g=(Math.abs(d[h][1]-d[u][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=g}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.enlargeGains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender()),this.$emit("notifyToggleGain",this.currentSens);return}this.currentGainIdx>0&&this.currentGainIdx<=this.enlargeGains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.enlargeGains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender(),this.$emit("notifyToggleGain",this.currentSens))}toggleSpeeds(e){const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification,this.$emit("notifyToggleSpeeds",this.currentSpeedValue)};if(e){this.currentSpeedIdx<this.enlargeSpeeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.enlargeSpeeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.enlargeSpeeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var s,i,r,u,h,d,m,p;e?this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatCount)||0})):this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=y(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((i=this.currentLeadAnalyseValue)==null?void 0:i.BeatCount)||0})),this.enlargeAnalysisData.PAxis=((u=(r=this.currentLeadAnalyseValue)==null?void 0:r.AnabyBeat)==null?void 0:u.PAxis)||0,this.enlargeAnalysisData.TAxis=((d=(h=this.currentLeadAnalyseValue)==null?void 0:h.AnabyBeat)==null?void 0:d.TAxis)||0;const t=parseInt(`${1*1e3}`),a=((p=(m=this.currentLeadAnalyseValue)==null?void 0:m.KeyPosByBeat)==null?void 0:p.Rpoint)||0;this.currentDisplayLeadInfo={startPos:a-t<0?0:a-t,endPos:a+t},this.toggleRender()}toggleRender(){this.resetDefaultValue(),this.createLeadHead(),this.createSensAndSpeed(),this.drawWaveFrom(),this.drawMeasureLine(),this.calculatedValue(),this.electricAxisAnalyse(),this.processEnlargeAnalysis()}mainBoxDbClick(){const e=Date.now();e-this.dbClickTime<400?(this.dbClickTime=0,this.isMeasureRule=!this.isMeasureRule,this.$emit("notifyCancelEnlargr"),this.$emit("update:isShowEnlargeWave",!1),this.isShowSyncAnalyseValue&&this.isSyncAnalyseValue&&this.$emit("notifyModifyAnalyse",this.modifyAnalysed)):this.dbClickTime=e}};l([o.Prop({default:()=>({startPos:200,endPos:899})})],exports.default.prototype,"DisplayLeadInfo",2);l([o.Prop({default:()=>({isShow:!1,speed:0,sens:0})})],exports.default.prototype,"measurRulerConfig",2);l([o.Prop({default:()=>n.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);l([o.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);l([o.Prop({default:()=>""})],exports.default.prototype,"className",2);l([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);l([o.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);l([o.Prop({required:!0})],exports.default.prototype,"gridConfig",2);l([o.Prop({required:!0})],exports.default.prototype,"speedValue",2);l([o.Prop({default:1})],exports.default.prototype,"sens",2);l([o.Prop({default:1})],exports.default.prototype,"step",2);l([o.Prop({required:!0})],exports.default.prototype,"sampleRate",2);l([o.Prop({required:!0})],exports.default.prototype,"sensitivity",2);l([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);l([o.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);l([o.Prop({default:null})],exports.default.prototype,"outLeadNames",2);l([o.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);l([o.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);l([o.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);l([o.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);l([o.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);l([o.Prop({default:5})],exports.default.prototype,"magnification",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);l([o.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);l([o.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);l([o.Prop({required:!0})],exports.default.prototype,"analyseValue",2);l([o.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);l([o.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);l([o.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);l([o.Prop({required:!0})],exports.default.prototype,"QtdAlgorithm",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);l([o.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);l([x.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);l([x.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);exports.default=l([b.default({name:"Methods"})],exports.default);
|