costy-plus 1.1.1-0 → 1.1.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/src/EcgWave/index.vue_vue_type_template_lang.js +2 -1
- package/dist/es/src/EcgWave/method.d.ts +2 -0
- package/dist/es/src/EcgWave/method.js +5 -0
- package/dist/lib/src/EcgWave/index.vue_vue_type_template_lang.js +1 -1
- package/dist/lib/src/EcgWave/method.d.ts +2 -0
- package/dist/lib/src/EcgWave/method.js +1 -1
- package/package.json +2 -2
|
@@ -84,7 +84,8 @@ var C = function() {
|
|
|
84
84
|
"enlarge-gains": a.enlargeGains,
|
|
85
85
|
"lead-name-texts-porps": a.LeadNameTextsPorps,
|
|
86
86
|
"enlarge-speeds": a.enlargeSpeeds,
|
|
87
|
-
"prefix-id": a.prefixId
|
|
87
|
+
"prefix-id": a.prefixId,
|
|
88
|
+
magnification: a.magnification
|
|
88
89
|
},
|
|
89
90
|
on: {
|
|
90
91
|
"update:isShowEnlargeWave": function(t) {
|
|
@@ -25,6 +25,8 @@ export default class Methods extends Vue {
|
|
|
25
25
|
protected formatEcgData: EcgClass | null;
|
|
26
26
|
protected leadModel: LeadModel;
|
|
27
27
|
protected leadConfig: MXLeadConfig;
|
|
28
|
+
/** 双击波形放大倍数 */
|
|
29
|
+
protected magnification: number;
|
|
28
30
|
protected longLeadConfig: {
|
|
29
31
|
leadIdxs: number[];
|
|
30
32
|
leadNames: number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var C=function(){var i,o,r,l,n,s,d,g,c,v,h,f,m,p,a=this,u=a.$createElement,e=a._self._c||u;return e("div",{style:{width:`${a.width}px`,height:`${a.height}px`},attrs:{id:"ecg-wave-form-main"}},[e("MXBackgroundGrid",{attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"grid-config":a.gridConfig,magnification:a.sceneMagnification,"layer-id":a.prefixId+"MXGrid"}}),a.measurRulerConfig.isShow?e("MeasuringRuler",a._g({staticClass:"measuring-ruler",attrs:{config:a.measurRulerConfig.config,width:a.canvasContainer.width,height:a.canvasContainer.height,"cell-mg":a.gridConfig.cellMg,"speed-value":((i=a.formatEcgData)===null||i===void 0?void 0:i.speed)||0,sens:a.formatEcgData.sens,"prefix-id":a.prefixId}},a.$listeners)):a._e(),a.paralleRulerConfig.isShow?e("MXParallelRuler",a._g({staticClass:"parallel-ruler",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"cell-mg":a.gridConfig.cellMg,"speed-value":((o=a.formatEcgData)===null||o===void 0?void 0:o.speed)||0,sens:a.formatEcgData.sens,"heart-rate":a.ventricularRate,"prefix-id":a.prefixId}},a.$listeners)):a._e(),a.magnifierRulerConfig.isShow?e("MXMagnifierWave",{staticClass:"magnifier-wave",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"grid-config":a.gridConfig,"speed-value":((r=a.formatEcgData)===null||r===void 0?void 0:r.speed)||0,sens:a.formatEcgData.sens,step:((l=a.formatEcgData)===null||l===void 0?void 0:l.step)||0,"lead-head-config":a.leadHeadConfig,"wave-data":a.waveDataCopy,"add-wave-data":a.addWaveDataCopy,"single-wave-data":a.singleWaveDataCopy,"long-lead-config":a.longLeadConfig,"split-block-height":a.splitBlockHeight,"split-point":a.splitPoint,"lead-config":a.leadConfig,"heart-fight":a.heartFight,"normal-lead-names":((n=a.formatEcgData)===null||n===void 0?void 0:n.processedData.otherParams.LeadName)||[],"prefix-id":a.prefixId}}):a._e(),a.isMXEnlargeWaveShow&&a.isShowEnlargeWave?e("MXEnlargeWave",a._g({staticClass:"enlarge-wave",attrs:{"is-show-enlarge-wave":a.isShowEnlargeWave,width:a.MXEnlargeWaveWH.width,height:a.MXEnlargeWaveWH.height,"grid-config":a.gridConfig,"speed-value":((s=a.formatEcgData)===null||s===void 0?void 0:s.speed)||0,sens:a.formatEcgData.sens,step:((d=a.formatEcgData)===null||d===void 0?void 0:d.step)||0,"sample-rate":((g=a.formatEcgData)===null||g===void 0?void 0:g.processedData.otherParams.SampleRate)||0,sensitivity:((c=a.formatEcgData)===null||c===void 0?void 0:c.processedData.otherParams.Sensitivity)||0,"normal-data":((v=a.formatEcgData)===null||v===void 0?void 0:v.processedData.originData.Data)||[],"complex-data":((h=a.formatEcgData)===null||h===void 0?void 0:h.processedData.originData.ComplexData)||[],"lead-name-list":a.leadNameList,"lead-head-config":a.leadHeadConfig,"active-lead-idx":a.activeLeadIdx,"active-lead-analyse-value":a.activeLeadAnalyseValue,"analyse-value":((f=a.formatEcgData)===null||f===void 0?void 0:f.processedData.otherParams.AnalyseValue)||[],"enlarge-wave-mode":a.enlargeWaveMode,"q-td-algorithm":((m=a.conventionalECGConfig)===null||m===void 0||(p=m.ecgReviewSetting)===null||p===void 0?void 0:p.QTd_algorithm)||1,"is-sync-analyse-value-check":a.isSyncAnalyseValueCheck,"enlarge-gains":a.enlargeGains,"lead-name-texts-porps":a.LeadNameTextsPorps,"enlarge-speeds":a.enlargeSpeeds,"prefix-id":a.prefixId},on:{"update:isShowEnlargeWave":function(t){a.isShowEnlargeWave=t},"update:is-show-enlarge-wave":function(t){a.isShowEnlargeWave=t}}},a.$listeners)):a._e(),e("div",{staticClass:"wave-from-box_container",attrs:{id:a.prefixId+"wave-from-box"}}),e("div",{staticClass:"scroll-box",style:{width:`${a.width}px`,height:`${a.height}px`},on:{touchmove:function(t){t.stopPropagation()},touchend:function(t){t.stopPropagation()},touchstart:function(t){t.stopPropagation()}}},[a.scrollConfig.isNativeScroll?e("div",{ref:a.prefixId+"nativeScroll",staticClass:"native-scroll",on:{scroll:a.nativeScrollFunc}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})]):e("vueScroll",{ref:a.prefixId+"vueScroll",attrs:{ops:a.scrollConfig},on:{"handle-scroll":a.handleScroll}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})])],1)],1)},w=[];exports.render=C;exports.staticRenderFns=w;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var C=function(){var i,o,r,l,n,s,d,g,c,v,h,f,m,p,a=this,u=a.$createElement,e=a._self._c||u;return e("div",{style:{width:`${a.width}px`,height:`${a.height}px`},attrs:{id:"ecg-wave-form-main"}},[e("MXBackgroundGrid",{attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"grid-config":a.gridConfig,magnification:a.sceneMagnification,"layer-id":a.prefixId+"MXGrid"}}),a.measurRulerConfig.isShow?e("MeasuringRuler",a._g({staticClass:"measuring-ruler",attrs:{config:a.measurRulerConfig.config,width:a.canvasContainer.width,height:a.canvasContainer.height,"cell-mg":a.gridConfig.cellMg,"speed-value":((i=a.formatEcgData)===null||i===void 0?void 0:i.speed)||0,sens:a.formatEcgData.sens,"prefix-id":a.prefixId}},a.$listeners)):a._e(),a.paralleRulerConfig.isShow?e("MXParallelRuler",a._g({staticClass:"parallel-ruler",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"cell-mg":a.gridConfig.cellMg,"speed-value":((o=a.formatEcgData)===null||o===void 0?void 0:o.speed)||0,sens:a.formatEcgData.sens,"heart-rate":a.ventricularRate,"prefix-id":a.prefixId}},a.$listeners)):a._e(),a.magnifierRulerConfig.isShow?e("MXMagnifierWave",{staticClass:"magnifier-wave",attrs:{width:a.canvasContainer.width,height:a.canvasContainer.height,"grid-config":a.gridConfig,"speed-value":((r=a.formatEcgData)===null||r===void 0?void 0:r.speed)||0,sens:a.formatEcgData.sens,step:((l=a.formatEcgData)===null||l===void 0?void 0:l.step)||0,"lead-head-config":a.leadHeadConfig,"wave-data":a.waveDataCopy,"add-wave-data":a.addWaveDataCopy,"single-wave-data":a.singleWaveDataCopy,"long-lead-config":a.longLeadConfig,"split-block-height":a.splitBlockHeight,"split-point":a.splitPoint,"lead-config":a.leadConfig,"heart-fight":a.heartFight,"normal-lead-names":((n=a.formatEcgData)===null||n===void 0?void 0:n.processedData.otherParams.LeadName)||[],"prefix-id":a.prefixId}}):a._e(),a.isMXEnlargeWaveShow&&a.isShowEnlargeWave?e("MXEnlargeWave",a._g({staticClass:"enlarge-wave",attrs:{"is-show-enlarge-wave":a.isShowEnlargeWave,width:a.MXEnlargeWaveWH.width,height:a.MXEnlargeWaveWH.height,"grid-config":a.gridConfig,"speed-value":((s=a.formatEcgData)===null||s===void 0?void 0:s.speed)||0,sens:a.formatEcgData.sens,step:((d=a.formatEcgData)===null||d===void 0?void 0:d.step)||0,"sample-rate":((g=a.formatEcgData)===null||g===void 0?void 0:g.processedData.otherParams.SampleRate)||0,sensitivity:((c=a.formatEcgData)===null||c===void 0?void 0:c.processedData.otherParams.Sensitivity)||0,"normal-data":((v=a.formatEcgData)===null||v===void 0?void 0:v.processedData.originData.Data)||[],"complex-data":((h=a.formatEcgData)===null||h===void 0?void 0:h.processedData.originData.ComplexData)||[],"lead-name-list":a.leadNameList,"lead-head-config":a.leadHeadConfig,"active-lead-idx":a.activeLeadIdx,"active-lead-analyse-value":a.activeLeadAnalyseValue,"analyse-value":((f=a.formatEcgData)===null||f===void 0?void 0:f.processedData.otherParams.AnalyseValue)||[],"enlarge-wave-mode":a.enlargeWaveMode,"q-td-algorithm":((m=a.conventionalECGConfig)===null||m===void 0||(p=m.ecgReviewSetting)===null||p===void 0?void 0:p.QTd_algorithm)||1,"is-sync-analyse-value-check":a.isSyncAnalyseValueCheck,"enlarge-gains":a.enlargeGains,"lead-name-texts-porps":a.LeadNameTextsPorps,"enlarge-speeds":a.enlargeSpeeds,"prefix-id":a.prefixId,magnification:a.magnification},on:{"update:isShowEnlargeWave":function(t){a.isShowEnlargeWave=t},"update:is-show-enlarge-wave":function(t){a.isShowEnlargeWave=t}}},a.$listeners)):a._e(),e("div",{staticClass:"wave-from-box_container",attrs:{id:a.prefixId+"wave-from-box"}}),e("div",{staticClass:"scroll-box",style:{width:`${a.width}px`,height:`${a.height}px`},on:{touchmove:function(t){t.stopPropagation()},touchend:function(t){t.stopPropagation()},touchstart:function(t){t.stopPropagation()}}},[a.scrollConfig.isNativeScroll?e("div",{ref:a.prefixId+"nativeScroll",staticClass:"native-scroll",on:{scroll:a.nativeScrollFunc}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})]):e("vueScroll",{ref:a.prefixId+"vueScroll",attrs:{ops:a.scrollConfig},on:{"handle-scroll":a.handleScroll}},[e("div",{staticClass:"scroll-empty",style:{width:`${a.vuescrollWH.width}px`,height:`${a.vuescrollWH.height}px`}})])],1)],1)},w=[];exports.render=C;exports.staticRenderFns=w;
|
|
@@ -25,6 +25,8 @@ export default class Methods extends Vue {
|
|
|
25
25
|
protected formatEcgData: EcgClass | null;
|
|
26
26
|
protected leadModel: LeadModel;
|
|
27
27
|
protected leadConfig: MXLeadConfig;
|
|
28
|
+
/** 双击波形放大倍数 */
|
|
29
|
+
protected magnification: number;
|
|
28
30
|
protected longLeadConfig: {
|
|
29
31
|
leadIdxs: number[];
|
|
30
32
|
leadNames: number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var R=Object.defineProperty,z=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var B=(e,t,i)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,W=(e,t)=>{for(var i in t||(t={}))j.call(t,i)&&B(e,i,t[i]);if(O)for(var i of O(t))k.call(t,i)&&B(e,i,t[i]);return e},M=(e,t)=>z(e,T(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const N=require("vue"),X=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),y=require("@costy-plus/utils"),g=require("zrender"),_=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function $(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const Y=_(N),q=$(g);var V=Object.defineProperty,U=Object.getOwnPropertyDescriptor,m=(e,t,i,s)=>{for(var a=s>1?void 0:s?U(t,i):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(a=(s?r(t,i,a):r(a))||a);return s&&a&&V(t,i,a),a};exports.default=class extends Y.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.pacingGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(55),this.dataTotalTimes=Object.freeze(0),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.bottomPacH=Object.freeze(20),this.drawBottomPacH=Object.freeze(this.bottomPacH+40),this.pacingh=Object.freeze(12),this.pacingPFontSize=Object.freeze(14),this.splitBlockHeight=0,this.splitBlockHeight2=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({Data:{maxPoints:0,minPoints:0},ComplexData:{maxPoints:0,minPoints:0}}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=-1,this.activeLeadAnalyseValue=null,this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0),this.sceneIsMouseDownY=Object.freeze(0),this.sceneIsStartX=Object.freeze(0),this.sceneIsStartY=Object.freeze(0),this.sceneIsMoveUpDown=Object.freeze(!1),this.isShowEnlargeWave=!1,this.sceneFirstDistance=Object.freeze(0),this.sceneMagnification=1,this.rulerHistorySlidIdxs=Object.freeze(0)}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}get waveFromData(){var e,t,i;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===y.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((i=this.formatEcgData)==null?void 0:i.processedData.handleData.Data)||[[]]}get isSingleMode(){return this.leadModel.column===1&&this.leadModel.line===1}get MXEnlargeWaveWH(){let e=this.width,t=this.height;return this.MXEnlargeWaveWidth&&(e=this.MXEnlargeWaveWidth),this.MXEnlargeWaveHeight&&(t=this.MXEnlargeWaveHeight),{width:e,height:t}}destroyed(){var e,t,i,s,a,o,r,l,n,h,d,c;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(a=this.splitLineGroup)==null||a.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(r=this.leadHeadOffAndDelGroup)==null||r.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(n=this.arrowGroup)==null||n.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.pacingGroup)==null||d.removeAll(),(c=this.sceneIns)==null||c.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.scrollConfig.isShow?this.$nextTick(()=>{var t,i,s,a,o;this.scrollConfig.isNativeScroll?(s=this.$refs[this.prefixId+"nativeScroll"])==null||s.scrollBy({left:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((i=this.formatEcgData)==null?void 0:i.step)||0)*this.sceneMagnification,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({dx:(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.PosStart)||0)*(((o=this.formatEcgData)==null?void 0:o.step)||0)*this.sceneMagnification})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){var i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById(`${this.prefixId}wave-from-box`);this.sceneIns=q.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById(`${this.prefixId}MXGrid`);this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp)}sceneInsEventOff(){var e,t,i;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawPacing(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,i,s,a,o,r,l,n,h,d,c;this.rowAndColwaveFromGroup=new g.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new g.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new g.Group({name:"addwaveFrom"}),this.leadHeadGroup=new g.Group({name:"leadHead"}),this.splitLineGroup=new g.Group({name:"splitLine"}),this.leadHeadNameGroup=new g.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new g.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new g.Group({name:"ruler"}),this.arrowGroup=new g.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new g.Group({name:"heardBeatLine"}),this.pacingGroup=new g.Group({name:"pacing"}),(this.leadModel.name==="12*1"||this.leadModel.name==="18*1"||this.leadModel.name==="15*1"||this.leadModel.name==="16*1")&&(this.sceneMagnification=.8),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((i=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:i.ecgareawidth)==="1"){const f=y.getPrintLengthToPx(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;f<=e&&(e=f)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((a=this.formatEcgData)==null?void 0:a.dataPxLen)||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||0)+this.leadHeadConfig.leadHedeWidth);if(this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:0,startInd:0,endInd:0},this.addSlidingWindowInfo={points:0,startInd:0,endInd:0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.LeadName)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=(l=this.formatEcgData)==null?void 0:l.calcHighestAndLowestPoint(),this.isSingleMode)this.splitBlockHeight=(((n=this.formatEcgData)==null?void 0:n.analysisValueMode)===y.AnalysisMode.CompoundWave?Math.abs(this.highestAndLowestPoint.ComplexData.maxPoints)+Math.abs(this.highestAndLowestPoint.ComplexData.minPoints):Math.abs(this.highestAndLowestPoint.Data.maxPoints)+Math.abs(this.highestAndLowestPoint.Data.minPoints))+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6,this.splitBlockHeight2=this.drawArea.height/6);else{let f=this.drawArea.height;this.leadModel.isShowPacing&&(f=this.drawArea.height-this.drawBottomPacH),this.splitBlockHeight=f/this.totalRows,this.splitBlockHeight2=f/this.totalRows}this.dataTotalTimes=y.getDataLenTimes(this.waveFromData[0].length||0,((h=this.formatEcgData)==null?void 0:h.processedData.otherParams.SampleRate)||0),this.rulerStep=(((d=this.formatEcgData)==null?void 0:d.step)||1)*(((c=this.formatEcgData)==null?void 0:c.processedData.otherParams.SampleRate)||1)/(this.gridConfig.cellMg*2+2)}isLeadOff(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadOff)||[]).includes(e)}isLeadDel(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadDelete)||[]).includes(e)}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const i=Date.now(),s=()=>{var c,f,p,v;const a=e.target.name.split("_");this.activeLeadIdx=+a[0];const o=+a[1];let r=0,l=0;t==="single"?(r=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(r=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(r=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let n=y.getPointIdxForPx(r,(((c=this.formatEcgData)==null?void 0:c.step)||1)*this.sceneMagnification);n+=l;const h=((f=this.formatEcgData)==null?void 0:f.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===y.AnalysisMode.SelectedHeartbeat){if(n<=h[1].KeyPosByBeat.Tend+.1*(((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(n>h[D-1].KeyPosByBeat.Tend+1&&n<h[D].KeyPosByBeat.Tend+.1*(((v=this.formatEcgData)==null?void 0:v.processedData.otherParams.SampleRate)||0)){d=h[D];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=M(W({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):this.dbClickWaveFromTime=i}sceneInsMousemove(e){var t,i,s,a,o,r,l,n,h,d,c,f,p;if(e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown){if(!e.event.touches||e.event.touches.length===1){const v=e.offsetY-this.sceneIsStartY,D=e.offsetX-this.sceneIsStartY;Math.abs(v)>Math.abs(D)?(this.sceneIsMoveUpDown=!0,this.moveUpAndDown(e.offsetY-this.sceneIsMouseDownY),this.sceneIsMouseDownY=e.offsetY):(this.sceneIsMoveUpDown=!1,this.scrollConfig.isNativeScroll?(t=this.$refs[this.prefixId+"nativeScroll"])==null||t.scrollBy({left:-(e.offsetX-this.sceneIsMouseDownX),top:0}):this.$refs[this.prefixId+"vueScroll"].scrollBy({dx:-(e.offsetX-this.sceneIsMouseDownX)}),this.sceneIsMouseDownX=e.offsetX)}else if(this.supportTwoFingerZoom&&e.event.touches.length===2){const v=y.getDistance({x:e.event.touches[0].pageX,y:e.event.touches[0].pageY},{x:e.event.touches[1].pageX,y:e.event.touches[1].pageY});this.sceneFirstDistance===0&&(this.sceneFirstDistance=v),v<this.sceneFirstDistance?(this.sceneMagnification-=this.zoomStep,this.sceneMagnification<.1&&(this.sceneMagnification=.1)):this.sceneMagnification+=this.zoomStep,this.splitBlockHeight=this.splitBlockHeight2*this.sceneMagnification,(i=this.leadHeadNameGroup)==null||i.removeAll(),(s=this.leadHeadOffAndDelGroup)==null||s.removeAll(),(a=this.heardBeatLineGroup)==null||a.removeAll(),(o=this.rulerGroup)==null||o.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(l=this.splitLineGroup)==null||l.removeAll(),(n=this.sceneIns)==null||n.remove(this.splitLineGroup),(h=this.rowAndColwaveFromGroup)==null||h.removeAll(),(d=this.singleWaveFromGroup)==null||d.removeAll(),(c=this.addwaveFromGroup)==null||c.removeAll(),(f=this.leadHeadGroup)==null||f.removeAll(),(p=this.pacingGroup)==null||p.removeAll(),this.drawWaveFrom(),this.sceneFirstDistance=v,this.zoomWave()}}}moveUpAndDown(e){var t,i,s,a,o,r,l,n,h,d;if(this.isSingleMode){const c=this.singleWaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.singleWaveFromGroup.getBoundingRect().height,f=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e)+this.arrowGroup.getBoundingRect().height,p=c<f?f:c,v=this.singleWaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e),D=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e),P=v<D?v:D;if(p<this.canvasContainer.height-100||P>this.canvasContainer.height-100)return}else{const c=this.rowAndColwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.rowAndColwaveFromGroup.getBoundingRect().height,f=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e)+this.arrowGroup.getBoundingRect().height,p=this.addwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.addwaveFromGroup.getBoundingRect().height;let v=c<f?f:c;v=p<v?v:p;const D=this.rowAndColwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e),P=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e),I=this.addwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e);let C=D<P?D:P;if(C=I<C?I:C,v<this.canvasContainer.height-100||C>this.canvasContainer.height-100)return}this.isSingleMode?(t=this.singleWaveFromGroup)==null||t.attr({y:this.singleWaveFromGroup.y+e}):((i=this.rowAndColwaveFromGroup)==null||i.attr({y:this.rowAndColwaveFromGroup.y+e}),(s=this.leadHeadGroup)==null||s.attr({y:this.leadHeadGroup.y+e}),(a=this.addwaveFromGroup)==null||a.attr({y:this.addwaveFromGroup.y+e}),(o=this.splitLineGroup)==null||o.attr({y:this.splitLineGroup.y+e})),(r=this.leadHeadNameGroup)==null||r.attr({y:this.leadHeadNameGroup.y+e}),(l=this.leadHeadOffAndDelGroup)==null||l.attr({y:this.leadHeadOffAndDelGroup.y+e}),(n=this.arrowGroup)==null||n.attr({y:this.arrowGroup.y+e}),(h=this.heardBeatLineGroup)==null||h.attr({y:this.heardBeatLineGroup.y+e}),this.leadModel.isShowPacing&&((d=this.pacingGroup)==null||d.attr({y:this.pacingGroup.y+e}))}zoomWave(){var s,a,o;this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)*this.sceneMagnification-this.splitPoint);const e=(((a=this.formatEcgData)==null?void 0:a.step)||0)*this.sceneMagnification,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo.points=t;const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo.points=i,this.drawLeadHead(),this.drawColSplitLine(),this.isSingleMode?(this.slidingWindowInfo.endInd=t,this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(o=this.sceneIns)==null||o.add(this.singleWaveFromGroup)):this.scrollWaveFrom(this.rulerHistorySlidIdxs),this.scrollRuler(this.rulerHistorySlidIdxs),this.scrollArrow(this.rulerHistorySlidIdxs)}sceneInsMouseDown(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!0,!e.event.touches||e.event.touches.length===1?(this.sceneIsMouseDownX=e.offsetX,this.sceneIsMouseDownY=e.offsetY,this.sceneIsStartX=e.offsetX,this.sceneIsStartY=e.offsetY):e.event.touches.length===2&&(this.sceneFirstDistance=y.getDistance({x:e.event.touches[0].pageX,y:e.event.touches[0].pageY},{x:e.event.touches[1].pageX,y:e.event.touches[1].pageY}))}sceneInsMouseUp(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!1,this.sceneIsMoveUpDown=!1}drawPacing(){var i,s,a,o,r,l,n;if(!this.leadModel.isShowPacing||!((s=(i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)!=null&&s.length))return;(a=this.pacingGroup)==null||a.removeAll(),(o=this.sceneIns)==null||o.remove(this.pacingGroup);const e=this.leadHeadConfig.leadHedeWidth,t=this.canvasContainer.height-this.drawBottomPacH;(r=this.pacingGroup)==null||r.add(new g.Text({cursor:"",style:{x:e,y:t,text:"P",fontSize:this.pacingPFontSize,fill:this.leadConfig.lineColor,fontFamily:this.fontFamily}})),(l=this.pacingGroup)==null||l.add(new g.Polyline({cursor:"",name:"0_0",shape:{points:this.getPacinfPoints(e,t)},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}})),(n=this.sceneIns)==null||n.add(this.pacingGroup)}getPacinfPoints(e,t){var i;return(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)||[]).slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((s,a)=>{var o;return[e+a*(((o=this.formatEcgData)==null?void 0:o.step)||0)*this.sceneMagnification,(s===1?t-this.pacingh:t)+this.pacingPFontSize]})}createLeadHead(e,t,i){var o;const s=this.leadHeadConfig.leadHedeWidth/4;let a=(((o=this.formatEcgData)==null?void 0:o.sens)||0)*this.sceneMagnification;return a=i?a/2:a,new g.Polyline({cursor:"",shape:{points:[[0+e,0+t],[s+e,0+t],[s+e,-a+t],[3*s+e,-a+t],[3*s+e,0+t],[4*s+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,i){var s,a;return new g.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(i?(((s=this.formatEcgData)==null?void 0:s.sens)||0)*this.sceneMagnification/2:(((a=this.formatEcgData)==null?void 0:a.sens)||0)*this.sceneMagnification)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var i,s,a,o,r,l;(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.leadHeadGroup);let e=0,t=!1;for(let n=1;n<=this.totalRows;n++)e=0,t=!1,n<=this.leadModel.line?e=(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.LeadName)||[])[n-1]||0:n>this.leadModel.line&&n-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[n-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[e])&&(t=!0),(r=this.leadHeadGroup)==null||r.add(this.createLeadHead(0,n*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var a,o,r,l,n,h,d,c,f,p,v,D,P;(a=this.splitLineGroup)==null||a.removeAll(),(o=this.sceneIns)==null||o.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;if(this.splitPoint=e,this.isSingleMode){const I=y.getDataLenTimes(Math.ceil(this.splitPoint/((((r=this.formatEcgData)==null?void 0:r.step)||1)*this.sceneMagnification))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),C=parseInt(`${I/1e3%60}`,10);this.splitPoint=C*(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)*this.sceneMagnification}let t=0,i=0,s=0;for(let I=1;I<=this.leadModel.column-1;I++){t=I*e+this.leadHeadConfig.leadHedeWidth,i=I*this.leadModel.line;for(let C=1;C<=this.leadModel.line&&(s=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[C-1+i],s!==void 0);C++)((c=this.formatEcgData)==null?void 0:c.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[s])?(p=this.splitLineGroup)==null||p.add(this.creatSplitLine(t,C*this.splitBlockHeight-(((f=this.formatEcgData)==null?void 0:f.sens)||0)*this.sceneMagnification/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,C*this.splitBlockHeight-(((v=this.formatEcgData)==null?void 0:v.sens)||0)*this.sceneMagnification*.5))}(P=this.sceneIns)==null||P.add(this.splitLineGroup)}initSlidingWindowInfo(){var s,a;const e=(((s=this.formatEcgData)==null?void 0:s.step)||0)*this.sceneMagnification,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((a=this.formatEcgData)==null?void 0:a.dataPxLen)||0)*this.sceneMagnification-this.splitPoint);const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:i,startInd:0,endInd:i}}getRednerSinglePoints(){let e=0,t=0;const i=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let s=this.slidingWindowInfo.startInd||0,a=this.slidingWindowInfo.endInd||0;const o=[],r=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let n=1;n<=r;n++)t=n*this.splitBlockHeight,n>1&&(t*=.8,s=a,a=s+(this.slidingWindowInfo.points||0)),n===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:s,endInd:a,data:i.slice(s,a).map((h,d)=>{var c;return[d*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification,-h*this.sceneMagnification]})})}return o}getRednerPoints(){let e=0,t=0,i=0,s=[],a=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const r=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(a=o,o=a+(this.slidingWindowInfo.points||0));for(let n=1;n<=this.leadModel.line&&(t=n*this.splitBlockHeight,!(i>(this.waveFromData||[]).length-1));n++)s=this.waveFromData[i]||[],i++,n===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:a,endInd:o,data:s.slice(a,o).map((h,d)=>{var c;return[d*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification,-h*this.sceneMagnification]})})}return r}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let i=0,s=0,a=[];for(let o=0;o<this.leadModel.add;o++)s=this.longLeadConfig.leadIdxs[o],i=(o+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveFromData[s]||[],o===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:a.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((r,l)=>{var n;return[l*(((n=this.formatEcgData)==null?void 0:n.step)||0)*this.sceneMagnification,-r*this.sceneMagnification]})});return e}createSingleWaveFrom(){var r,l,n,h,d,c,f;(r=this.singleWaveFromGroup)==null||r.removeAll();const e=(((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),i=y.getDataLenTimes(this.slidingWindowInfo.points||0,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0);const s=i;let a=0,o=0;for(let p=0;p<t.length&&!(t[p].pos[1]>this.drawArea.height+this.bottomAreaHeight);p++)this.isLeadDel(e)||(a=Math.floor(i/1e3/60),o=Math.floor(i/1e3%60),a=o===60?a+=1:a,a=a===0?"00":a<10?`0${a}`:a,o=o===0||o===60?"00":o<10?`0${o}`:o,(h=this.singleWaveFromGroup)==null||h.add(new g.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+p,shape:{points:t[p].data.map(([v,D])=>[v+t[p].pos[0],D+t[p].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:v=>{this.onDbClickWaveFrom(v,"single")}})),(c=this.singleWaveFromGroup)==null||c.add(new g.Text({cursor:"",style:{x:t[p].pos[0],y:t[p].pos[1]-(((d=this.formatEcgData)==null?void 0:d.sens)||0)*this.sceneMagnification/2,text:p===0?"00:00 \u5FC3\u7387":`${a}:${o} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),p>0&&(i+=s));this.createLeadName(e,t[0].pos[0]-10,t[0].pos[1]+10),this.createLeadOffAndDel(e,t[0].pos[0]-5,t[0].pos[1]-(((f=this.formatEcgData)==null?void 0:f.sens)||0)*this.sceneMagnification/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,i;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let s=0;s<e.length;s++)this.isLeadDel(this.longLeadConfig.leadIdxs[s])||((t=this.addwaveFromGroup)==null||t.add(new g.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[s]+"_"+s,shape:{points:e[s].data.map(([a,o])=>[a+e[s].pos[0],o+e[s].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:a=>{this.onDbClickWaveFrom(a,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[s],e[s].pos[0],e[s].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[s],e[s].pos[0]-5,e[s].pos[1]-(((i=this.formatEcgData)==null?void 0:i.sens)||0)*this.sceneMagnification/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var i,s,a,o,r,l;console.time("createRowAndColWaveFrom"),(i=this.rowAndColwaveFromGroup)==null||i.removeAll();let e=this.getRednerPoints(),t=0;for(let n=0;n<e.length;n++)t=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[n]||0,this.isLeadDel(t)||(a=this.rowAndColwaveFromGroup)==null||a.add(new g.Polyline({cursor:"",name:n+"_"+n,shape:{points:e[n].data.map(([h,d])=>[h+e[n].pos[0],d+e[n].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),n<this.leadModel.line?(this.createLeadName(t,e[n].pos[0],e[n].pos[1]-15),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)*this.sceneMagnification/2-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-(((r=this.formatEcgData)==null?void 0:r.sens)||0)*this.sceneMagnification/2),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)*this.sceneMagnification/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var a;(a=this.leadHeadNameGroup)==null||a.add(new g.Text({style:{x:t,y:i,text:this.LeadNameTextsPorps[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:M(W({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:s})},onclick:o=>{this.$emit("notiifyLeadName",{event:M(W({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new g.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var s,a,o,r,l,n;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new g.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new g.Text({style:W({text:`${((s=this.formatEcgData)==null?void 0:s.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(a=this.formatEcgData)==null?void 0:a.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(r=this.formatEcgData)==null?void 0:r.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(l=this.sceneIns)==null||l.add(i),(n=this.sceneIns)==null||n.add(t)}drawRuler(e=0){var o,r,l,n,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,a=t;if(this.leadModel.isContinuous)a=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=y.getPointIdxForPx(this.splitPoint,this.formatEcgData.step*this.sceneMagnification),c=y.getDataLenTimes(d,((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)/1e3;a=e+c}for(let d=e;d<=a;d=+(d+.1).toFixed(1))d!==e&&(i+=this.rulerStep*this.sceneMagnification),d%1===0?(s=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new g.Text({cursor:"",style:{x:i,y:s-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(n=this.rulerGroup)==null||n.add(new g.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,i;this.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(e=this.sceneIns)==null||e.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(t=this.sceneIns)==null||t.add(this.rowAndColwaveFromGroup),(i=this.sceneIns)==null||i.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(),this.drawLoopArrow()}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}drawLoopArrow(e=0){var l,n,h,d,c,f,p,v,D,P,I,C,H,S,L,x,b;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=((l=this.formatEcgData)==null?void 0:l.heartBeatPosition[this.heartFight.defaultSelect])||null,this.drawHeardBeatLine());let t=0,i=0;this.leadModel.add?i=this.loopArrowY.add-(((n=this.formatEcgData)==null?void 0:n.sens)||0)*this.sceneMagnification-this.splitBlockHeight/3.5:i=20;let s=0,a=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let r=0;for(let F=0;F<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;F++){const u=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[F];if(r=((u==null?void 0:u.position)||0)-e,!(e>((u==null?void 0:u.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&r>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&r>(this.slidingWindowInfo.points||0))){if(((u==null?void 0:u.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=r*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification+this.leadHeadConfig.leadHedeWidth-9.5,a=0,(v=this.arrowGroup)==null||v.add(new g.Polygon({name:"arrow_box",shape:{points:[[4+t,0+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((p=(f=this.currentHeardBeat)==null?void 0:f.heardBeat)==null?void 0:p.index)===(u==null?void 0:u.index)?"blue":"#ccc"},onclick:A=>{var E;!this.heartFight.mode||(A.target.attr({style:{fill:"blue"}}),(E=this.arrowGroup)==null||E.children().filter(G=>G.name==="arrow_box").forEach(G=>{G.id!==A.target.id&&G.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(u,A.target))}})),this.heartFight.heartrate&&(s=((D=this.AssistCtx)==null?void 0:D.measureText(`${(u==null?void 0:u.heartrate)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(u==null?void 0:u.heartrate)||""}`},o)})),a+=12),this.heartFight.interval&&(s=((I=this.AssistCtx)==null?void 0:I.measureText(`${(u==null?void 0:u.interval)||""}`).width)||0,(C=this.arrowGroup)==null||C.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(u==null?void 0:u.interval)||""}`},o)})),a+=12),this.heartFight.qrstCompany&&(s=((H=this.AssistCtx)==null?void 0:H.measureText(`${(u==null?void 0:u.qrstCompany)||""}`).width)||0,(S=this.arrowGroup)==null||S.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(u==null?void 0:u.qrstCompany)||""}`},o)})),a+=12),this.heartFight.telectricalaxis&&(s=((L=this.AssistCtx)==null?void 0:L.measureText(`${(u==null?void 0:u.telectricalaxis)||""}`).width)||0,(x=this.arrowGroup)==null||x.add(new g.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(u==null?void 0:u.telectricalaxis)||""}`},o)})))}}(b=this.sceneIns)==null||b.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",g.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var r,l,n,h,d,c;if(!this.currentHeardBeat.heardBeat)return;(r=this.heardBeatLineGroup)==null||r.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,i=0,s=this.getRednerPoints(),a=this.getAddRednerPoints(),o;for(const f in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(f)&&Object.prototype.hasOwnProperty.call(t,f)){i=(t[f]-this.slidingWindowInfo.startInd)*(((n=this.formatEcgData)==null?void 0:n.step)||0)*this.sceneMagnification;e:for(let p=0;p<s.length;p++)if(!(this.isLeadOff(p)||this.isLeadDel(p))){if(e>t[f]||!this.leadModel.isContinuous&&t[f]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=s[p],this.leadModel.isContinuous&&p>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}e:for(let p=0;p<a.length;p++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[p])&&this.isLeadDel(this.longLeadConfig.leadIdxs[p]))){if(e>t[f])break e;o=a[p],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}(c=this.sceneIns)==null||c.add(this.heardBeatLineGroup),t=null,s=null,a=null}createHeardBeatLine(e,t){return new g.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}nativeScrollFunc(e){console.log("event",e,e.target.scrollLeft),this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){var i;if(this.sceneIsMoveUpDown)return;const t=y.getPointIdxForPx(e,(((i=this.formatEcgData)==null?void 0:i.step)||1)*this.sceneMagnification);this.rulerHistorySlidIdxs=t,this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",t)}scrollWaveFrom(e){var s,a,o,r,l,n;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,(s=this.rowAndColwaveFromGroup)==null||s.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:t[d].data.map(([c,f])=>[c+t[d].pos[0],f+t[d].pos[1]])}})}),(a=this.addwaveFromGroup)==null||a.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:i[d].data.map(([c,f])=>[c+i[d].pos[0],f+i[d].pos[1]])}})}),this.leadModel.isShowPacing&&((r=(o=this.formatEcgData)==null?void 0:o.processedData.otherParams.PacingData)==null?void 0:r.length)&&((n=(l=this.pacingGroup)==null?void 0:l.childOfName("0_0"))==null||n.attr({shape:{points:this.getPacinfPoints(this.leadHeadConfig.leadHedeWidth,this.canvasContainer.height-this.drawBottomPacH)}})),t=null,i=null}scrollRuler(e){var i,s,a;(i=this.rulerGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.rulerGroup);const t=y.getDataLenTimes(this.isSingleMode?0:e,((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};m([w.Prop({default:()=>.04})],exports.default.prototype,"zoomStep",2);m([w.Prop({default:()=>!0})],exports.default.prototype,"supportTwoFingerZoom",2);m([w.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);m([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);m([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);m([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);m([w.Prop({default:()=>y.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);m([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);m([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);m([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);m([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);m([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);m([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);m([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);m([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);m([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);m([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);m([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);m([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);m([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);m([w.Prop({default:y.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);m([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);m([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);m([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);m([w.Prop({default:!0})],exports.default.prototype,"isMXEnlargeWaveShow",2);m([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);m([y.throttling(200)],exports.default.prototype,"sceneInsMousemove",1);m([y.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);m([y.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=m([X.default({name:"Methods"})],exports.default);
|
|
1
|
+
"use strict";var R=Object.defineProperty,z=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var B=(e,t,i)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,W=(e,t)=>{for(var i in t||(t={}))j.call(t,i)&&B(e,i,t[i]);if(O)for(var i of O(t))k.call(t,i)&&B(e,i,t[i]);return e},M=(e,t)=>z(e,T(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const N=require("vue"),X=require("../../node_modules/.pnpm/vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-class-component/dist/vue-class-component.esm.js");require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Emit.js");const w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_vue-class-component@7.2.6_vue@2.6.14/node_modules/vue-property-decorator/lib/decorators/Prop.js"),y=require("@costy-plus/utils"),m=require("zrender"),_=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function $(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const Y=_(N),q=$(m);var V=Object.defineProperty,U=Object.getOwnPropertyDescriptor,g=(e,t,i,s)=>{for(var a=s>1?void 0:s?U(t,i):t,o=e.length-1,r;o>=0;o--)(r=e[o])&&(a=(s?r(t,i,a):r(a))||a);return s&&a&&V(t,i,a),a};exports.default=class extends Y.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.pacingGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(55),this.dataTotalTimes=Object.freeze(0),this.totalRows=Object.freeze(0),this.rulerStep=Object.freeze(0),this.drawLoopArrowStartPosIdx=Object.freeze(0),this.dbClickWaveFromTime=Object.freeze(0),this.currentHeardBeat={heardBeat:null,ele:null},this.loopArrowY=Object.freeze({add:0,rowAndCol:0}),this.fontFamily=Object.freeze("\u5FAE\u8F6F\u96C5\u9ED1"),this.ruleH=Object.freeze(40),this.bottomPacH=Object.freeze(20),this.drawBottomPacH=Object.freeze(this.bottomPacH+40),this.pacingh=Object.freeze(12),this.pacingPFontSize=Object.freeze(14),this.splitBlockHeight=0,this.splitBlockHeight2=0,this.splitPoint=0,this.slidingWindowInfo=Object.freeze({}),this.addSlidingWindowInfo=Object.freeze({}),this.highestAndLowestPoint=Object.freeze({Data:{maxPoints:0,minPoints:0},ComplexData:{maxPoints:0,minPoints:0}}),this.drawArea=Object.freeze({width:0,height:0}),this.vuescrollWH={width:0,height:0},this.waveDataCopy=[],this.addWaveDataCopy=[],this.singleWaveDataCopy=[],this.leadNameList=[],this.activeLeadIdx=-1,this.activeLeadAnalyseValue=null,this.sceneIsMouseDown=Object.freeze(!1),this.sceneIsMouseDownX=Object.freeze(0),this.sceneIsMouseDownY=Object.freeze(0),this.sceneIsStartX=Object.freeze(0),this.sceneIsStartY=Object.freeze(0),this.sceneIsMoveUpDown=Object.freeze(!1),this.isShowEnlargeWave=!1,this.sceneFirstDistance=Object.freeze(0),this.sceneMagnification=1,this.rulerHistorySlidIdxs=Object.freeze(0)}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.scrollConfig.isShow&&parseInt(`${(e=this.scrollConfig.bar)==null?void 0:e.size}`)||0)||0}}get waveFromData(){var e,t,i;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===y.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((i=this.formatEcgData)==null?void 0:i.processedData.handleData.Data)||[[]]}get isSingleMode(){return this.leadModel.column===1&&this.leadModel.line===1}get MXEnlargeWaveWH(){let e=this.width,t=this.height;return this.MXEnlargeWaveWidth&&(e=this.MXEnlargeWaveWidth),this.MXEnlargeWaveHeight&&(t=this.MXEnlargeWaveHeight),{width:e,height:t}}destroyed(){var e,t,i,s,a,o,r,l,n,h,d,c;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(i=this.addwaveFromGroup)==null||i.removeAll(),(s=this.leadHeadGroup)==null||s.removeAll(),(a=this.splitLineGroup)==null||a.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(r=this.leadHeadOffAndDelGroup)==null||r.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(n=this.arrowGroup)==null||n.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.pacingGroup)==null||d.removeAll(),(c=this.sceneIns)==null||c.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.scrollConfig.isShow?this.$nextTick(()=>{var t,i,s,a,o;this.scrollConfig.isNativeScroll?(s=this.$refs[this.prefixId+"nativeScroll"])==null||s.scrollBy({left:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((i=this.formatEcgData)==null?void 0:i.step)||0)*this.sceneMagnification,top:0}):this.$refs[this.prefixId+"vueScroll"].scrollTo({dx:(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.PosStart)||0)*(((o=this.formatEcgData)==null?void 0:o.step)||0)*this.sceneMagnification})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){var i;(i=this.sceneIns)==null||i.dispose(),this.AssistCtx=null;const e=document.getElementById(`${this.prefixId}wave-from-box`);this.sceneIns=q.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById(`${this.prefixId}MXGrid`);this.AssistCtx=t.getContext("2d"),this.sceneInsEventOff(),this.sceneIns.on("mousemove",this.sceneInsMousemove),this.sceneIns.on("mousedown",this.sceneInsMouseDown),this.sceneIns.on("mouseup",this.sceneInsMouseUp)}sceneInsEventOff(){var e,t,i;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(i=this.sceneIns)==null||i.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawPacing(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,i,s,a,o,r,l,n,h,d,c;this.rowAndColwaveFromGroup=new m.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new m.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new m.Group({name:"addwaveFrom"}),this.leadHeadGroup=new m.Group({name:"leadHead"}),this.splitLineGroup=new m.Group({name:"splitLine"}),this.leadHeadNameGroup=new m.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new m.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new m.Group({name:"ruler"}),this.arrowGroup=new m.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new m.Group({name:"heardBeatLine"}),this.pacingGroup=new m.Group({name:"pacing"}),(this.leadModel.name==="12*1"||this.leadModel.name==="18*1"||this.leadModel.name==="15*1"||this.leadModel.name==="16*1")&&(this.sceneMagnification=.8),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((i=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:i.ecgareawidth)==="1"){const f=y.getPrintLengthToPx(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;f<=e&&(e=f)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((a=this.formatEcgData)==null?void 0:a.dataPxLen)||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||0)+this.leadHeadConfig.leadHedeWidth);if(this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:0,startInd:0,endInd:0},this.addSlidingWindowInfo={points:0,startInd:0,endInd:0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.LeadName)||[],this.totalRows=this.leadModel.line+this.leadModel.add||1,this.highestAndLowestPoint=(l=this.formatEcgData)==null?void 0:l.calcHighestAndLowestPoint(),this.isSingleMode)this.splitBlockHeight=(((n=this.formatEcgData)==null?void 0:n.analysisValueMode)===y.AnalysisMode.CompoundWave?Math.abs(this.highestAndLowestPoint.ComplexData.maxPoints)+Math.abs(this.highestAndLowestPoint.ComplexData.minPoints):Math.abs(this.highestAndLowestPoint.Data.maxPoints)+Math.abs(this.highestAndLowestPoint.Data.minPoints))+22,this.splitBlockHeight>this.drawArea.height&&(this.splitBlockHeight=this.drawArea.height/6,this.splitBlockHeight2=this.drawArea.height/6);else{let f=this.drawArea.height;this.leadModel.isShowPacing&&(f=this.drawArea.height-this.drawBottomPacH),this.splitBlockHeight=f/this.totalRows,this.splitBlockHeight2=f/this.totalRows}this.dataTotalTimes=y.getDataLenTimes(this.waveFromData[0].length||0,((h=this.formatEcgData)==null?void 0:h.processedData.otherParams.SampleRate)||0),this.rulerStep=(((d=this.formatEcgData)==null?void 0:d.step)||1)*(((c=this.formatEcgData)==null?void 0:c.processedData.otherParams.SampleRate)||1)/(this.gridConfig.cellMg*2+2)}isLeadOff(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadOff)||[]).includes(e)}isLeadDel(e){var t;return!!(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.LeadDelete)||[]).includes(e)}onDbClickWaveFrom(e,t){console.log("onDbClickWaveFrom",e);const i=Date.now(),s=()=>{var c,f,p,v;const a=e.target.name.split("_");this.activeLeadIdx=+a[0];const o=+a[1];let r=0,l=0;t==="single"?(r=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(r=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(r=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let n=y.getPointIdxForPx(r,(((c=this.formatEcgData)==null?void 0:c.step)||1)*this.sceneMagnification);n+=l;const h=((f=this.formatEcgData)==null?void 0:f.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===y.AnalysisMode.SelectedHeartbeat){if(n<=h[1].KeyPosByBeat.Tend+.1*(((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(n>h[D-1].KeyPosByBeat.Tend+1&&n<h[D].KeyPosByBeat.Tend+.1*(((v=this.formatEcgData)==null?void 0:v.processedData.otherParams.SampleRate)||0)){d=h[D];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=M(W({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};i-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,s()):this.dbClickWaveFromTime=i}sceneInsMousemove(e){var t,i,s,a,o,r,l,n,h,d,c,f,p;if(e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown){if(!e.event.touches||e.event.touches.length===1){const v=e.offsetY-this.sceneIsStartY,D=e.offsetX-this.sceneIsStartY;Math.abs(v)>Math.abs(D)?(this.sceneIsMoveUpDown=!0,this.moveUpAndDown(e.offsetY-this.sceneIsMouseDownY),this.sceneIsMouseDownY=e.offsetY):(this.sceneIsMoveUpDown=!1,this.scrollConfig.isNativeScroll?(t=this.$refs[this.prefixId+"nativeScroll"])==null||t.scrollBy({left:-(e.offsetX-this.sceneIsMouseDownX),top:0}):this.$refs[this.prefixId+"vueScroll"].scrollBy({dx:-(e.offsetX-this.sceneIsMouseDownX)}),this.sceneIsMouseDownX=e.offsetX)}else if(this.supportTwoFingerZoom&&e.event.touches.length===2){const v=y.getDistance({x:e.event.touches[0].pageX,y:e.event.touches[0].pageY},{x:e.event.touches[1].pageX,y:e.event.touches[1].pageY});this.sceneFirstDistance===0&&(this.sceneFirstDistance=v),v<this.sceneFirstDistance?(this.sceneMagnification-=this.zoomStep,this.sceneMagnification<.1&&(this.sceneMagnification=.1)):this.sceneMagnification+=this.zoomStep,this.splitBlockHeight=this.splitBlockHeight2*this.sceneMagnification,(i=this.leadHeadNameGroup)==null||i.removeAll(),(s=this.leadHeadOffAndDelGroup)==null||s.removeAll(),(a=this.heardBeatLineGroup)==null||a.removeAll(),(o=this.rulerGroup)==null||o.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(l=this.splitLineGroup)==null||l.removeAll(),(n=this.sceneIns)==null||n.remove(this.splitLineGroup),(h=this.rowAndColwaveFromGroup)==null||h.removeAll(),(d=this.singleWaveFromGroup)==null||d.removeAll(),(c=this.addwaveFromGroup)==null||c.removeAll(),(f=this.leadHeadGroup)==null||f.removeAll(),(p=this.pacingGroup)==null||p.removeAll(),this.drawWaveFrom(),this.sceneFirstDistance=v,this.zoomWave()}}}moveUpAndDown(e){var t,i,s,a,o,r,l,n,h,d;if(this.isSingleMode){const c=this.singleWaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.singleWaveFromGroup.getBoundingRect().height,f=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e)+this.arrowGroup.getBoundingRect().height,p=c<f?f:c,v=this.singleWaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e),D=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e),I=v<D?v:D;if(p<this.canvasContainer.height-100||I>this.canvasContainer.height-100)return}else{const c=this.rowAndColwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.rowAndColwaveFromGroup.getBoundingRect().height,f=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e)+this.arrowGroup.getBoundingRect().height,p=this.addwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e)+this.addwaveFromGroup.getBoundingRect().height;let v=c<f?f:c;v=p<v?v:p;const D=this.rowAndColwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e),I=this.arrowGroup.getBoundingRect().y+(this.arrowGroup.y+e),P=this.addwaveFromGroup.getBoundingRect().y+(this.rowAndColwaveFromGroup.y+e);let C=D<I?D:I;if(C=P<C?P:C,v<this.canvasContainer.height-100||C>this.canvasContainer.height-100)return}this.isSingleMode?(t=this.singleWaveFromGroup)==null||t.attr({y:this.singleWaveFromGroup.y+e}):((i=this.rowAndColwaveFromGroup)==null||i.attr({y:this.rowAndColwaveFromGroup.y+e}),(s=this.leadHeadGroup)==null||s.attr({y:this.leadHeadGroup.y+e}),(a=this.addwaveFromGroup)==null||a.attr({y:this.addwaveFromGroup.y+e}),(o=this.splitLineGroup)==null||o.attr({y:this.splitLineGroup.y+e})),(r=this.leadHeadNameGroup)==null||r.attr({y:this.leadHeadNameGroup.y+e}),(l=this.leadHeadOffAndDelGroup)==null||l.attr({y:this.leadHeadOffAndDelGroup.y+e}),(n=this.arrowGroup)==null||n.attr({y:this.arrowGroup.y+e}),(h=this.heardBeatLineGroup)==null||h.attr({y:this.heardBeatLineGroup.y+e}),this.leadModel.isShowPacing&&((d=this.pacingGroup)==null||d.attr({y:this.pacingGroup.y+e}))}zoomWave(){var s,a,o;this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)*this.sceneMagnification-this.splitPoint);const e=(((a=this.formatEcgData)==null?void 0:a.step)||0)*this.sceneMagnification,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo.points=t;const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo.points=i,this.drawLeadHead(),this.drawColSplitLine(),this.isSingleMode?(this.slidingWindowInfo.endInd=t,this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(o=this.sceneIns)==null||o.add(this.singleWaveFromGroup)):this.scrollWaveFrom(this.rulerHistorySlidIdxs),this.scrollRuler(this.rulerHistorySlidIdxs),this.scrollArrow(this.rulerHistorySlidIdxs)}sceneInsMouseDown(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!0,!e.event.touches||e.event.touches.length===1?(this.sceneIsMouseDownX=e.offsetX,this.sceneIsMouseDownY=e.offsetY,this.sceneIsStartX=e.offsetX,this.sceneIsStartY=e.offsetY):e.event.touches.length===2&&(this.sceneFirstDistance=y.getDistance({x:e.event.touches[0].pageX,y:e.event.touches[0].pageY},{x:e.event.touches[1].pageX,y:e.event.touches[1].pageY}))}sceneInsMouseUp(e){e.event.preventDefault(),e.event.stopPropagation(),this.sceneIsMouseDown=!1,this.sceneIsMoveUpDown=!1}drawPacing(){var i,s,a,o,r,l,n;if(!this.leadModel.isShowPacing||!((s=(i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)!=null&&s.length))return;(a=this.pacingGroup)==null||a.removeAll(),(o=this.sceneIns)==null||o.remove(this.pacingGroup);const e=this.leadHeadConfig.leadHedeWidth,t=this.canvasContainer.height-this.drawBottomPacH;(r=this.pacingGroup)==null||r.add(new m.Text({cursor:"",style:{x:e,y:t,text:"P",fontSize:this.pacingPFontSize,fill:this.leadConfig.lineColor,fontFamily:this.fontFamily}})),(l=this.pacingGroup)==null||l.add(new m.Polyline({cursor:"",name:"0_0",shape:{points:this.getPacinfPoints(e,t)},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth}})),(n=this.sceneIns)==null||n.add(this.pacingGroup)}getPacinfPoints(e,t){var i;return(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.PacingData)||[]).slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((s,a)=>{var o;return[e+a*(((o=this.formatEcgData)==null?void 0:o.step)||0)*this.sceneMagnification,(s===1?t-this.pacingh:t)+this.pacingPFontSize]})}createLeadHead(e,t,i){var o;const s=this.leadHeadConfig.leadHedeWidth/4;let a=(((o=this.formatEcgData)==null?void 0:o.sens)||0)*this.sceneMagnification;return a=i?a/2:a,new m.Polyline({cursor:"",shape:{points:[[0+e,0+t],[s+e,0+t],[s+e,-a+t],[3*s+e,-a+t],[3*s+e,0+t],[4*s+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,i){var s,a;return new m.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(i?(((s=this.formatEcgData)==null?void 0:s.sens)||0)*this.sceneMagnification/2:(((a=this.formatEcgData)==null?void 0:a.sens)||0)*this.sceneMagnification)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var i,s,a,o,r,l;(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.leadHeadGroup);let e=0,t=!1;for(let n=1;n<=this.totalRows;n++)e=0,t=!1,n<=this.leadModel.line?e=(((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.LeadName)||[])[n-1]||0:n>this.leadModel.line&&n-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[n-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[e])&&(t=!0),(r=this.leadHeadGroup)==null||r.add(this.createLeadHead(0,n*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var a,o,r,l,n,h,d,c,f,p,v,D,I;(a=this.splitLineGroup)==null||a.removeAll(),(o=this.sceneIns)==null||o.remove(this.splitLineGroup);const e=(this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/this.leadModel.column;if(this.splitPoint=e,this.isSingleMode){const P=y.getDataLenTimes(Math.ceil(this.splitPoint/((((r=this.formatEcgData)==null?void 0:r.step)||1)*this.sceneMagnification))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),C=parseInt(`${P/1e3%60}`,10);this.splitPoint=C*(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)*this.sceneMagnification}let t=0,i=0,s=0;for(let P=1;P<=this.leadModel.column-1;P++){t=P*e+this.leadHeadConfig.leadHedeWidth,i=P*this.leadModel.line;for(let C=1;C<=this.leadModel.line&&(s=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[C-1+i],s!==void 0);C++)((c=this.formatEcgData)==null?void 0:c.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(this.LeadNameTextsPorps[s])?(p=this.splitLineGroup)==null||p.add(this.creatSplitLine(t,C*this.splitBlockHeight-(((f=this.formatEcgData)==null?void 0:f.sens)||0)*this.sceneMagnification/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,C*this.splitBlockHeight-(((v=this.formatEcgData)==null?void 0:v.sens)||0)*this.sceneMagnification*.5))}(I=this.sceneIns)==null||I.add(this.splitLineGroup)}initSlidingWindowInfo(){var s,a;const e=(((s=this.formatEcgData)==null?void 0:s.step)||0)*this.sceneMagnification,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.scrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((a=this.formatEcgData)==null?void 0:a.dataPxLen)||0)*this.sceneMagnification-this.splitPoint);const i=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:i,startInd:0,endInd:i}}getRednerSinglePoints(){let e=0,t=0;const i=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let s=this.slidingWindowInfo.startInd||0,a=this.slidingWindowInfo.endInd||0;const o=[],r=Math.ceil(i.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let n=1;n<=r;n++)t=n*this.splitBlockHeight,n>1&&(t*=.8,s=a,a=s+(this.slidingWindowInfo.points||0)),n===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:s,endInd:a,data:i.slice(s,a).map((h,d)=>{var c;return[d*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification,-h*this.sceneMagnification]})})}return o}getRednerPoints(){let e=0,t=0,i=0,s=[],a=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const r=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(a=o,o=a+(this.slidingWindowInfo.points||0));for(let n=1;n<=this.leadModel.line&&(t=n*this.splitBlockHeight,!(i>(this.waveFromData||[]).length-1));n++)s=this.waveFromData[i]||[],i++,n===1&&(this.loopArrowY.rowAndCol=t),r.push({pos:[e,t],startInd:a,endInd:o,data:s.slice(a,o).map((h,d)=>{var c;return[d*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification,-h*this.sceneMagnification]})})}return r}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let i=0,s=0,a=[];for(let o=0;o<this.leadModel.add;o++)s=this.longLeadConfig.leadIdxs[o],i=(o+this.leadModel.line+1)*this.splitBlockHeight,a=this.waveFromData[s]||[],o===0&&(this.loopArrowY.add=i),e.push({pos:[t,i],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:a.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((r,l)=>{var n;return[l*(((n=this.formatEcgData)==null?void 0:n.step)||0)*this.sceneMagnification,-r*this.sceneMagnification]})});return e}createSingleWaveFrom(){var r,l,n,h,d,c,f;(r=this.singleWaveFromGroup)==null||r.removeAll();const e=(((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),i=y.getDataLenTimes(this.slidingWindowInfo.points||0,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0);const s=i;let a=0,o=0;for(let p=0;p<t.length&&!(t[p].pos[1]>this.drawArea.height+this.bottomAreaHeight);p++)this.isLeadDel(e)||(a=Math.floor(i/1e3/60),o=Math.floor(i/1e3%60),a=o===60?a+=1:a,a=a===0?"00":a<10?`0${a}`:a,o=o===0||o===60?"00":o<10?`0${o}`:o,(h=this.singleWaveFromGroup)==null||h.add(new m.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+p,shape:{points:t[p].data.map(([v,D])=>[v+t[p].pos[0],D+t[p].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:v=>{this.onDbClickWaveFrom(v,"single")}})),(c=this.singleWaveFromGroup)==null||c.add(new m.Text({cursor:"",style:{x:t[p].pos[0],y:t[p].pos[1]-(((d=this.formatEcgData)==null?void 0:d.sens)||0)*this.sceneMagnification/2,text:p===0?"00:00 \u5FC3\u7387":`${a}:${o} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),p>0&&(i+=s));this.createLeadName(e,t[0].pos[0]-10,t[0].pos[1]+10),this.createLeadOffAndDel(e,t[0].pos[0]-5,t[0].pos[1]-(((f=this.formatEcgData)==null?void 0:f.sens)||0)*this.sceneMagnification/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,i;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let s=0;s<e.length;s++)this.isLeadDel(this.longLeadConfig.leadIdxs[s])||((t=this.addwaveFromGroup)==null||t.add(new m.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[s]+"_"+s,shape:{points:e[s].data.map(([a,o])=>[a+e[s].pos[0],o+e[s].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:a=>{this.onDbClickWaveFrom(a,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[s],e[s].pos[0],e[s].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[s],e[s].pos[0]-5,e[s].pos[1]-(((i=this.formatEcgData)==null?void 0:i.sens)||0)*this.sceneMagnification/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var i,s,a,o,r,l;console.time("createRowAndColWaveFrom"),(i=this.rowAndColwaveFromGroup)==null||i.removeAll();let e=this.getRednerPoints(),t=0;for(let n=0;n<e.length;n++)t=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[n]||0,this.isLeadDel(t)||(a=this.rowAndColwaveFromGroup)==null||a.add(new m.Polyline({cursor:"",name:n+"_"+n,shape:{points:e[n].data.map(([h,d])=>[h+e[n].pos[0],d+e[n].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),n<this.leadModel.line?(this.createLeadName(t,e[n].pos[0],e[n].pos[1]-15),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)*this.sceneMagnification/2-15)):(this.createLeadName(t,e[n].pos[0]+5,e[n].pos[1]-(((r=this.formatEcgData)==null?void 0:r.sens)||0)*this.sceneMagnification/2),this.createLeadOffAndDel(t,e[n].pos[0]-5,e[n].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)*this.sceneMagnification/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,i,s=!1){var a;(a=this.leadHeadNameGroup)==null||a.add(new m.Text({style:{x:t,y:i,text:this.LeadNameTextsPorps[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:M(W({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:s})},onclick:o=>{this.$emit("notiifyLeadName",{event:M(W({},o),{name:this.LeadNameTextsPorps[e],idx:e}),isAdd:s})}}))}createLeadOffAndDel(e,t,i){var s;(this.isLeadOff(e)||this.isLeadDel(e))&&((s=this.leadHeadOffAndDelGroup)==null||s.add(new m.Text({cursor:"",style:{x:t,y:i,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var s,a,o,r,l,n;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new m.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.canvasContainer.height-25},e)}),i=new m.Text({style:W({text:`${((s=this.formatEcgData)==null?void 0:s.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(a=this.formatEcgData)==null?void 0:a.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(r=this.formatEcgData)==null?void 0:r.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.canvasContainer.height-this.ruleH},e)});(l=this.sceneIns)==null||l.add(i),(n=this.sceneIns)==null||n.add(t)}drawRuler(e=0){var o,r,l,n,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let i=this.leadHeadConfig.leadHedeWidth,s=0,a=t;if(this.leadModel.isContinuous)a=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=y.getPointIdxForPx(this.splitPoint,this.formatEcgData.step*this.sceneMagnification),c=y.getDataLenTimes(d,((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)/1e3;a=e+c}for(let d=e;d<=a;d=+(d+.1).toFixed(1))d!==e&&(i+=this.rulerStep*this.sceneMagnification),d%1===0?(s=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new m.Text({cursor:"",style:{x:i,y:s-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):s=this.canvasContainer.height-5,(n=this.rulerGroup)==null||n.add(new m.Line({cursor:"",shape:{x1:i,y1:s,x2:i,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,i;this.isSingleMode?(this.addWaveDataCopy=[],this.waveDataCopy=[],this.createSingleWaveFrom(),(e=this.sceneIns)==null||e.add(this.singleWaveFromGroup)):(this.singleWaveDataCopy=[],this.createAddWaveFrom(),this.createRowAndColWaveFrom(),(t=this.sceneIns)==null||t.add(this.rowAndColwaveFromGroup),(i=this.sceneIns)==null||i.add(this.addwaveFromGroup)),this.drawLeadHeadNameAndOffOrDel(),this.drawRuler(),this.drawLoopArrow()}drawLeadHeadNameAndOffOrDel(){var e,t;(e=this.sceneIns)==null||e.add(this.leadHeadNameGroup),(t=this.sceneIns)==null||t.add(this.leadHeadOffAndDelGroup)}drawLoopArrow(e=0){var l,n,h,d,c,f,p,v,D,I,P,C,H,S,L,x,b;if(this.drawLoopArrowStartPosIdx=e,!this.heartFight.isShow)return;this.heartFight.mode&&this.currentHeardBeat.heardBeat===null&&(this.currentHeardBeat.heardBeat=((l=this.formatEcgData)==null?void 0:l.heartBeatPosition[this.heartFight.defaultSelect])||null,this.drawHeardBeatLine());let t=0,i=0;this.leadModel.add?i=this.loopArrowY.add-(((n=this.formatEcgData)==null?void 0:n.sens)||0)*this.sceneMagnification-this.splitBlockHeight/3.5:i=20;let s=0,a=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let r=0;for(let F=0;F<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;F++){const u=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[F];if(r=((u==null?void 0:u.position)||0)-e,!(e>((u==null?void 0:u.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&r>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&r>(this.slidingWindowInfo.points||0))){if(((u==null?void 0:u.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=r*(((c=this.formatEcgData)==null?void 0:c.step)||0)*this.sceneMagnification+this.leadHeadConfig.leadHedeWidth-9.5,a=0,(v=this.arrowGroup)==null||v.add(new m.Polygon({name:"arrow_box",shape:{points:[[4+t,0+i],[15+t,0+i],[15+t,10+i],[19+t,10+i],[9.5+t,22+i],[0+t,10+i],[4+t,10+i],[4+t,0+i]]},style:{fill:((p=(f=this.currentHeardBeat)==null?void 0:f.heardBeat)==null?void 0:p.index)===(u==null?void 0:u.index)?"blue":"#ccc"},onclick:A=>{var E;!this.heartFight.mode||(A.target.attr({style:{fill:"blue"}}),(E=this.arrowGroup)==null||E.children().filter(G=>G.name==="arrow_box").forEach(G=>{G.id!==A.target.id&&G.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(u,A.target))}})),this.heartFight.heartrate&&(s=((D=this.AssistCtx)==null?void 0:D.measureText(`${(u==null?void 0:u.heartrate)||""}`).width)||0,(I=this.arrowGroup)==null||I.add(new m.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(u==null?void 0:u.heartrate)||""}`},o)})),a+=12),this.heartFight.interval&&(s=((P=this.AssistCtx)==null?void 0:P.measureText(`${(u==null?void 0:u.interval)||""}`).width)||0,(C=this.arrowGroup)==null||C.add(new m.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(u==null?void 0:u.interval)||""}`},o)})),a+=12),this.heartFight.qrstCompany&&(s=((H=this.AssistCtx)==null?void 0:H.measureText(`${(u==null?void 0:u.qrstCompany)||""}`).width)||0,(S=this.arrowGroup)==null||S.add(new m.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(u==null?void 0:u.qrstCompany)||""}`},o)})),a+=12),this.heartFight.telectricalaxis&&(s=((L=this.AssistCtx)==null?void 0:L.measureText(`${(u==null?void 0:u.telectricalaxis)||""}`).width)||0,(x=this.arrowGroup)==null||x.add(new m.Text({cursor:"",style:W({x:4+t-s*1.5,y:a+i,text:`${(u==null?void 0:u.telectricalaxis)||""}`},o)})))}}(b=this.sceneIns)==null||b.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",m.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var r,l,n,h,d,c;if(!this.currentHeardBeat.heardBeat)return;(r=this.heardBeatLineGroup)==null||r.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,i=0,s=this.getRednerPoints(),a=this.getAddRednerPoints(),o;for(const f in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(f)&&Object.prototype.hasOwnProperty.call(t,f)){i=(t[f]-this.slidingWindowInfo.startInd)*(((n=this.formatEcgData)==null?void 0:n.step)||0)*this.sceneMagnification;e:for(let p=0;p<s.length;p++)if(!(this.isLeadOff(p)||this.isLeadDel(p))){if(e>t[f]||!this.leadModel.isContinuous&&t[f]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=s[p],this.leadModel.isContinuous&&p>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}e:for(let p=0;p<a.length;p++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[p])&&this.isLeadDel(this.longLeadConfig.leadIdxs[p]))){if(e>t[f])break e;o=a[p],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+i,o.pos[1]))}}(c=this.sceneIns)==null||c.add(this.heardBeatLineGroup),t=null,s=null,a=null}createHeardBeatLine(e,t){return new m.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}nativeScrollFunc(e){console.log("event",e,e.target.scrollLeft),this.scrollCommon(e.target.scrollLeft||0)}handleScroll(e,t,i){t.type==="horizontal"&&(t.scrollLeft=t.scrollLeft||0,this.scrollCommon(t.scrollLeft))}scrollCommon(e){var i;if(this.sceneIsMoveUpDown)return;const t=y.getPointIdxForPx(e,(((i=this.formatEcgData)==null?void 0:i.step)||1)*this.sceneMagnification);this.rulerHistorySlidIdxs=t,this.scrollWaveFrom(t),this.scrollRuler(t),this.scrollArrow(t),this.$emit("notifyScrollPointIdx",t)}scrollWaveFrom(e){var s,a,o,r,l,n;this.slidingWindowInfo.startInd=e,this.slidingWindowInfo.endInd=e+(this.slidingWindowInfo.points||0),this.addSlidingWindowInfo.startInd=e,this.addSlidingWindowInfo.endInd=e+(this.addSlidingWindowInfo.points||0);let t=this.getRednerPoints(),i=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=i,(s=this.rowAndColwaveFromGroup)==null||s.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:t[d].data.map(([c,f])=>[c+t[d].pos[0],f+t[d].pos[1]])}})}),(a=this.addwaveFromGroup)==null||a.eachChild((h,d)=>{d=d||0,h.attr({shape:{points:i[d].data.map(([c,f])=>[c+i[d].pos[0],f+i[d].pos[1]])}})}),this.leadModel.isShowPacing&&((r=(o=this.formatEcgData)==null?void 0:o.processedData.otherParams.PacingData)==null?void 0:r.length)&&((n=(l=this.pacingGroup)==null?void 0:l.childOfName("0_0"))==null||n.attr({shape:{points:this.getPacinfPoints(this.leadHeadConfig.leadHedeWidth,this.canvasContainer.height-this.drawBottomPacH)}})),t=null,i=null}scrollRuler(e){var i,s,a;(i=this.rulerGroup)==null||i.removeAll(),(s=this.sceneIns)==null||s.remove(this.rulerGroup);const t=y.getDataLenTimes(this.isSingleMode?0:e,((a=this.formatEcgData)==null?void 0:a.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,i;(t=this.arrowGroup)==null||t.removeAll(),(i=this.sceneIns)==null||i.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};g([w.Prop({default:()=>.04})],exports.default.prototype,"zoomStep",2);g([w.Prop({default:()=>!0})],exports.default.prototype,"supportTwoFingerZoom",2);g([w.Prop({default:()=>""})],exports.default.prototype,"prefixId",2);g([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);g([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);g([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);g([w.Prop({default:()=>y.LeadNameTexts})],exports.default.prototype,"LeadNameTextsPorps",2);g([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);g([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);g([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);g([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);g([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);g([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);g([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);g([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);g([w.Prop({default:5})],exports.default.prototype,"magnification",2);g([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);g([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);g([w.Prop({default:()=>({isShow:!0,isNativeScroll:!1,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"scrollConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);g([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);g([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);g([w.Prop({default:y.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);g([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);g([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);g([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);g([w.Prop({default:!0})],exports.default.prototype,"isMXEnlargeWaveShow",2);g([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);g([y.throttling(200)],exports.default.prototype,"sceneInsMousemove",1);g([y.throttling(200)],exports.default.prototype,"nativeScrollFunc",1);g([y.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=g([X.default({name:"Methods"})],exports.default);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "costy-plus",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2-0",
|
|
4
4
|
"main": "dist/lib/index.js",
|
|
5
5
|
"module": "dist/es/index.js",
|
|
6
6
|
"types": "dist/es/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "",
|
|
21
21
|
"typings": "dist/lib/index.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@costy-plus/utils": "0.0.
|
|
23
|
+
"@costy-plus/utils": "0.0.16-0",
|
|
24
24
|
"element-ui": "~2.15.11",
|
|
25
25
|
"vuescroll": "4.17.5",
|
|
26
26
|
"zrender": "^5.5.0"
|