costy-plus 1.0.14-0 → 1.0.15-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/EnlargeWave/index.vue_vue_type_template_lang.js +4 -1
- package/dist/es/src/EnlargeWave/medthod.js +1 -1
- package/dist/es/src/EnlargeWave/style/index.css +2 -0
- package/dist/es/typings/{MXBackgroundGrid.d.ts → BackgroundGrid.d.ts} +0 -0
- package/dist/es/typings/{MXECGWaveComponents.d.ts → EcgWave.d.ts} +0 -0
- package/dist/es/typings/{MXFCGWaveComponents.d.ts → FCGWave.d.ts} +0 -0
- package/dist/es/typings/{MXMeasuringRuler.d.ts → MeasuringRuler.d.ts} +0 -0
- package/dist/es/typings/{MXParallelRuler.d.ts → ParallelRuler.d.ts} +0 -0
- package/dist/lib/src/EnlargeWave/index.vue_vue_type_template_lang.js +1 -1
- package/dist/lib/src/EnlargeWave/medthod.js +1 -1
- package/dist/lib/src/EnlargeWave/style/index.css +2 -0
- package/dist/lib/typings/{MXBackgroundGrid.d.ts → BackgroundGrid.d.ts} +0 -0
- package/dist/lib/typings/{MXECGWaveComponents.d.ts → EcgWave.d.ts} +0 -0
- package/dist/lib/typings/{MXFCGWaveComponents.d.ts → FCGWave.d.ts} +0 -0
- package/dist/lib/typings/{MXMeasuringRuler.d.ts → MeasuringRuler.d.ts} +0 -0
- package/dist/lib/typings/{MXParallelRuler.d.ts → ParallelRuler.d.ts} +0 -0
- package/package.json +3 -2
|
@@ -56,7 +56,10 @@ var c = function() {
|
|
|
56
56
|
id: "enlarge-wave-from-box"
|
|
57
57
|
}
|
|
58
58
|
})], 1), t("div", {
|
|
59
|
-
staticClass: "table-box"
|
|
59
|
+
staticClass: "table-box",
|
|
60
|
+
style: {
|
|
61
|
+
height: `${e.containerWH.height}px`
|
|
62
|
+
}
|
|
60
63
|
}, [t("div", [t("div", {
|
|
61
64
|
staticClass: "header"
|
|
62
65
|
}, [e._v(e._s(e.typeClass) + " \u7EFC\u5408\u53C2\u6570\u8868")]), t("el-descriptions", {
|
|
@@ -483,7 +483,7 @@ let n = class extends K {
|
|
|
483
483
|
BeatID: ((h = this.currentLeadAnalyseValue) == null ? void 0 : h.BeatID) || 0,
|
|
484
484
|
AnalyseValue: this.analyseValue,
|
|
485
485
|
leadNameList: this.leadNameList
|
|
486
|
-
})) || 0, 2) + "", this.enlargeAnalysisData.
|
|
486
|
+
})) || 0, 2) + "", this.enlargeAnalysisData.SV1Amp = y(se(m(c({}, e), {
|
|
487
487
|
ComplexData: this.complexData,
|
|
488
488
|
Data: this.normalData,
|
|
489
489
|
QRSstart: this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var l=function(){var i,n,e=this,s=e.$createElement,t=e._self._c||s;return t("div",{class:e.className,style:{width:`${e.width}px`,height:`${e.height}px`},attrs:{id:"mx-enlarge-wave"}},[t("div",{staticClass:"wave-selects"},[t("div",e._l(e.leadNames,function(a){return t("el-button",{key:a.val,class:{active:e.leadNameActive.val===a.val},attrs:{size:"mini"},on:{click:function(r){return e.selectLeadName(a)}}},[e._v(" "+e._s(a.name)+" ")])}),1),e.isShowSyncAnalyseValue?t("el-checkbox",{model:{value:e.isSyncAnalyseValue,callback:function(a){e.isSyncAnalyseValue=a},expression:"isSyncAnalyseValue"}},[e._v(" \u540C\u6B65\u5206\u6790\u503C ")]):e._e()],1),t("div",{staticClass:"container-box"},[t("div",{staticClass:"main-box",on:{click:function(a){return a.preventDefault(),a.stopPropagation(),e.mainBoxDbClick.apply(null,arguments)}}},[t("MXBackgroundGrid",{attrs:{width:e.containerWH.width,height:e.containerWH.height,"grid-config":e.gridConfig,"layer-id":"MXEnlargeGrid",magnification:e.magnification}}),t("div",{attrs:{id:"enlarge-wave-from-box"}})],1),t("div",{staticClass:"table-box"},[t("div",[t("div",{staticClass:"header"},[e._v(e._s(e.typeClass)+" \u7EFC\u5408\u53C2\u6570\u8868")]),t("el-descriptions",{attrs:{column:1}},[e.enlargeWaveMode===e.AnalysisMode.SelectedHeartbeat?t("el-descriptions-item",{attrs:{label:"\u5FC3\u640F\u5E8F\u53F7"}},[e._v(" "+e._s(((i=e.currentLeadAnalyseValue)===null||i===void 0?void 0:i.BeatID)||0)+" ")]):e._e(),t("el-descriptions-item",{attrs:{label:"\u5FC3\u640F\u4E2A\u6570"}},[e._v(" "+e._s(((n=e.currentLeadAnalyseValue)===null||n===void 0?void 0:n.BeatCount)||0)+" ")]),e.enlargeWaveMode===e.AnalysisMode.CompoundWave?t("el-descriptions-item",{attrs:{label:"\u6A21\u5F0F"}},[e._v(" \u590D\u5408\u6CE2 ")]):e._e(),e._l(e.AnalyseParameterTable,function(a){return t("el-descriptions-item",{key:a.key,attrs:{label:a.name}},[t("div",{staticClass:"el-descriptions-item__info"},[t("span",[e._v(e._s(e.enlargeAnalysisData&&e.enlargeAnalysisData[a.key]||0))]),t("span",[e._v(e._s(a.unit))])])])})],2)],1),t("el-descriptions",{attrs:{column:1}},[t("el-descriptions-item",{attrs:{label:"\u4E8B\u4EF6\u5DEE"}},[e._v(" "+e._s(e.difference.timeDifference)+"ms ")]),t("el-descriptions-item",{attrs:{label:"\u5E45\u503C\u5DEE"}},[e._v(" "+e._s(e.difference.amplitudeDifference)+"mV ")])],1)],1)]),t("div",{staticClass:"operate-box"},[t("div",{staticClass:"operate-box_item"},[t("span",[e._v("\u589E\u76CA")]),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-circle-plus-outline",circle:""},on:{click:function(a){return e.toggleGain(!0)}}}),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-remove-outline",circle:""},on:{click:function(a){return e.toggleGain(!1)}}})],1),t("div",{staticClass:"operate-box_item"},[t("span",[e._v("\u8D70\u7EB8")]),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-circle-plus-outline",circle:""},on:{click:function(a){return e.toggleSpeeds(!0)}}}),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-remove-outline",circle:""},on:{click:function(a){return e.toggleSpeeds(!1)}}})],1),e.enlargeWaveMode===e.AnalysisMode.SelectedHeartbeat?t("div",{staticClass:"operate-box_item"},[t("span",[e._v("\u5FC3\u535A")]),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-arrow-left",circle:""},on:{click:function(a){return e.toggleBeaadId(!1)}}}),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-arrow-right",circle:""},on:{click:function(a){return e.toggleBeaadId(!0)}}})],1):e._e()])])},c=[];exports.render=l;exports.staticRenderFns=c;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var l=function(){var i,n,e=this,s=e.$createElement,t=e._self._c||s;return t("div",{class:e.className,style:{width:`${e.width}px`,height:`${e.height}px`},attrs:{id:"mx-enlarge-wave"}},[t("div",{staticClass:"wave-selects"},[t("div",e._l(e.leadNames,function(a){return t("el-button",{key:a.val,class:{active:e.leadNameActive.val===a.val},attrs:{size:"mini"},on:{click:function(r){return e.selectLeadName(a)}}},[e._v(" "+e._s(a.name)+" ")])}),1),e.isShowSyncAnalyseValue?t("el-checkbox",{model:{value:e.isSyncAnalyseValue,callback:function(a){e.isSyncAnalyseValue=a},expression:"isSyncAnalyseValue"}},[e._v(" \u540C\u6B65\u5206\u6790\u503C ")]):e._e()],1),t("div",{staticClass:"container-box"},[t("div",{staticClass:"main-box",on:{click:function(a){return a.preventDefault(),a.stopPropagation(),e.mainBoxDbClick.apply(null,arguments)}}},[t("MXBackgroundGrid",{attrs:{width:e.containerWH.width,height:e.containerWH.height,"grid-config":e.gridConfig,"layer-id":"MXEnlargeGrid",magnification:e.magnification}}),t("div",{attrs:{id:"enlarge-wave-from-box"}})],1),t("div",{staticClass:"table-box",style:{height:`${e.containerWH.height}px`}},[t("div",[t("div",{staticClass:"header"},[e._v(e._s(e.typeClass)+" \u7EFC\u5408\u53C2\u6570\u8868")]),t("el-descriptions",{attrs:{column:1}},[e.enlargeWaveMode===e.AnalysisMode.SelectedHeartbeat?t("el-descriptions-item",{attrs:{label:"\u5FC3\u640F\u5E8F\u53F7"}},[e._v(" "+e._s(((i=e.currentLeadAnalyseValue)===null||i===void 0?void 0:i.BeatID)||0)+" ")]):e._e(),t("el-descriptions-item",{attrs:{label:"\u5FC3\u640F\u4E2A\u6570"}},[e._v(" "+e._s(((n=e.currentLeadAnalyseValue)===null||n===void 0?void 0:n.BeatCount)||0)+" ")]),e.enlargeWaveMode===e.AnalysisMode.CompoundWave?t("el-descriptions-item",{attrs:{label:"\u6A21\u5F0F"}},[e._v(" \u590D\u5408\u6CE2 ")]):e._e(),e._l(e.AnalyseParameterTable,function(a){return t("el-descriptions-item",{key:a.key,attrs:{label:a.name}},[t("div",{staticClass:"el-descriptions-item__info"},[t("span",[e._v(e._s(e.enlargeAnalysisData&&e.enlargeAnalysisData[a.key]||0))]),t("span",[e._v(e._s(a.unit))])])])})],2)],1),t("el-descriptions",{attrs:{column:1}},[t("el-descriptions-item",{attrs:{label:"\u4E8B\u4EF6\u5DEE"}},[e._v(" "+e._s(e.difference.timeDifference)+"ms ")]),t("el-descriptions-item",{attrs:{label:"\u5E45\u503C\u5DEE"}},[e._v(" "+e._s(e.difference.amplitudeDifference)+"mV ")])],1)],1)]),t("div",{staticClass:"operate-box"},[t("div",{staticClass:"operate-box_item"},[t("span",[e._v("\u589E\u76CA")]),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-circle-plus-outline",circle:""},on:{click:function(a){return e.toggleGain(!0)}}}),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-remove-outline",circle:""},on:{click:function(a){return e.toggleGain(!1)}}})],1),t("div",{staticClass:"operate-box_item"},[t("span",[e._v("\u8D70\u7EB8")]),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-circle-plus-outline",circle:""},on:{click:function(a){return e.toggleSpeeds(!0)}}}),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-remove-outline",circle:""},on:{click:function(a){return e.toggleSpeeds(!1)}}})],1),e.enlargeWaveMode===e.AnalysisMode.SelectedHeartbeat?t("div",{staticClass:"operate-box_item"},[t("span",[e._v("\u5FC3\u535A")]),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-arrow-left",circle:""},on:{click:function(a){return e.toggleBeaadId(!1)}}}),t("el-button",{staticClass:"icon-tips",attrs:{icon:"el-icon-arrow-right",circle:""},on:{click:function(a){return e.toggleBeaadId(!0)}}})],1):e._e()])])},c=[];exports.render=l;exports.staticRenderFns=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty,D=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var S=(e,t,a)=>t in e?M(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(x)for(var a of x(t))w.call(t,a)&&S(e,a,t[a]);return e},m=(e,t)=>D(e,F(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=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_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const l=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),B=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Watch.js"),n=require("@costy-plus/utils"),y=require("zrender"),C=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Q=C(T);var W=Object.defineProperty,G=Object.getOwnPropertyDescriptor,r=(e,t,a,s)=>{for(var i=s>1?void 0:s?G(t,a):t,o=e.length-1,h;o>=0;o--)(h=e[o])&&(i=(s?h(t,a,i):h(i))||i);return s&&i&&W(t,a,i),i};exports.default=class extends Q.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=n.AnalyseParameterTable,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.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=null,this.difference={timeDifference:0,amplitudeDifference:""}}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=>{var a;return this.activeLeadIdx===t&&((a=this.leadNameIns)==null||a.attr({style:{text:n.LeadNameTexts[t]}}),this.leadNameActive={name:n.LeadNameTexts[t],val:t}),{name:n.LeadNameTexts[t],val:t}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,o,h,d,u,f,p;(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(),(o=this.P2)==null||o.removeAll(),(h=this.R1)==null||h.removeAll(),(d=this.R2)==null||d.removeAll(),(u=this.T1)==null||u.removeAll(),(f=this.T2)==null||f.removeAll();try{(p=this.sceneIns)==null||p.dispose()}catch(A){}}created(){this.modifyAnalysed=new Map,this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0},this.currentGainIdx=this.gains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.speeds.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=y.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=y.util.clone(this.analyseValue[0])||null,this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i;this.enlargeAnalysisData=m(c({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.complexAnalysisvalue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.complexAnalysisvalue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QTc:""})}selectLeadName(e){var t;this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var s,i;const t=this.containerWH.height/2,a=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((s=this.sceneIns)==null||s.remove(this.leadHeadIns)),this.leadHeadIns=new y.Polyline({cursor:"",shape:{points:[[0+0,0+t],[a+0,0+t],[a+0,-this.currentSens+t],[3*a+0,-this.currentSens+t],[3*a+0,0+t],[4*a+0,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(i=this.sceneIns)==null||i.add(this.leadHeadIns)}createLeadName(){var e;this.leadNameIns=new y.Text({style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(e=this.sceneIns)==null||e.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new y.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg}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 y.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 y.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:o,startPos:h}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=h,this.drawWaveFromX===0&&(this.waveFromLenPX=o.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth),this.waveFromGroup.add(new y.Polyline({cursor:"",name:`${i}`,shape:{points:o.map((d,u)=>[u*this.currentStep+this.drawWaveFromX,-d+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,o,h;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.drawWaveFromX===0&&(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;(o=this.waveFromIns)==null||o.attr({shape:{points:e.map((d,u)=>[u*this.currentStep+this.drawWaveFromX,-d+s])}}),(h=this.waveFromIns)==null||h.show()}getWaveFrom(e,t){var a;if(e=e!==void 0?e:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val,this.typeClass==="ECG"){const{beatData:s,startPos:i}=n.getLeadpoint({ComplexData:this.complexData,Data:this.normalData,AnalyseValue:this.analyseValue,BeatID:e,leadIdx:t,SampleRate:this.sampleRate});return{originData:s,beatData:s.map(o=>n.getActualY(this.sensitivity,o,this.currentSens)),startPos:i}}return{originData:[],beatData:[],startPos:-1}}drawMeasureLine(){var a,s,i,o,h,d,u,f,p,A,L,g,v,P;this.measureGroup?((a=this.sceneIns)==null||a.remove(this.measureGroup),this.measureGroup.removeAll()):this.measureGroup=new y.Group({name:"measureGroup"});const e=n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification),t={stroke:"#FF09FF",lineWidth:1.5};this.M1=this.createMeasureLineGroup("M1",this.drawWaveFromX+10,t),this.M2=this.createMeasureLineGroup("M2",this.drawWaveFromX+10+e,t),t.stroke="blue",this.P1=this.createMeasureLineGroup("P1",((((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.KeyPosByBeat)==null?void 0:i.Pstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.P2=this.createMeasureLineGroup("P2",((((h=(o=this.currentLeadAnalyseValue)==null?void 0:o.KeyPosByBeat)==null?void 0:h.Pend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R1=this.createMeasureLineGroup("R1",((((u=(d=this.currentLeadAnalyseValue)==null?void 0:d.KeyPosByBeat)==null?void 0:u.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R2=this.createMeasureLineGroup("R2",((((p=(f=this.currentLeadAnalyseValue)==null?void 0:f.KeyPosByBeat)==null?void 0:p.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T1=this.createMeasureLineGroup("T1",((((L=(A=this.currentLeadAnalyseValue)==null?void 0:A.KeyPosByBeat)==null?void 0:L.Tstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T2=this.createMeasureLineGroup("T2",((((v=(g=this.currentLeadAnalyseValue)==null?void 0:g.KeyPosByBeat)==null?void 0:v.Tend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.measureGroup.add(this.M1),this.measureGroup.add(this.M2),this.measureGroup.add(this.P1),this.measureGroup.add(this.P2),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.T1),this.measureGroup.add(this.T2),(P=this.sceneIns)==null||P.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new y.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new y.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new y.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new y.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((o,h)=>o.x-h.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"R1":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R2":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,m(c({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i,o,h;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==="R1")&&(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==="R1"||this.measureLineMoveInfo.name==="R2")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="T2"){const{QT:d,QTC:u}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.QTd_algorithm)||1),((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(d),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:d}=n.calcTA(m(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(d||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(m(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:d}=n.calcPA(m(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(d||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){const{qrs_morph_type:d,QA:u,QD:f,RA:p,RD:A,SD:L,RPD:g,SA:v,RPA:P}=n.calcQRS(m(c({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.QRStype=d||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(u||0,2),this.enlargeAnalysisData.QD=Math.round(f||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(p||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(P||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(A||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(g||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(m(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}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(V,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(m(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((o=this.currentLeadAnalyseValue)==null?void 0:o.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcSv1(m(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((h=this.currentLeadAnalyseValue)==null?void 0:h.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(m(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend}));return}const t=()=>{let s=Math.abs(this.enlargeAnalysisData.QRSAxis-this.enlargeAnalysisData.TAxis);s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(m(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(m(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend})),t();return}}calculatedValue(){var f,p,A,L;const e=(f=this.M1)==null?void 0:f.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),o=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=o;const h=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),d=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let u=[];if(this.leadNameActive.val===-1?u=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:u=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],d>0&&h>0&&d<=u.length-1&&h<=u.length-1){const v=(Math.abs(u[d][1]-u[h][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=v}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.gains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.gains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender());return}this.currentGainIdx>0&&this.currentGainIdx<=this.gains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.gains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender())}toggleSpeeds(e){console.log("toggleSpeed",this.speeds,this.currentSpeedIdx);const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification};if(e){this.currentSpeedIdx<this.speeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.speeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.speeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.speeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var t,a;if(e){this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=m(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatCount)||0}),this.toggleRender());return}this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=m(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatCount)||0}),this.toggleRender())}toggleRender(){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}};r([l.Prop({default:()=>""})],exports.default.prototype,"className",2);r([l.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);r([l.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);r([l.Prop({required:!0})],exports.default.prototype,"gridConfig",2);r([l.Prop({required:!0})],exports.default.prototype,"speedValue",2);r([l.Prop({default:1})],exports.default.prototype,"sens",2);r([l.Prop({default:1})],exports.default.prototype,"step",2);r([l.Prop({required:!0})],exports.default.prototype,"sampleRate",2);r([l.Prop({required:!0})],exports.default.prototype,"sensitivity",2);r([l.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);r([l.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);r([l.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);r([l.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);r([l.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);r([l.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);r([l.Prop({default:5})],exports.default.prototype,"magnification",2);r([l.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);r([l.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);r([l.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);r([l.Prop({required:!0})],exports.default.prototype,"analyseValue",2);r([l.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);r([l.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);r([l.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);r([l.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);r([l.Prop({default:()=>[]})],exports.default.prototype,"gains",2);r([l.Prop({default:()=>[]})],exports.default.prototype,"speeds",2);r([B.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);r([B.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);exports.default=r([b.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";var M=Object.defineProperty,D=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var S=(e,t,a)=>t in e?M(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(x)for(var a of x(t))w.call(t,a)&&S(e,a,t[a]);return e},m=(e,t)=>D(e,F(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=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_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Emit.js");const l=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),B=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Watch.js"),n=require("@costy-plus/utils"),y=require("zrender"),C=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Q=C(T);var W=Object.defineProperty,G=Object.getOwnPropertyDescriptor,r=(e,t,a,s)=>{for(var i=s>1?void 0:s?G(t,a):t,o=e.length-1,h;o>=0;o--)(h=e[o])&&(i=(s?h(t,a,i):h(i))||i);return s&&i&&W(t,a,i),i};exports.default=class extends Q.default{constructor(){super(...arguments),this.AnalysisMode=n.AnalysisMode,this.AnalyseParameterTable=n.AnalyseParameterTable,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.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=null,this.difference={timeDifference:0,amplitudeDifference:""}}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=>{var a;return this.activeLeadIdx===t&&((a=this.leadNameIns)==null||a.attr({style:{text:n.LeadNameTexts[t]}}),this.leadNameActive={name:n.LeadNameTexts[t],val:t}),{name:n.LeadNameTexts[t],val:t}}).concat({name:"ALL",val:-1})}get containerWH(){return{width:this.width-230,height:this.height-40-50}}destroyed(){var e,t,a,s,i,o,h,d,u,f,p;(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(),(o=this.P2)==null||o.removeAll(),(h=this.R1)==null||h.removeAll(),(d=this.R2)==null||d.removeAll(),(u=this.T1)==null||u.removeAll(),(f=this.T2)==null||f.removeAll();try{(p=this.sceneIns)==null||p.dispose()}catch(A){}}created(){this.modifyAnalysed=new Map,this.measureLineList=[],this.measureLineMoveInfo={x:0,findIdx:0,name:"",offLeftX:0},this.currentGainIdx=this.gains.findIndex(e=>e.value===this.sens/this.gridConfig.cellMg),this.currentSpeedIdx=this.speeds.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=y.util.clone(this.activeLeadAnalyseValue),this.complexAnalysisvalue=y.util.clone(this.analyseValue[0])||null,this.processEnlargeAnalysisData()}processEnlargeAnalysisData(){var e,t,a,s,i;this.enlargeAnalysisData=m(c({},((e=this.currentLeadAnalyseValue)==null?void 0:e.AnabyBeat)||{}),{AtrialRate:((a=(t=this.complexAnalysisvalue)==null?void 0:t.AnabyBeat)==null?void 0:a.AtrialRate)||0,VentricularRate:((i=(s=this.complexAnalysisvalue)==null?void 0:s.AnabyBeat)==null?void 0:i.VentricularRate)||0,QTc:""})}selectLeadName(e){var t;this.leadNameActive=e,(t=this.leadNameIns)==null||t.attr({style:{text:e.name}}),this.drawWaveFrom()}createLeadHead(){var s,i;const t=this.containerWH.height/2,a=this.leadHeadConfig.leadHedeWidth/4;this.leadHeadIns&&((s=this.sceneIns)==null||s.remove(this.leadHeadIns)),this.leadHeadIns=new y.Polyline({cursor:"",shape:{points:[[0+0,0+t],[a+0,0+t],[a+0,-this.currentSens+t],[3*a+0,-this.currentSens+t],[3*a+0,0+t],[4*a+0,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}}),(i=this.sceneIns)==null||i.add(this.leadHeadIns)}createLeadName(){var e;this.leadNameIns=new y.Text({style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height/2-this.leadConfig.fontSize,text:this.leadNameActive.name,fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily}}),(e=this.sceneIns)==null||e.add(this.leadNameIns)}createSensAndSpeed(){var e,t;this.sensAndSpeedIns&&((e=this.sceneIns)==null||e.remove(this.sensAndSpeedIns)),this.sensAndSpeedIns=new y.Text({cursor:"",style:{x:this.leadHeadConfig.leadHedeWidth,y:this.containerWH.height-50,text:`${this.currentSens/this.gridConfig.cellMg}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 y.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 y.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:o,startPos:h}=this.getWaveFrom(((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,this.leadNames[i].val);this.startPos=h,this.drawWaveFromX===0&&(this.waveFromLenPX=o.length*this.currentStep,this.drawWaveFromX=this.containerWH.width/2-this.waveFromLenPX/2+this.leadHeadConfig.leadHedeWidth),this.waveFromGroup.add(new y.Polyline({cursor:"",name:`${i}`,shape:{points:o.map((d,u)=>[u*this.currentStep+this.drawWaveFromX,-d+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,o,h;this.waveFromGroup&&((i=this.sceneIns)==null||i.remove(this.waveFromGroup));const{beatData:e,startPos:t,originData:a}=this.getWaveFrom();this.startPos=t,this.drawWaveFromX===0&&(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;(o=this.waveFromIns)==null||o.attr({shape:{points:e.map((d,u)=>[u*this.currentStep+this.drawWaveFromX,-d+s])}}),(h=this.waveFromIns)==null||h.show()}getWaveFrom(e,t){var a;if(e=e!==void 0?e:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatID)||0,t=t!==void 0?t:this.leadNameActive.val,this.typeClass==="ECG"){const{beatData:s,startPos:i}=n.getLeadpoint({ComplexData:this.complexData,Data:this.normalData,AnalyseValue:this.analyseValue,BeatID:e,leadIdx:t,SampleRate:this.sampleRate});return{originData:s,beatData:s.map(o=>n.getActualY(this.sensitivity,o,this.currentSens)),startPos:i}}return{originData:[],beatData:[],startPos:-1}}drawMeasureLine(){var a,s,i,o,h,d,u,f,p,A,L,g,v,P;this.measureGroup?((a=this.sceneIns)==null||a.remove(this.measureGroup),this.measureGroup.removeAll()):this.measureGroup=new y.Group({name:"measureGroup"});const e=n.calcDistance(this.currentSpeedValue,this.gridConfig.cellMg,this.magnification),t={stroke:"#FF09FF",lineWidth:1.5};this.M1=this.createMeasureLineGroup("M1",this.drawWaveFromX+10,t),this.M2=this.createMeasureLineGroup("M2",this.drawWaveFromX+10+e,t),t.stroke="blue",this.P1=this.createMeasureLineGroup("P1",((((i=(s=this.currentLeadAnalyseValue)==null?void 0:s.KeyPosByBeat)==null?void 0:i.Pstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.P2=this.createMeasureLineGroup("P2",((((h=(o=this.currentLeadAnalyseValue)==null?void 0:o.KeyPosByBeat)==null?void 0:h.Pend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R1=this.createMeasureLineGroup("R1",((((u=(d=this.currentLeadAnalyseValue)==null?void 0:d.KeyPosByBeat)==null?void 0:u.QRSstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.R2=this.createMeasureLineGroup("R2",((((p=(f=this.currentLeadAnalyseValue)==null?void 0:f.KeyPosByBeat)==null?void 0:p.QRSend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T1=this.createMeasureLineGroup("T1",((((L=(A=this.currentLeadAnalyseValue)==null?void 0:A.KeyPosByBeat)==null?void 0:L.Tstart)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.T2=this.createMeasureLineGroup("T2",((((v=(g=this.currentLeadAnalyseValue)==null?void 0:g.KeyPosByBeat)==null?void 0:v.Tend)||0)-this.startPos)*this.currentStep+this.drawWaveFromX,t),this.measureGroup.add(this.M1),this.measureGroup.add(this.M2),this.measureGroup.add(this.P1),this.measureGroup.add(this.P2),this.measureGroup.add(this.R1),this.measureGroup.add(this.R2),this.measureGroup.add(this.T1),this.measureGroup.add(this.T2),(P=this.sceneIns)==null||P.add(this.measureGroup)}createMeasureLineGroup(e,t,a){const s=new y.Group({name:e,draggable:"horizontal",ondrag:this.measureLineDrag}),i=this.containerWH.height-this.bottomSafeAreaH;return s.add(new y.Line({cursor:"w-resize",name:`Line_${e}`,shape:{x1:t,y1:0,x2:t,y2:i},style:a})),s.add(new y.Circle({name:"Circle",x:t,y:i,shape:{r:6},style:{fill:"#ccc"}})),s.add(new y.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((o,h)=>o.x-h.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"R1":this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart=e;break;case"R2":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,m(c({},this.currentLeadAnalyseValue),{AnabyBeat:i,BeatID:((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0}))}}processEnlargeAnalysis(){var t,a,s,i,o,h;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==="R1")&&(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==="R1"||this.measureLineMoveInfo.name==="R2")&&(this.enlargeAnalysisData.QRSd=Math.round(n.calcQRSD(this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.sampleRate))),this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="T2"){const{QT:d,QTC:u}=n.calcQTAndQTCAndQTD(this.currentLeadAnalyseValue.KeyPosByBeat.Tend,this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,this.analyseValue,+(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.QTd_algorithm)||1),((s=this.currentLeadAnalyseValue)==null?void 0:s.BeatID)||0,this.sampleRate);this.enlargeAnalysisData.QT=Math.round(d),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:d}=n.calcTA(m(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(d||0,2)}if(this.enlargeAnalysisData.Ptype=n.calcPstate(m(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:d}=n.calcPA(m(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend,PPpeak:this.currentLeadAnalyseValue.KeyPosByBeat.PPpeak}));this.enlargeAnalysisData.PtypeA=n.toFixedFun(d||0,2)}if(this.measureLineMoveInfo.name===""||this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){const{qrs_morph_type:d,QA:u,QD:f,RA:p,RD:A,SD:L,RPD:g,SA:v,RPA:P}=n.calcQRS(m(c({},e),{QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend}));this.enlargeAnalysisData.QRStype=d||"",this.enlargeAnalysisData.QtypeA=n.toFixedFun(u||0,2),this.enlargeAnalysisData.QD=Math.round(f||0),this.enlargeAnalysisData.RtypeA=n.toFixedFun(p||0,2),this.enlargeAnalysisData.StypeA=n.toFixedFun(v||0,2),this.enlargeAnalysisData.RPA=n.toFixedFun(P||0,2),this.enlargeAnalysisData.RD=n.toFixedFun(A||0,2),this.enlargeAnalysisData.SD=n.toFixedFun(L||0,2),this.enlargeAnalysisData.RPD=n.toFixedFun(g||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(m(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}));this.enlargeAnalysisData.IandIIandIII=n.toFixedFun(V,2),this.enlargeAnalysisData.RV5Amp=n.toFixedFun(n.calcRv5(m(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((o=this.currentLeadAnalyseValue)==null?void 0:o.BeatID)||0,AnalyseValue:this.analyseValue,leadNameList:this.leadNameList}))||0,2)+"",this.enlargeAnalysisData.SV1Amp=n.toFixedFun(n.calcSv1(m(c({},e),{ComplexData:this.complexData,Data:this.normalData,QRSstart:this.currentLeadAnalyseValue.KeyPosByBeat.QRSstart,QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,BeatID:((h=this.currentLeadAnalyseValue)==null?void 0:h.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(m(c({},e),{Pstart:this.currentLeadAnalyseValue.KeyPosByBeat.Pstart,Pend:this.currentLeadAnalyseValue.KeyPosByBeat.Pend}));return}const t=()=>{let s=Math.abs(this.enlargeAnalysisData.QRSAxis-this.enlargeAnalysisData.TAxis);s>180&&(s=360-s),this.currentLeadAnalyseValue.AnabyBeat.QRS_T=s};if(this.measureLineMoveInfo.name==="R1"||this.measureLineMoveInfo.name==="R2"){this.enlargeAnalysisData.QRSAxis=n.calcQRSelectricAxis(m(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(m(c({},e),{QRSend:this.currentLeadAnalyseValue.KeyPosByBeat.QRSend,Tend:this.currentLeadAnalyseValue.KeyPosByBeat.Tend})),t();return}}calculatedValue(){var f,p,A,L;const e=(f=this.M1)==null?void 0:f.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),o=n.calcMs(i,this.currentSpeedValue,this.gridConfig.cellMg,this.magnification);this.difference.timeDifference=o;const h=parseInt(`${(a-this.drawWaveFromX)/this.currentStep}`),d=parseInt(`${(s-this.drawWaveFromX)/this.currentStep}`);let u=[];if(this.leadNameActive.val===-1?u=((A=this.waveFromGroup)==null?void 0:A.childAt(this.waveFromGroup.childCount()-1)).shape.points||[]:u=((L=this.waveFromIns)==null?void 0:L.shape.points)||[],d>0&&h>0&&d<=u.length-1&&h<=u.length-1){const v=(Math.abs(u[d][1]-u[h][1])/this.currentSens).toFixed(2);this.difference.amplitudeDifference=v}else this.difference.amplitudeDifference=""}toggleGain(e){if(e){this.currentGainIdx<this.gains.length-1&&(this.currentGainIdx+=1,this.currentSens=this.gains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender());return}this.currentGainIdx>0&&this.currentGainIdx<=this.gains.length-1&&(this.currentGainIdx-=1,this.currentSens=this.gains[this.currentGainIdx].value*this.gridConfig.cellMg*this.magnification,this.toggleRender())}toggleSpeeds(e){console.log("toggleSpeed",this.speeds,this.currentSpeedIdx);const t=()=>{const a=n.getStepForSpeed(this.currentSpeedValue,this.gridConfig.cellMg,this.sampleRate);this.currentStep=a*this.magnification};if(e){this.currentSpeedIdx<this.speeds.length-1&&(this.currentSpeedIdx+=1,this.currentSpeedValue=this.speeds[this.currentSpeedIdx].value,t(),this.toggleRender());return}this.currentSpeedIdx>0&&this.currentSpeedIdx<=this.speeds.length-1&&(this.currentSpeedIdx-=1,this.currentSpeedValue=this.speeds[this.currentSpeedIdx].value,t(),this.toggleRender())}toggleBeaadId(e){var t,a;if(e){this.currentLeadAnalyseValueIdx<this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx+=1,this.currentLeadAnalyseValue=m(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((t=this.currentLeadAnalyseValue)==null?void 0:t.BeatCount)||0}),this.toggleRender());return}this.currentLeadAnalyseValueIdx>1&&this.currentLeadAnalyseValueIdx<=this.analyseValue.length-1&&(this.currentLeadAnalyseValueIdx-=1,this.currentLeadAnalyseValue=m(c({},this.analyseValue[this.currentLeadAnalyseValueIdx]),{BeatCount:((a=this.currentLeadAnalyseValue)==null?void 0:a.BeatCount)||0}),this.toggleRender())}toggleRender(){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}};r([l.Prop({default:()=>""})],exports.default.prototype,"className",2);r([l.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);r([l.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);r([l.Prop({required:!0})],exports.default.prototype,"gridConfig",2);r([l.Prop({required:!0})],exports.default.prototype,"speedValue",2);r([l.Prop({default:1})],exports.default.prototype,"sens",2);r([l.Prop({default:1})],exports.default.prototype,"step",2);r([l.Prop({required:!0})],exports.default.prototype,"sampleRate",2);r([l.Prop({required:!0})],exports.default.prototype,"sensitivity",2);r([l.Prop({required:!0,default:()=>[]})],exports.default.prototype,"complexData",2);r([l.Prop({required:!0,default:()=>[]})],exports.default.prototype,"normalData",2);r([l.Prop({default:!1})],exports.default.prototype,"isShowEnlargeWave",2);r([l.Prop({default:!0})],exports.default.prototype,"isShowSyncAnalyseValue",2);r([l.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);r([l.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);r([l.Prop({default:5})],exports.default.prototype,"magnification",2);r([l.Prop({default:()=>[]})],exports.default.prototype,"leadNameList",2);r([l.Prop({required:!0})],exports.default.prototype,"activeLeadIdx",2);r([l.Prop({required:!0})],exports.default.prototype,"activeLeadAnalyseValue",2);r([l.Prop({required:!0})],exports.default.prototype,"analyseValue",2);r([l.Prop({default:"ECG"})],exports.default.prototype,"typeClass",2);r([l.Prop({default:()=>["black","red","orange","yellow","green","#4B0082","blue","purple","#FFB6C1","#EE82EE","#6A5ACD","#00FFFF"]})],exports.default.prototype,"leadColors",2);r([l.Prop({default:n.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);r([l.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);r([l.Prop({default:()=>[]})],exports.default.prototype,"gains",2);r([l.Prop({default:()=>[]})],exports.default.prototype,"speeds",2);r([B.Watch("activeLeadIdx")],exports.default.prototype,"watchActiveLeadIdx",1);r([B.Watch("leadNameList",{deep:!0,immediate:!0})],exports.default.prototype,"watchLeadNameList",1);exports.default=r([b.default({name:"Methods"})],exports.default);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "costy-plus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15-0",
|
|
4
4
|
"main": "dist/lib/index.js",
|
|
5
5
|
"module": "dist/es/index.js",
|
|
6
|
+
"types": "dist/es/index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"build": "vite build",
|
|
8
9
|
"test": "vitest run"
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
"description": "",
|
|
20
21
|
"typings": "lib/index.d.ts",
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@costy-plus/utils": "0.0.
|
|
23
|
+
"@costy-plus/utils": "0.0.5-0",
|
|
23
24
|
"element-ui": "~2.15.11",
|
|
24
25
|
"vuescroll": "~4.17.5",
|
|
25
26
|
"zrender": "5.4.0"
|