costy-plus 1.0.30-0 → 1.0.32-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.
@@ -23,7 +23,7 @@ var ie = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, u = (e, t,
23
23
  };
24
24
  let p = class extends K {
25
25
  constructor() {
26
- super(...arguments), this.AssistCtx = Object.freeze(null), this.sceneIns = Object.freeze(null), this.layerBgGroup = Object.freeze(null), this.leadHeadGroup = Object.freeze(null), this.splitLineGroup = Object.freeze(null), this.rowAndColwaveFromGroup = Object.freeze(null), this.singleWaveFromGroup = Object.freeze(null), this.addwaveFromGroup = Object.freeze(null), this.leadHeadNameGroup = Object.freeze(null), this.leadHeadOffAndDelGroup = Object.freeze(null), this.rulerGroup = Object.freeze(null), this.arrowGroup = Object.freeze(null), this.heardBeatLineGroup = Object.freeze(null), this.bottomAreaHeight = Object.freeze(100), 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 = {
26
+ super(...arguments), this.AssistCtx = Object.freeze(null), this.sceneIns = Object.freeze(null), this.layerBgGroup = Object.freeze(null), this.leadHeadGroup = Object.freeze(null), this.splitLineGroup = Object.freeze(null), this.rowAndColwaveFromGroup = Object.freeze(null), this.singleWaveFromGroup = Object.freeze(null), this.addwaveFromGroup = Object.freeze(null), this.leadHeadNameGroup = Object.freeze(null), this.leadHeadOffAndDelGroup = Object.freeze(null), this.rulerGroup = Object.freeze(null), this.arrowGroup = Object.freeze(null), this.heardBeatLineGroup = Object.freeze(null), this.bottomAreaHeight = Object.freeze(80), 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 = {
27
27
  heardBeat: null,
28
28
  ele: null
29
29
  }, this.loopArrowY = Object.freeze({
@@ -1 +1 @@
1
- "use strict";var B=Object.defineProperty,R=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var k=(e,t,a)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,W=(e,t)=>{for(var a in t||(t={}))N.call(t,a)&&k(e,a,t[a]);if(O)for(var a of O(t))z.call(t,a)&&k(e,a,t[a]);return e},A=(e,t)=>R(e,T(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("vue"),_=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 w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),v=require("@costy-plus/utils"),u=require("zrender"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},X=$(j);var q=Object.defineProperty,V=Object.getOwnPropertyDescriptor,c=(e,t,a,i)=>{for(var s=i>1?void 0:i?V(t,a):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,a,s):n(s))||s);return i&&s&&q(t,a,s),s};exports.default=class extends X.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(100),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.splitBlockHeight=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.isShowEnlargeWave=!1}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.vuescrollConfig.isShow&&parseInt(`${(e=this.vuescrollConfig.bar)==null?void 0:e.size}`)||0)||0}}get waveFromData(){var e,t,a;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===v.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((a=this.formatEcgData)==null?void 0:a.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,a,i,s,o,n,l,r,h,d;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(a=this.addwaveFromGroup)==null||a.removeAll(),(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.sceneIns)==null||d.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.vuescrollConfig.isShow?this.$nextTick(()=>{var t,a;this.$refs.vueScroll.scrollBy({dx:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((a=this.formatEcgData)==null?void 0:a.step)||0)})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){var a;(a=this.sceneIns)==null||a.dispose(),this.AssistCtx=null;const e=document.getElementById("wave-from-box");this.sceneIns=u.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById("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,a;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(a=this.sceneIns)==null||a.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,a,i,s,o,n,l,r,h,d,m;this.rowAndColwaveFromGroup=new u.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new u.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new u.Group({name:"addwaveFrom"}),this.leadHeadGroup=new u.Group({name:"leadHead"}),this.splitLineGroup=new u.Group({name:"splitLine"}),this.leadHeadNameGroup=new u.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new u.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new u.Group({name:"ruler"}),this.arrowGroup=new u.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new u.Group({name:"heardBeatLine"}),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.ecgareawidth)==="1"){const p=v.getPrintLengthToPx(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;p<=e&&(e=p)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||0)+this.leadHeadConfig.leadHedeWidth);this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:0,startInd:0,endInd:0},this.addSlidingWindowInfo={points:0,startInd:0,endInd:0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=((n=this.formatEcgData)==null?void 0:n.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=(((r=this.formatEcgData)==null?void 0:r.analysisValueMode)===v.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.splitBlockHeight=this.drawArea.height/this.totalRows,this.dataTotalTimes=v.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)*(((m=this.formatEcgData)==null?void 0:m.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 a=Date.now(),i=()=>{var m,p,g,C;const s=e.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let n=0,l=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let r=v.getPointIdxForPx(n,((m=this.formatEcgData)==null?void 0:m.step)||1);r+=l;const h=((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(r<=h[1].KeyPosByBeat.Tend+.1*(((g=this.formatEcgData)==null?void 0:g.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(r>h[D-1].KeyPosByBeat.Tend+1&&r<h[D].KeyPosByBeat.Tend+.1*(((C=this.formatEcgData)==null?void 0:C.processedData.otherParams.SampleRate)||0)){d=h[D];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=A(W({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};a-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,i()):this.dbClickWaveFromTime=a}sceneInsMousemove(e){this.sceneIsMouseDown&&this.$refs.vueScroll.scrollBy({dx:e.offsetX-this.sceneIsMouseDownX})}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}createLeadHead(e,t,a){var o;const i=this.leadHeadConfig.leadHedeWidth/4;let s=((o=this.formatEcgData)==null?void 0:o.sens)||0;return s=a?s/2:s,new u.Polyline({cursor:"",shape:{points:[[0+e,0+t],[i+e,0+t],[i+e,-s+t],[3*i+e,-s+t],[3*i+e,0+t],[4*i+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,a){var i,s;return new u.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(a?(((i=this.formatEcgData)==null?void 0:i.sens)||0)/2:((s=this.formatEcgData)==null?void 0:s.sens)||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var a,i,s,o,n,l;(a=this.leadHeadGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.leadHeadGroup);let e=0,t=!1;for(let r=1;r<=this.totalRows;r++)e=0,t=!1,r<=this.leadModel.line?e=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[r-1]||0:r>this.leadModel.line&&r-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[r-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[e])&&(t=!0),(n=this.leadHeadGroup)==null||n.add(this.createLeadHead(0,r*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var s,o,n,l,r,h,d,m,p,g,C,D,P;(s=this.splitLineGroup)==null||s.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=v.getDataLenTimes(Math.ceil(this.splitPoint/(((n=this.formatEcgData)==null?void 0:n.step)||1))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),y=parseInt(`${I/1e3%60}`,10);this.splitPoint=y*(((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)}let t=0,a=0,i=0;for(let I=1;I<=this.leadModel.column-1;I++){t=I*e+this.leadHeadConfig.leadHedeWidth,a=I*this.leadModel.line;for(let y=1;y<=this.leadModel.line&&(i=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[y-1+a],i!==void 0);y++)((m=this.formatEcgData)==null?void 0:m.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[i])?(g=this.splitLineGroup)==null||g.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((p=this.formatEcgData)==null?void 0:p.sens)||0)/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((C=this.formatEcgData)==null?void 0:C.sens)||0)*.5))}(P=this.sceneIns)==null||P.add(this.splitLineGroup)}initSlidingWindowInfo(){var i,s;const e=((i=this.formatEcgData)==null?void 0:i.step)||0,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.vuescrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint);const a=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:a,startInd:0,endInd:a}}getRednerSinglePoints(){let e=0,t=0;const a=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let i=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],n=Math.ceil(a.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let r=1;r<=n;r++)t=r*this.splitBlockHeight,r>1&&(t*=.8,i=s,s=i+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:i,endInd:s,data:a.slice(i,s).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return o}getRednerPoints(){let e=0,t=0,a=0,i=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(s=o,o=s+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(t=r*this.splitBlockHeight,!(a>(this.waveFromData||[]).length-1));r++)i=this.waveFromData[a]||[],a++,r===1&&(this.loopArrowY.rowAndCol=t),n.push({pos:[e,t],startInd:s,endInd:o,data:i.slice(s,o).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return n}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let a=0,i=0,s=[];for(let o=0;o<this.leadModel.add;o++)i=this.longLeadConfig.leadIdxs[o],a=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[i]||[],o===0&&(this.loopArrowY.add=a),e.push({pos:[t,a],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((n,l)=>{var r;return[l*(((r=this.formatEcgData)==null?void 0:r.step)||0),-n]})});return e}createSingleWaveFrom(){var o,n,l,r,h,d,m;(o=this.singleWaveFromGroup)==null||o.removeAll();const e=(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),a=v.getDataLenTimes(this.slidingWindowInfo.points||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),i=0,s=0;for(let p=0;p<t.length&&!(t[p].pos[1]>this.drawArea.height+this.bottomAreaHeight);p++)this.isLeadDel(e)||(i=parseInt(`${a/1e3/60}`,10),s=parseInt(`${a/1e3%60}`,10),i=s===60?i+=1:i,i=i===0?"00":i<10?`0${i}`:i,s=s===0||s===60?"00":s<10?`0${s}`:s,(r=this.singleWaveFromGroup)==null||r.add(new u.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+p,shape:{points:t[p].data.map(([g,C])=>[g+t[p].pos[0],C+t[p].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:g=>{this.onDbClickWaveFrom(g,"single")}})),(d=this.singleWaveFromGroup)==null||d.add(new u.Text({cursor:"",style:{x:t[p].pos[0],y:t[p].pos[1]-(((h=this.formatEcgData)==null?void 0:h.sens)||0)/2,text:p===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),p>0&&(a+=a));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]-(((m=this.formatEcgData)==null?void 0:m.sens)||0)/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,a;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let i=0;i<e.length;i++)this.isLeadDel(this.longLeadConfig.leadIdxs[i])||((t=this.addwaveFromGroup)==null||t.add(new u.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[i]+"_"+i,shape:{points:e[i].data.map(([s,o])=>[s+e[i].pos[0],o+e[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[i],e[i].pos[0],e[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[i],e[i].pos[0]-5,e[i].pos[1]-(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var a,i,s,o,n,l;console.time("createRowAndColWaveFrom"),(a=this.rowAndColwaveFromGroup)==null||a.removeAll();let e=this.getRednerPoints(),t=0;for(let r=0;r<e.length;r++)t=(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.LeadName)||[])[r]||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new u.Polyline({cursor:"",name:r+"_"+r,shape:{points:e[r].data.map(([h,d])=>[h+e[r].pos[0],d+e[r].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),r<this.leadModel.line?(this.createLeadName(t,e[r].pos[0],e[r].pos[1]-15),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(t,e[r].pos[0]+5,e[r].pos[1]-(((n=this.formatEcgData)==null?void 0:n.sens)||0)/2),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,a,i=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new u.Text({style:{x:t,y:a,text:v.LeadNameTexts[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})},onclick:o=>{this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})}}))}createLeadOffAndDel(e,t,a){var i;(this.isLeadOff(e)||this.isLeadDel(e))&&((i=this.leadHeadOffAndDelGroup)==null||i.add(new u.Text({cursor:"",style:{x:t,y:a,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var i,s,o,n,l,r;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new u.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.drawArea.height+this.bottomAreaHeight-25},e)}),a=new u.Text({style:W({text:`${((i=this.formatEcgData)==null?void 0:i.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(s=this.formatEcgData)==null?void 0:s.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(n=this.formatEcgData)==null?void 0:n.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.drawArea.height+this.bottomAreaHeight-40},e)});(l=this.sceneIns)==null||l.add(a),(r=this.sceneIns)==null||r.add(t)}drawRuler(e=0){var o,n,l,r,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let a=this.leadHeadConfig.leadHedeWidth,i=0,s=t;if(this.leadModel.isContinuous)s=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=v.getPointIdxForPx(this.splitPoint,this.formatEcgData.step),m=v.getDataLenTimes(d,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)/1e3;s=e+m}for(let d=e;d<=s;d=+(d+.1).toFixed(1))d!==e&&(a+=this.rulerStep),d%1===0?(i=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new u.Text({cursor:"",style:{x:a,y:i-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):i=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new u.Line({cursor:"",shape:{x1:a,y1:i,x2:a,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,a;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),(a=this.sceneIns)==null||a.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,r,h,d,m,p,g,C,D,P,I,y,S,E,x,G,M;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,a=0;this.leadModel.add?a=this.loopArrowY.add-(((r=this.formatEcgData)==null?void 0:r.sens)||0)-this.splitBlockHeight/3.5:a=20;let i=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let n=0;for(let H=0;H<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;H++){const f=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[H];if(n=((f==null?void 0:f.position)||0)-e,!(e>((f==null?void 0:f.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&n>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&n>(this.slidingWindowInfo.points||0))){if(((f==null?void 0:f.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=n*(((m=this.formatEcgData)==null?void 0:m.step)||0)+this.leadHeadConfig.leadHedeWidth-9.5,s=0,(C=this.arrowGroup)==null||C.add(new u.Polygon({name:"arrow_box",shape:{points:[[4+t,0+a],[15+t,0+a],[15+t,10+a],[19+t,10+a],[9.5+t,22+a],[0+t,10+a],[4+t,10+a],[4+t,0+a]]},style:{fill:((g=(p=this.currentHeardBeat)==null?void 0:p.heardBeat)==null?void 0:g.index)===(f==null?void 0:f.index)?"blue":"#ccc"},onclick:F=>{var b;!this.heartFight.mode||(F.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(L=>L.name==="arrow_box").forEach(L=>{L.id!==F.target.id&&L.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(f,F.target))}})),this.heartFight.heartrate&&(i=((D=this.AssistCtx)==null?void 0:D.measureText(`${(f==null?void 0:f.heartrate)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(i=((I=this.AssistCtx)==null?void 0:I.measureText(`${(f==null?void 0:f.interval)||""}`).width)||0,(y=this.arrowGroup)==null||y.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(i=((S=this.AssistCtx)==null?void 0:S.measureText(`${(f==null?void 0:f.qrstCompany)||""}`).width)||0,(E=this.arrowGroup)==null||E.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(i=((x=this.AssistCtx)==null?void 0:x.measureText(`${(f==null?void 0:f.telectricalaxis)||""}`).width)||0,(G=this.arrowGroup)==null||G.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.telectricalaxis)||""}`},o)})))}}(M=this.sceneIns)==null||M.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",u.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,l,r,h,d,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,a=0,i=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const p in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(p)&&Object.prototype.hasOwnProperty.call(t,p)){a=(t[p]-this.slidingWindowInfo.startInd)*(((r=this.formatEcgData)==null?void 0:r.step)||0);e:for(let g=0;g<i.length;g++)if(!(this.isLeadOff(g)||this.isLeadDel(g))){if(e>t[p]||!this.leadModel.isContinuous&&t[p]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=i[g],this.leadModel.isContinuous&&g>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}e:for(let g=0;g<s.length;g++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[g])&&this.isLeadDel(this.longLeadConfig.leadIdxs[g]))){if(e>t[p])break e;o=s[g],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}}(m=this.sceneIns)==null||m.add(this.heardBeatLineGroup),t=null,i=null,s=null}createHeardBeatLine(e,t){return new u.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}handleScroll(e,t,a){var i;if(t.type==="horizontal"){t.scrollLeft=t.scrollLeft||0;const s=v.getPointIdxForPx(t.scrollLeft,((i=this.formatEcgData)==null?void 0:i.step)||1);this.scrollWaveFrom(s),this.scrollRuler(s),this.scrollArrow(s),this.$emit("notifyScrollPointIdx",s)}}scrollWaveFrom(e){var i,s;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(),a=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=a,(i=this.rowAndColwaveFromGroup)==null||i.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:t[n].data.map(([l,r])=>[l+t[n].pos[0],r+t[n].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:a[n].data.map(([l,r])=>[l+a[n].pos[0],r+a[n].pos[1]])}})}),t=null,a=null}scrollRuler(e){var a,i,s;(a=this.rulerGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.rulerGroup);const t=v.getDataLenTimes(this.isSingleMode?0:e,((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,a;(t=this.arrowGroup)==null||t.removeAll(),(a=this.sceneIns)==null||a.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);c([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);c([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);c([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);c([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);c([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);c([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);c([w.Prop({default:()=>({isShow:!0,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"vuescrollConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);c([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);c([w.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);c([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);c([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);c([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([_.default({name:"Methods"})],exports.default);
1
+ "use strict";var B=Object.defineProperty,R=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var k=(e,t,a)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,W=(e,t)=>{for(var a in t||(t={}))N.call(t,a)&&k(e,a,t[a]);if(O)for(var a of O(t))z.call(t,a)&&k(e,a,t[a]);return e},A=(e,t)=>R(e,T(t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("vue"),_=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 w=require("../../node_modules/.pnpm/vue-property-decorator@9.1.2_zrnidtknow37s43kh2nsmp2h4u/node_modules/vue-property-decorator/lib/decorators/Prop.js"),v=require("@costy-plus/utils"),u=require("zrender"),$=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},X=$(j);var q=Object.defineProperty,V=Object.getOwnPropertyDescriptor,c=(e,t,a,i)=>{for(var s=i>1?void 0:i?V(t,a):t,o=e.length-1,n;o>=0;o--)(n=e[o])&&(s=(i?n(t,a,s):n(s))||s);return i&&s&&q(t,a,s),s};exports.default=class extends X.default{constructor(){super(...arguments),this.AssistCtx=Object.freeze(null),this.sceneIns=Object.freeze(null),this.layerBgGroup=Object.freeze(null),this.leadHeadGroup=Object.freeze(null),this.splitLineGroup=Object.freeze(null),this.rowAndColwaveFromGroup=Object.freeze(null),this.singleWaveFromGroup=Object.freeze(null),this.addwaveFromGroup=Object.freeze(null),this.leadHeadNameGroup=Object.freeze(null),this.leadHeadOffAndDelGroup=Object.freeze(null),this.rulerGroup=Object.freeze(null),this.arrowGroup=Object.freeze(null),this.heardBeatLineGroup=Object.freeze(null),this.bottomAreaHeight=Object.freeze(80),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.splitBlockHeight=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.isShowEnlargeWave=!1}get canvasContainer(){var e;return{width:this.width,height:this.height-(this.vuescrollConfig.isShow&&parseInt(`${(e=this.vuescrollConfig.bar)==null?void 0:e.size}`)||0)||0}}get waveFromData(){var e,t,a;return((e=this.formatEcgData)==null?void 0:e.analysisValueMode)===v.AnalysisMode.CompoundWave?((t=this.formatEcgData)==null?void 0:t.processedData.handleData.ComplexData)||[[]]:((a=this.formatEcgData)==null?void 0:a.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,a,i,s,o,n,l,r,h,d;this.sceneInsEventOff(),(e=this.rowAndColwaveFromGroup)==null||e.removeAll(),(t=this.singleWaveFromGroup)==null||t.removeAll(),(a=this.addwaveFromGroup)==null||a.removeAll(),(i=this.leadHeadGroup)==null||i.removeAll(),(s=this.splitLineGroup)==null||s.removeAll(),(o=this.leadHeadNameGroup)==null||o.removeAll(),(n=this.leadHeadOffAndDelGroup)==null||n.removeAll(),(l=this.rulerGroup)==null||l.removeAll(),(r=this.arrowGroup)==null||r.removeAll(),(h=this.heardBeatLineGroup)==null||h.removeAll(),(d=this.sceneIns)==null||d.dispose()}init(){var e;this.initWaveFormPeer(),this.combinationDrawing(),(e=this.formatEcgData)!=null&&e.processedData.otherParams.PosStart&&(this.vuescrollConfig.isShow?this.$nextTick(()=>{var t,a;this.$refs.vueScroll.scrollBy({dx:(((t=this.formatEcgData)==null?void 0:t.processedData.otherParams.PosStart)||0)*(((a=this.formatEcgData)==null?void 0:a.step)||0)})}):(this.scrollWaveFrom(this.formatEcgData.processedData.otherParams.PosStart),this.scrollRuler(this.formatEcgData.processedData.otherParams.PosStart),this.scrollArrow(this.formatEcgData.processedData.otherParams.PosStart)))}initWaveFormPeer(){var a;(a=this.sceneIns)==null||a.dispose(),this.AssistCtx=null;const e=document.getElementById("wave-from-box");this.sceneIns=u.init(e,{width:this.canvasContainer.width,height:this.canvasContainer.height,devicePixelRatio:2});const t=document.getElementById("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,a;(e=this.sceneIns)==null||e.off("mousemove",this.sceneInsMousemove),(t=this.sceneIns)==null||t.off("mousedown",this.sceneInsMouseDown),(a=this.sceneIns)==null||a.off("mouseup",this.sceneInsMouseUp)}combinationDrawing(){this.initConfig(),this.drawLeadHead(),this.drawColSplitLine(),this.initSlidingWindowInfo(),this.drawRulerNotes(),this.drawWaveFrom()}initConfig(){var t,a,i,s,o,n,l,r,h,d,m;this.rowAndColwaveFromGroup=new u.Group({name:"rowAndColwaveFrom"}),this.singleWaveFromGroup=new u.Group({name:"singleWaveFrom"}),this.addwaveFromGroup=new u.Group({name:"addwaveFrom"}),this.leadHeadGroup=new u.Group({name:"leadHead"}),this.splitLineGroup=new u.Group({name:"splitLine"}),this.leadHeadNameGroup=new u.Group({name:"leadHeadName"}),this.leadHeadOffAndDelGroup=new u.Group({name:"leadHeadOffAndDel"}),this.rulerGroup=new u.Group({name:"ruler"}),this.arrowGroup=new u.Group({name:"arrowLoop"}),this.heardBeatLineGroup=new u.Group({name:"heardBeatLine"}),this.vuescrollWH.width=this.width,this.vuescrollWH.height=this.height;let e=this.canvasContainer.width;if(((a=(t=this.conventionalECGConfig)==null?void 0:t.ecgReviewSetting)==null?void 0:a.ecgareawidth)==="1"){const p=v.getPrintLengthToPx(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.SampleRate)||0)+this.leadHeadConfig.leadHedeWidth;p<=e&&(e=p)}else this.leadModel.isContinuous&&!this.isSingleMode&&(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)<e-this.leadHeadConfig.leadHedeWidth&&(e=(((o=this.formatEcgData)==null?void 0:o.dataPxLen)||0)+this.leadHeadConfig.leadHedeWidth);this.drawArea={width:e,height:this.canvasContainer.height-this.bottomAreaHeight},this.slidingWindowInfo={points:0,startInd:0,endInd:0},this.addSlidingWindowInfo={points:0,startInd:0,endInd:0},this.loopArrowY={add:0,rowAndCol:0},this.currentHeardBeat={heardBeat:null,ele:null},this.leadNameList=((n=this.formatEcgData)==null?void 0:n.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=(((r=this.formatEcgData)==null?void 0:r.analysisValueMode)===v.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.splitBlockHeight=this.drawArea.height/this.totalRows,this.dataTotalTimes=v.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)*(((m=this.formatEcgData)==null?void 0:m.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 a=Date.now(),i=()=>{var m,p,g,C;const s=e.target.name.split("_");this.activeLeadIdx=+s[0];const o=+s[1];let n=0,l=0;t==="single"?(n=e.offsetX-this.singleWaveDataCopy[o].pos[0],l=this.singleWaveDataCopy[o].startInd):t==="rowAndCol"?(n=e.offsetX-this.waveDataCopy[o].pos[0],l=this.waveDataCopy[o].startInd||0):t==="add"&&(n=e.offsetX-this.addWaveDataCopy[o].pos[0],l=this.addWaveDataCopy[o].startInd||0);let r=v.getPointIdxForPx(n,((m=this.formatEcgData)==null?void 0:m.step)||1);r+=l;const h=((p=this.formatEcgData)==null?void 0:p.processedData.otherParams.AnalyseValue)||[];let d=null;if(this.enlargeWaveMode===v.AnalysisMode.SelectedHeartbeat){if(r<=h[1].KeyPosByBeat.Tend+.1*(((g=this.formatEcgData)==null?void 0:g.processedData.otherParams.SampleRate)||0))d=h[1];else for(let D=1;D<h.length;D++)if(r>h[D-1].KeyPosByBeat.Tend+1&&r<h[D].KeyPosByBeat.Tend+.1*(((C=this.formatEcgData)==null?void 0:C.processedData.otherParams.SampleRate)||0)){d=h[D];break}}else d=h[0];!d||(this.activeLeadAnalyseValue=A(W({},d),{BeatCount:h.length-1}),d=null,this.$emit("notifyActiveEnlargr"),this.isShowEnlargeWave=!0)};a-this.dbClickWaveFromTime<400?(this.dbClickWaveFromTime=0,i()):this.dbClickWaveFromTime=a}sceneInsMousemove(e){this.sceneIsMouseDown&&this.$refs.vueScroll.scrollBy({dx:e.offsetX-this.sceneIsMouseDownX})}sceneInsMouseDown(e){this.sceneIsMouseDown=!0,this.sceneIsMouseDownX=e.offsetX}sceneInsMouseUp(e){this.sceneIsMouseDown=!1}createLeadHead(e,t,a){var o;const i=this.leadHeadConfig.leadHedeWidth/4;let s=((o=this.formatEcgData)==null?void 0:o.sens)||0;return s=a?s/2:s,new u.Polyline({cursor:"",shape:{points:[[0+e,0+t],[i+e,0+t],[i+e,-s+t],[3*i+e,-s+t],[3*i+e,0+t],[4*i+e,0+t]]},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}creatSplitLine(e,t,a){var i,s;return new u.Line({cursor:"",shape:{x1:0+e,y1:0+t,x2:0+e,y2:(a?(((i=this.formatEcgData)==null?void 0:i.sens)||0)/2:((s=this.formatEcgData)==null?void 0:s.sens)||0)+t},style:{stroke:this.leadHeadConfig.leadHedeColor,lineWidth:this.leadHeadConfig.leadHedeLineWidth}})}drawLeadHead(){var a,i,s,o,n,l;(a=this.leadHeadGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.leadHeadGroup);let e=0,t=!1;for(let r=1;r<=this.totalRows;r++)e=0,t=!1,r<=this.leadModel.line?e=(((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.LeadName)||[])[r-1]||0:r>this.leadModel.line&&r-this.leadModel.line<=this.leadModel.add&&(e=this.longLeadConfig.leadNames[r-this.leadModel.line-1]),((o=this.formatEcgData)==null?void 0:o.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[e])&&(t=!0),(n=this.leadHeadGroup)==null||n.add(this.createLeadHead(0,r*this.splitBlockHeight,t));(l=this.sceneIns)==null||l.add(this.leadHeadGroup)}drawColSplitLine(){var s,o,n,l,r,h,d,m,p,g,C,D,P;(s=this.splitLineGroup)==null||s.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=v.getDataLenTimes(Math.ceil(this.splitPoint/(((n=this.formatEcgData)==null?void 0:n.step)||1))||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),y=parseInt(`${I/1e3%60}`,10);this.splitPoint=y*(((r=this.formatEcgData)==null?void 0:r.processedData.otherParams.SampleRate)||0)*(((h=this.formatEcgData)==null?void 0:h.step)||0)}let t=0,a=0,i=0;for(let I=1;I<=this.leadModel.column-1;I++){t=I*e+this.leadHeadConfig.leadHedeWidth,a=I*this.leadModel.line;for(let y=1;y<=this.leadModel.line&&(i=(((d=this.formatEcgData)==null?void 0:d.processedData.otherParams.LeadName)||[])[y-1+a],i!==void 0);y++)((m=this.formatEcgData)==null?void 0:m.gainName)==="\u80F8\u5BFC\u51CF\u534A"&&/^V\w+/.test(v.LeadNameTexts[i])?(g=this.splitLineGroup)==null||g.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((p=this.formatEcgData)==null?void 0:p.sens)||0)/2*.5,!0)):(D=this.splitLineGroup)==null||D.add(this.creatSplitLine(t,y*this.splitBlockHeight-(((C=this.formatEcgData)==null?void 0:C.sens)||0)*.5))}(P=this.sceneIns)==null||P.add(this.splitLineGroup)}initSlidingWindowInfo(){var i,s;const e=((i=this.formatEcgData)==null?void 0:i.step)||0,t=Math.ceil(this.splitPoint/e);this.slidingWindowInfo={points:t,startInd:0,endInd:t},this.vuescrollConfig.isShow&&!this.isSingleMode&&(this.vuescrollWH.width=this.canvasContainer.width+(((s=this.formatEcgData)==null?void 0:s.dataPxLen)||0)-this.splitPoint);const a=Math.ceil((this.drawArea.width-this.leadHeadConfig.leadHedeWidth)/e);this.addSlidingWindowInfo={points:a,startInd:0,endInd:a}}getRednerSinglePoints(){let e=0,t=0;const a=this.waveFromData[this.singleModeInfo.defaultSelect]||[];let i=this.slidingWindowInfo.startInd||0,s=this.slidingWindowInfo.endInd||0;const o=[],n=Math.ceil(a.length/(this.slidingWindowInfo.points||1));for(let l=0;l<1;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0;for(let r=1;r<=n;r++)t=r*this.splitBlockHeight,r>1&&(t*=.8,i=s,s=i+(this.slidingWindowInfo.points||0)),r===1&&(this.loopArrowY.rowAndCol=t),o.push({pos:[e,t],startInd:i,endInd:s,data:a.slice(i,s).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return o}getRednerPoints(){let e=0,t=0,a=0,i=[],s=this.slidingWindowInfo.startInd||0,o=this.slidingWindowInfo.endInd||0;const n=[];for(let l=0;l<this.leadModel.column;l++){e=l*this.splitPoint+this.leadHeadConfig.leadHedeWidth,t=0,this.leadModel.isContinuous&&l>0&&(s=o,o=s+(this.slidingWindowInfo.points||0));for(let r=1;r<=this.leadModel.line&&(t=r*this.splitBlockHeight,!(a>(this.waveFromData||[]).length-1));r++)i=this.waveFromData[a]||[],a++,r===1&&(this.loopArrowY.rowAndCol=t),n.push({pos:[e,t],startInd:s,endInd:o,data:i.slice(s,o).map((h,d)=>{var m;return[d*(((m=this.formatEcgData)==null?void 0:m.step)||0),-h]})})}return n}getAddRednerPoints(){const e=[],t=this.leadHeadConfig.leadHedeWidth;let a=0,i=0,s=[];for(let o=0;o<this.leadModel.add;o++)i=this.longLeadConfig.leadIdxs[o],a=(o+this.leadModel.line+1)*this.splitBlockHeight,s=this.waveFromData[i]||[],o===0&&(this.loopArrowY.add=a),e.push({pos:[t,a],startInd:this.addSlidingWindowInfo.startInd||0,endInd:this.addSlidingWindowInfo.endInd||0,data:s.slice(this.addSlidingWindowInfo.startInd,this.addSlidingWindowInfo.endInd).map((n,l)=>{var r;return[l*(((r=this.formatEcgData)==null?void 0:r.step)||0),-n]})});return e}createSingleWaveFrom(){var o,n,l,r,h,d,m;(o=this.singleWaveFromGroup)==null||o.removeAll();const e=(((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.LeadName)||[])[this.singleModeInfo.defaultSelect]||0;let t=this.getRednerSinglePoints(),a=v.getDataLenTimes(this.slidingWindowInfo.points||0,((l=this.formatEcgData)==null?void 0:l.processedData.otherParams.SampleRate)||0),i=0,s=0;for(let p=0;p<t.length&&!(t[p].pos[1]>this.drawArea.height+this.bottomAreaHeight);p++)this.isLeadDel(e)||(i=parseInt(`${a/1e3/60}`,10),s=parseInt(`${a/1e3%60}`,10),i=s===60?i+=1:i,i=i===0?"00":i<10?`0${i}`:i,s=s===0||s===60?"00":s<10?`0${s}`:s,(r=this.singleWaveFromGroup)==null||r.add(new u.Polyline({cursor:"",name:this.singleModeInfo.defaultSelect+"_"+p,shape:{points:t[p].data.map(([g,C])=>[g+t[p].pos[0],C+t[p].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:g=>{this.onDbClickWaveFrom(g,"single")}})),(d=this.singleWaveFromGroup)==null||d.add(new u.Text({cursor:"",style:{x:t[p].pos[0],y:t[p].pos[1]-(((h=this.formatEcgData)==null?void 0:h.sens)||0)/2,text:p===0?"00:00 \u5FC3\u7387":`${i}:${s} \u5FC3\u7387`,fontWeight:"bold",fontSize:14,fill:"#FF0080",fontFamily:this.fontFamily}})),p>0&&(a+=a));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]-(((m=this.formatEcgData)==null?void 0:m.sens)||0)/2-15),this.singleWaveDataCopy=t,t=null}createAddWaveFrom(){var t,a;console.time("createAddWaveFrom");let e=this.getAddRednerPoints();for(let i=0;i<e.length;i++)this.isLeadDel(this.longLeadConfig.leadIdxs[i])||((t=this.addwaveFromGroup)==null||t.add(new u.Polyline({cursor:"",name:this.longLeadConfig.leadIdxs[i]+"_"+i,shape:{points:e[i].data.map(([s,o])=>[s+e[i].pos[0],o+e[i].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:s=>{this.onDbClickWaveFrom(s,"add")}})),this.createLeadName(this.longLeadConfig.leadNames[i],e[i].pos[0],e[i].pos[1]-15,!0),this.createLeadOffAndDel(this.longLeadConfig.leadIdxs[i],e[i].pos[0]-5,e[i].pos[1]-(((a=this.formatEcgData)==null?void 0:a.sens)||0)/2-15));console.timeEnd("createAddWaveFrom"),this.addWaveDataCopy=e,e=null}createRowAndColWaveFrom(){var a,i,s,o,n,l;console.time("createRowAndColWaveFrom"),(a=this.rowAndColwaveFromGroup)==null||a.removeAll();let e=this.getRednerPoints(),t=0;for(let r=0;r<e.length;r++)t=(((i=this.formatEcgData)==null?void 0:i.processedData.otherParams.LeadName)||[])[r]||0,this.isLeadDel(t)||(s=this.rowAndColwaveFromGroup)==null||s.add(new u.Polyline({cursor:"",name:r+"_"+r,shape:{points:e[r].data.map(([h,d])=>[h+e[r].pos[0],d+e[r].pos[1]])},style:{stroke:this.leadConfig.lineColor,lineWidth:this.leadConfig.lineWidth},onclick:h=>{this.onDbClickWaveFrom(h,"rowAndCol")}})),r<this.leadModel.line?(this.createLeadName(t,e[r].pos[0],e[r].pos[1]-15),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((o=this.formatEcgData)==null?void 0:o.sens)||0)/2-15)):(this.createLeadName(t,e[r].pos[0]+5,e[r].pos[1]-(((n=this.formatEcgData)==null?void 0:n.sens)||0)/2),this.createLeadOffAndDel(t,e[r].pos[0]-5,e[r].pos[1]-(((l=this.formatEcgData)==null?void 0:l.sens)||0)/2+9));this.waveDataCopy=e,e=null}createLeadName(e,t,a,i=!1){var s;(s=this.leadHeadNameGroup)==null||s.add(new u.Text({style:{x:t,y:a,text:v.LeadNameTexts[e],fontSize:this.leadConfig.fontSize,fill:this.leadConfig.lineColor,fontFamily:this.leadConfig.fontFamily},oncontextmenu:o=>{o.event.preventDefault(),this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})},onclick:o=>{this.$emit("notiifyLeadName",{event:A(W({},o),{name:v.LeadNameTexts[e],idx:e}),isAdd:i})}}))}createLeadOffAndDel(e,t,a){var i;(this.isLeadOff(e)||this.isLeadDel(e))&&((i=this.leadHeadOffAndDelGroup)==null||i.add(new u.Text({cursor:"",style:{x:t,y:a,text:"X",fontWeight:"bold",fontSize:18,fill:"#E42c03",fontFamily:this.fontFamily}})))}drawRulerNotes(){var i,s,o,n,l,r;if(!this.rulerConfig.isShow)return;const e={fill:"#FF0080",fontSize:13,fontFamily:this.fontFamily},t=new u.Text({cursor:"",style:W({text:"(s)",x:this.leadHeadConfig.leadHedeWidth/2-8,y:this.drawArea.height+this.bottomAreaHeight-25},e)}),a=new u.Text({style:W({text:`${((i=this.formatEcgData)==null?void 0:i.gainName)==="\u80F8\u5BFC\u51CF\u534A"?(s=this.formatEcgData)==null?void 0:s.gainName:`${(o=this.formatEcgData)==null?void 0:o.gain}mm/mV`} ${(n=this.formatEcgData)==null?void 0:n.speed}mm/s`,x:this.leadHeadConfig.leadHedeWidth/2+20,y:this.drawArea.height+this.bottomAreaHeight-40},e)});(l=this.sceneIns)==null||l.add(a),(r=this.sceneIns)==null||r.add(t)}drawRuler(e=0){var o,n,l,r,h;if(!this.rulerConfig.isShow)return;const t=this.dataTotalTimes/1e3;let a=this.leadHeadConfig.leadHedeWidth,i=0,s=t;if(this.leadModel.isContinuous)s=t*5;else if(!this.leadModel.add&&((o=this.formatEcgData)==null?void 0:o.step)){const d=v.getPointIdxForPx(this.splitPoint,this.formatEcgData.step),m=v.getDataLenTimes(d,((n=this.formatEcgData)==null?void 0:n.processedData.otherParams.SampleRate)||0)/1e3;s=e+m}for(let d=e;d<=s;d=+(d+.1).toFixed(1))d!==e&&(a+=this.rulerStep),d%1===0?(i=this.canvasContainer.height-10,(l=this.rulerGroup)==null||l.add(new u.Text({cursor:"",style:{x:a,y:i-15,text:d+"",fontSize:13,fontFamily:this.fontFamily,fill:"#FF0080"}}))):i=this.canvasContainer.height-5,(r=this.rulerGroup)==null||r.add(new u.Line({cursor:"",shape:{x1:a,y1:i,x2:a,y2:this.canvasContainer.height},style:{stroke:"#FF0080",lineWidth:2}}));(h=this.sceneIns)==null||h.add(this.rulerGroup)}drawWaveFrom(){var e,t,a;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),(a=this.sceneIns)==null||a.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,r,h,d,m,p,g,C,D,P,I,y,S,E,x,G,M;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,a=0;this.leadModel.add?a=this.loopArrowY.add-(((r=this.formatEcgData)==null?void 0:r.sens)||0)-this.splitBlockHeight/3.5:a=20;let i=0,s=0;const o={fontSize:12,fill:"red",fontFamily:this.fontFamily};let n=0;for(let H=0;H<(((h=this.formatEcgData)==null?void 0:h.heartBeatPosition)||[]).length;H++){const f=(d=this.formatEcgData)==null?void 0:d.heartBeatPosition[H];if(n=((f==null?void 0:f.position)||0)-e,!(e>((f==null?void 0:f.position)||0))&&!(!this.leadModel.isContinuous&&!this.leadModel.add&&n>(this.slidingWindowInfo.points||0))&&!(this.isSingleMode&&this.singleModeInfo&&n>(this.slidingWindowInfo.points||0))){if(((f==null?void 0:f.position)||0)-this.addSlidingWindowInfo.startInd>(this.addSlidingWindowInfo.points||0))break;t=n*(((m=this.formatEcgData)==null?void 0:m.step)||0)+this.leadHeadConfig.leadHedeWidth-9.5,s=0,(C=this.arrowGroup)==null||C.add(new u.Polygon({name:"arrow_box",shape:{points:[[4+t,0+a],[15+t,0+a],[15+t,10+a],[19+t,10+a],[9.5+t,22+a],[0+t,10+a],[4+t,10+a],[4+t,0+a]]},style:{fill:((g=(p=this.currentHeardBeat)==null?void 0:p.heardBeat)==null?void 0:g.index)===(f==null?void 0:f.index)?"blue":"#ccc"},onclick:F=>{var b;!this.heartFight.mode||(F.target.attr({style:{fill:"blue"}}),(b=this.arrowGroup)==null||b.children().filter(L=>L.name==="arrow_box").forEach(L=>{L.id!==F.target.id&&L.attr({style:{fill:"#ccc"}})}),this.arrowLoopClick(f,F.target))}})),this.heartFight.heartrate&&(i=((D=this.AssistCtx)==null?void 0:D.measureText(`${(f==null?void 0:f.heartrate)||""}`).width)||0,(P=this.arrowGroup)==null||P.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.heartrate)||""}`},o)})),s+=12),this.heartFight.interval&&(i=((I=this.AssistCtx)==null?void 0:I.measureText(`${(f==null?void 0:f.interval)||""}`).width)||0,(y=this.arrowGroup)==null||y.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.interval)||""}`},o)})),s+=12),this.heartFight.qrstCompany&&(i=((S=this.AssistCtx)==null?void 0:S.measureText(`${(f==null?void 0:f.qrstCompany)||""}`).width)||0,(E=this.arrowGroup)==null||E.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.qrstCompany)||""}`},o)})),s+=12),this.heartFight.telectricalaxis&&(i=((x=this.AssistCtx)==null?void 0:x.measureText(`${(f==null?void 0:f.telectricalaxis)||""}`).width)||0,(G=this.arrowGroup)==null||G.add(new u.Text({cursor:"",style:W({x:4+t-i*1.5,y:s+a,text:`${(f==null?void 0:f.telectricalaxis)||""}`},o)})))}}(M=this.sceneIns)==null||M.add(this.arrowGroup)}arrowLoopClick(e,t){this.$emit("notifyHeardBeat",u.util.clone(e)),this.currentHeardBeat.heardBeat=e,this.currentHeardBeat.ele=t,this.drawHeardBeatLine()}drawHeardBeatLine(e=0){var n,l,r,h,d,m;if(!this.currentHeardBeat.heardBeat)return;(n=this.heardBeatLineGroup)==null||n.removeAll(),(l=this.sceneIns)==null||l.remove(this.heardBeatLineGroup);let t=this.formatEcgData.processedData.otherParams.AnalyseValue[this.currentHeardBeat.heardBeat.index].KeyPosByBeat,a=0,i=this.getRednerPoints(),s=this.getAddRednerPoints(),o;for(const p in t)if(["Pstart","Pend","QRSstart","QRSend","Tstart","Tend"].includes(p)&&Object.prototype.hasOwnProperty.call(t,p)){a=(t[p]-this.slidingWindowInfo.startInd)*(((r=this.formatEcgData)==null?void 0:r.step)||0);e:for(let g=0;g<i.length;g++)if(!(this.isLeadOff(g)||this.isLeadDel(g))){if(e>t[p]||!this.leadModel.isContinuous&&t[p]-this.slidingWindowInfo.startInd>(this.slidingWindowInfo.points||0)||(o=i[g],this.leadModel.isContinuous&&g>this.leadModel.line-1))break e;(h=this.heardBeatLineGroup)==null||h.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}e:for(let g=0;g<s.length;g++)if(!(this.isLeadOff(this.longLeadConfig.leadIdxs[g])&&this.isLeadDel(this.longLeadConfig.leadIdxs[g]))){if(e>t[p])break e;o=s[g],(d=this.heardBeatLineGroup)==null||d.add(this.createHeardBeatLine(o.pos[0]+a,o.pos[1]))}}(m=this.sceneIns)==null||m.add(this.heardBeatLineGroup),t=null,i=null,s=null}createHeardBeatLine(e,t){return new u.Line({cursor:"",shape:{x1:e,y1:t-10,x2:e,y2:t+10},style:{stroke:"blue",lineWidth:1}})}handleScroll(e,t,a){var i;if(t.type==="horizontal"){t.scrollLeft=t.scrollLeft||0;const s=v.getPointIdxForPx(t.scrollLeft,((i=this.formatEcgData)==null?void 0:i.step)||1);this.scrollWaveFrom(s),this.scrollRuler(s),this.scrollArrow(s),this.$emit("notifyScrollPointIdx",s)}}scrollWaveFrom(e){var i,s;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(),a=this.getAddRednerPoints();this.waveDataCopy=t,this.addWaveDataCopy=a,(i=this.rowAndColwaveFromGroup)==null||i.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:t[n].data.map(([l,r])=>[l+t[n].pos[0],r+t[n].pos[1]])}})}),(s=this.addwaveFromGroup)==null||s.eachChild((o,n)=>{n=n||0,o.attr({shape:{points:a[n].data.map(([l,r])=>[l+a[n].pos[0],r+a[n].pos[1]])}})}),t=null,a=null}scrollRuler(e){var a,i,s;(a=this.rulerGroup)==null||a.removeAll(),(i=this.sceneIns)==null||i.remove(this.rulerGroup);const t=v.getDataLenTimes(this.isSingleMode?0:e,((s=this.formatEcgData)==null?void 0:s.processedData.otherParams.SampleRate)||0)/1e3;this.drawRuler(t)}scrollArrow(e){var t,a;(t=this.arrowGroup)==null||t.removeAll(),(a=this.sceneIns)==null||a.remove(this.arrowGroup),this.drawLoopArrow(e),this.drawHeardBeatLine(e)}};c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"width",2);c([w.Prop({required:!0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"height",2);c([w.Prop({default:0,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveWidth",2);c([w.Prop({default:0,type:Number,validator:e=>typeof e=="number"})],exports.default.prototype,"MXEnlargeWaveHeight",2);c([w.Prop({required:!0})],exports.default.prototype,"gridConfig",2);c([w.Prop({default:5,type:Number})],exports.default.prototype,"cellPoints",2);c([w.Prop({required:!0})],exports.default.prototype,"conventionalECGConfig",2);c([w.Prop({default:()=>({leadHedeWidth:20,leadHedeColor:"#000",leadHedeLineWidth:2})})],exports.default.prototype,"leadHeadConfig",2);c([w.Prop({required:!0})],exports.default.prototype,"formatEcgData",2);c([w.Prop({required:!0})],exports.default.prototype,"leadModel",2);c([w.Prop({default:()=>({lineColor:"#000",lineWidth:1,fontFamily:"\u5FAE\u8F6F\u96C5\u9ED1",fontSize:15})})],exports.default.prototype,"leadConfig",2);c([w.Prop({default:()=>({leadIdxs:[1,6,10],leadNames:[1,6,10]})})],exports.default.prototype,"longLeadConfig",2);c([w.Prop({default:()=>({isShow:!1,mode:!1,defaultSelect:2,heartrate:!1,interval:!1,qrstCompany:!1,telectricalaxis:!1})})],exports.default.prototype,"heartFight",2);c([w.Prop({default:()=>({isShow:!0,scrollPanel:{scrollingY:!1},bar:{keepShow:!0,size:"10px"}})})],exports.default.prototype,"vuescrollConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"rulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"measurRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"paralleRulerConfig",2);c([w.Prop({default:()=>({isShow:!1})})],exports.default.prototype,"magnifierRulerConfig",2);c([w.Prop({default:60})],exports.default.prototype,"ventricularRate",2);c([w.Prop({default:v.AnalysisMode.CompoundWave})],exports.default.prototype,"enlargeWaveMode",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeGains",2);c([w.Prop({default:()=>[]})],exports.default.prototype,"enlargeSpeeds",2);c([w.Prop({default:()=>({defaultSelect:1})})],exports.default.prototype,"singleModeInfo",2);c([w.Prop({default:!1})],exports.default.prototype,"isSyncAnalyseValueCheck",2);c([v.throttling(200)],exports.default.prototype,"handleScroll",1);exports.default=c([_.default({name:"Methods"})],exports.default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "costy-plus",
3
- "version": "1.0.30-0",
3
+ "version": "1.0.32-0",
4
4
  "main": "dist/lib/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",