物管理前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
6.8 KiB

  1. import{u as te,a as se,b as ve,c as ue,d as de,f as he,S as fe,g as ce,h as ge,j as ye,k as _,G as $,l as me,m as pe,R as X,Z as J,C as we,p as Pe,n as K,B as Se,o as Q,q as be}from"./index-Csvj-veb.js";te([se,ve]);te(ue);de({type:"series.liquidFill",optionUpdated:function(){var t=this.option;t.gridSize=Math.max(Math.floor(t.gridSize),4)},getInitialData:function(t,a){var u=he(t.data,{coordDimensions:["value"]}),f=new fe(u,this);return f.initData(t.data),f},defaultOption:{color:["#294D99","#156ACF","#1598ED","#45BDFF"],center:["50%","50%"],radius:"50%",amplitude:"8%",waveLength:"80%",phase:"auto",period:"auto",direction:"right",shape:"circle",waveAnimation:!0,animationEasing:"linear",animationEasingUpdate:"linear",animationDuration:2e3,animationDurationUpdate:1e3,outline:{show:!0,borderDistance:8,itemStyle:{color:"none",borderColor:"#294D99",borderWidth:8,shadowBlur:20,shadowColor:"rgba(0, 0, 0, 0.25)"}},backgroundStyle:{color:"#E3F7FF"},itemStyle:{opacity:.95,shadowBlur:50,shadowColor:"rgba(0, 0, 0, 0.4)"},label:{show:!0,color:"#294D99",insideColor:"#fff",fontSize:50,fontWeight:"bold",align:"center",baseline:"middle",position:"inside"},emphasis:{itemStyle:{opacity:.8}}}});const Ie=ce({type:"ec-liquid-fill",shape:{waveLength:0,radius:0,radiusY:0,cx:0,cy:0,waterLevel:0,amplitude:0,phase:0,inverse:!1},buildPath:function(t,a){a.radiusY==null&&(a.radiusY=a.radius);for(var u=Math.max(Math.ceil(2*a.radius/a.waveLength*4)*2,8);a.phase<-Math.PI*2;)a.phase+=Math.PI*2;for(;a.phase>0;)a.phase-=Math.PI*2;var f=a.phase/Math.PI/2*a.waveLength,d=a.cx-a.radius+f-a.radius*2;t.moveTo(d,a.waterLevel);for(var g=0,w=0;w<u;++w){var O=w%4,o=Me(w*a.waveLength/4,O,a.waveLength,a.amplitude);t.bezierCurveTo(o[0][0]+d,-o[0][1]+a.waterLevel,o[1][0]+d,-o[1][1]+a.waterLevel,o[2][0]+d,-o[2][1]+a.waterLevel),w===u-1&&(g=o[2][0])}a.inverse?(t.lineTo(g+d,a.cy-a.radiusY),t.lineTo(d,a.cy-a.radiusY),t.lineTo(d,a.waterLevel)):(t.lineTo(g+d,a.cy+a.radiusY),t.lineTo(d,a.cy+a.radiusY),t.lineTo(d,a.waterLevel)),t.closePath()}});function Me(t,a,u,f){return a===0?[[t+1/2*u/Math.PI/2,f/2],[t+1/2*u/Math.PI,f],[t+u/4,f]]:a===1?[[t+1/2*u/Math.PI/2*(Math.PI-2),f],[t+1/2*u/Math.PI/2*(Math.PI-1),f/2],[t+u/4,0]]:a===2?[[t+1/2*u/Math.PI/2,-f/2],[t+1/2*u/Math.PI,-f],[t+u/4,-f]]:[[t+1/2*u/Math.PI/2*(Math.PI-2),-f],[t+1/2*u/Math.PI/2*(Math.PI-1),-f/2],[t+u/4,0]]}var I=Pe;function ee(t){return t&&t.indexOf("path://")===0}ge({type:"liquidFill",render:function(t,a,u){var f=this,d=this.group;d.removeAll();var g=t.getData(),w=g.getItemModel(0),O=w.get("center"),o=w.get("radius"),B=u.getWidth(),M=u.getHeight(),q=Math.min(B,M),k=0,D=0,F=t.get("outline.show");F&&(k=t.get("outline.borderDistance"),D=I(t.get("outline.itemStyle.borderWidth"),q));var L=I(O[0],B),T=I(O[1],M),C,E,R,P=!1,p=t.get("shape");if(p==="container"?(P=!0,C=[B/2,M/2],E=[C[0]-D/2,C[1]-D/2],R=[I(k,B),I(k,M)],o=[Math.max(E[0]-R[0],0),Math.max(E[1]-R[1],0)]):(C=I(o,q)/2,E=C-D/2,R=I(k,q),o=Math.max(E-R,0)),F){var ae=N();ae.style.lineWidth=D,d.add(N())}var re=P?0:L-o,ie=P?0:T-o,A=null;d.add(le());var G=this._data,U=[];g.diff(G).add(function(e){var r=V(e,!1),i=r.shape.waterLevel;r.shape.waterLevel=P?M/2:o,ye(r,{shape:{waterLevel:i}},t),r.z2=2,j(e,r,null),d.add(r),g.setItemGraphicEl(e,r),U.push(r)}).update(function(e,r){for(var i=G.getItemGraphicEl(r),s=V(e,!1,i),n={},l=["amplitude","cx","cy","phase","radius","radiusY","waterLevel","waveLength"],h=0;h<l.length;++h){var v=l[h];s.shape.hasOwnProperty(v)&&(n[v]=s.shape[v])}for(var y={},c=["fill","opacity","shadowBlur","shadowColor"],h=0;h<c.length;++h){var v=c[h];s.style.hasOwnProperty(v)&&(y[v]=s.style[v])}P&&(n.radiusY=M/2),_(i,{shape:n,x:s.x,y:s.y},t),t.isUniversalTransitionEnabled&&t.isUniversalTransitionEnabled()?_(i,{style:y},t):i.useStyle(y);var m=i.getClipPath(),S=s.getClipPath();i.setClipPath(s.getClipPath()),i.shape.inverse=s.inverse,m&&S&&f._shape===p&&!ee(p)&&_(S,{shape:m.shape},t,{isFrom:!0}),j(e,i,i),d.add(i),g.setItemGraphicEl(e,i),U.push(i)}).remove(function(e){var r=G.getItemGraphicEl(e);d.remove(r)}).execute(),w.get("label.show")&&d.add(ne(U)),this._shape=p,thi