2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
var G=Object.defineProperty,A=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable;var I=(e,t,i)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,_=(e,t)=>{for(var i in t||(t={}))U.call(t,i)&&I(e,i,t[i]);if(Z)for(var i of Z(t))tt.call(t,i)&&I(e,i,t[i]);return e},D=(e,t)=>A(e,V(t));var z=(e,t,i)=>(I(e,typeof t!="symbol"?t+"":t,i),i);var C=(e,t,i)=>new Promise((o,d)=>{var n=l=>{try{m(i.next(l))}catch(v){d(v)}},w=l=>{try{m(i.throw(l))}catch(v){d(v)}},m=l=>l.done?o(l.value):Promise.resolve(l.value).then(n,w);m((i=i.apply(e,t)).next())});import et from"./Map.2e34d2a5.js";import{a as H,w as j,v as S,J as P,aq as J,c0 as st,L as N,o as T,h as q,i as c,aK as it,bn as W,k as ot,e9 as Y,bq as nt,bd as at,n as a,bk as rt,aG as r}from"./index.49914b5a.js";import ht from"./DXJG.4edd8b1a.js";import ct from"./DXCY.9a363a55.js";import lt from"./DZWZ.a7f08c10.js";import dt from"./DXLX.eecff453.js";import ut from"./Head.803db6d0.js";import pt from"./Footer.bbf43674.js";import mt from"./NYQK.9985aa23.js";import ft from"./NCZQS.2d2f49b7.js";import xt from"./CZNYCY.02f84026.js";import vt from"./JK.e0171ce2.js";import yt from"./SBYXZT.6a3ff238.js";import zt from"./QXSZ.a3281601.js";import bt from"./SZJCSJ.fb6a7ad1.js";import gt from"./TRJCSJ.0eb0c975.js";import _t from"./MapModal.80a390b2.js";import{c as wt}from"./useVContext.3a22bbdc.js";import"./useECharts.16068aa4.js";import"./other.cc970318.js";import"./visualization.c000cfc7.js";import"./Box.2e00bcef.js";import"./colors.28a3398e.js";import"./index.ff1266da.js";import"./dayjs.min.ca826dd4.js";import"./index.9920efc8.js";import"./CaretUpOutlined.1864d562.js";import"./LinkModal.675b9ac6.js";import"./model-close-icon.706a0490.js";import"./CModal.018c2613.js";import"./index.d52f9af6.js";import"./useRefs.4a1afb1f.js";import"./index.1493e146.js";import"./index.f1b7445d.js";import"./_baseIteratee.44597bea.js";import"./get.eb15741f.js";import"./_baseEach.cea27e9e.js";import"./_isIterateeCall.962f5dea.js";import"./lodash.726e5a3e.js";import"./dateUtil.e8f514cd.js";import"./BasicChart.e632c923.js";function Mt(e,t){let i;return function(...o){i&&clearTimeout(i),i=setTimeout(()=>{typeof e=="function"&&e.apply(null,o),clearTimeout(i)},t>0?t:100)}}const St=H({name:"ScaleScreen",props:{width:{type:[String,Number],default:1920},height:{type:[String,Number],default:1080},fullScreen:{type:Boolean,default:!1},autoScale:{type:[Object,Boolean],default:!0},delay:{type:Number,default:500},boxStyle:{type:Object,default:()=>({})},wrapperStyle:{type:Object,default:()=>({})}},setup(e){const t=j({width:0,height:0,originalWidth:0,originalHeight:0,observer:null}),i={box:{overflow:"hidden",backgroundSize:"100% 100%",background:"#000",width:"100vw",height:"100vh"},wrapper:{transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms",position:"relative",overflow:"hidden",zIndex:100,transformOrigin:"left top"}},o=S(),d=()=>new Promise(h=>{J(()=>{var f,x;e.width&&e.height?(t.width=e.width,t.height=e.height):(t.width=(f=o.value)==null?void 0:f.clientWidth,t.height=(x=o.value)==null?void 0:x.clientHeight),(!t.originalHeight||!t.originalWidth)&&(t.originalWidth=window.screen.width,t.originalHeight=window.screen.height),h()})}),n=()=>{t.width&&t.height?(o.value.style.width=`${t.width}px`,o.value.style.height=`${t.height}px`):(o.value.style.width=`${t.originalWidth}px`,o.value.style.height=`${t.originalHeight}px`)},w=h=>{if(!e.autoScale)return;const f=o.value.clientWidth,x=o.value.clientHeight,M=document.body.clientWidth,b=document.body.clientHeight;o.value.style.transform=`scale(${h},${h})`;let y=Math.max((M-f*h)/2,0),g=Math.max((b-x*h)/2,0);typeof e.autoScale=="object"&&(!e.autoScale.x&&(y=0),!e.autoScale.y&&(g=0)),o.value.style.margin=`${g}px ${y}px`},m=()=>{const h=document.body.clientWidth,f=document.body.clientHeight,x=t.width||t.originalWidth,M=t.height||t.originalHeight,b=h/+x,y=f/+M;if(e.fullScreen)return o.value.style.transform=`scale(${b},${y})`,!1;const g=Math.min(b,y);w(g)},l=Mt(()=>C(this,null,function*(){yield d(),n(),m()}),e.delay),v=()=>{(t.observer=new MutationObserver(()=>{l()})).observe(o.value,{attributes:!0,attributeFilter:["style"],attributeOldValue:!0})};return P(()=>{J(()=>C(this,null,function*(){yield d(),n(),m(),window.addEventListener("resize",l),v()}))}),st(()=>{var h;window.removeEventListener("resize",l),(h=t.observer)==null||h.disconnect()}),{screenWrapper:o,styles:i}}});function $t(e,t,i,o,d,n){return T(),q("section",{style:W(_(_({},e.styles.box),e.boxStyle)),class:"v-screen-box"},[c("div",{style:W(_(_({},e.styles.wrapper),e.wrapperStyle)),class:"screen-wrapper",ref:"screenWrapper"},[it(e.$slots,"default")],4)],4)}var It=N(St,[["render",$t]]),Ct=300,$=3120,X=760,B=0,k=0,Ot=150,u=function(e){return e*Math.PI/180},O=function(){return Math.sin(Math.floor(Math.random()*360)*Math.PI/180)},s={obj:{x:B,y:k,z:Ot},dest:{x:0,y:0,z:1},dist:{x:0,y:0,z:200},ang:{cplane:0,splane:0,ctheta:0,stheta:0},zoom:1,disp:{x:$/2,y:X/2,z:0},upd:function(){s.dist.x=s.dest.x-s.obj.x,s.dist.y=s.dest.y-s.obj.y,s.dist.z=s.dest.z-s.obj.z,s.ang.cplane=-s.dist.z/Math.sqrt(s.dist.x*s.dist.x+s.dist.z*s.dist.z),s.ang.splane=s.dist.x/Math.sqrt(s.dist.x*s.dist.x+s.dist.z*s.dist.z),s.ang.ctheta=Math.sqrt(s.dist.x*s.dist.x+s.dist.z*s.dist.z)/Math.sqrt(s.dist.x*s.dist.x+s.dist.y*s.dist.y+s.dist.z*s.dist.z),s.ang.stheta=-s.dist.y/Math.sqrt(s.dist.x*s.dist.x+s.dist.y*s.dist.y+s.dist.z*s.dist.z)}},p={parts:{sz:function(e,t){return{x:e.x*t.x,y:e.y*t.y,z:e.z*t.z}},rot:{x:function(e,t){return{x:e.x,y:e.y*Math.cos(u(t.x))-e.z*Math.sin(u(t.x)),z:e.y*Math.sin(u(t.x))+e.z*Math.cos(u(t.x))}},y:function(e,t){return{x:e.x*Math.cos(u(t.y))+e.z*Math.sin(u(t.y)),y:e.y,z:-e.x*Math.sin(u(t.y))+e.z*Math.cos(u(t.y))}},z:function(e,t){return{x:e.x*Math.cos(u(t.z))-e.y*Math.sin(u(t.z)),y:e.x*Math.sin(u(t.z))+e.y*Math.cos(u(t.z)),z:e.z}}},pos:function(e,t){return{x:e.x+t.x,y:e.y+t.y,z:e.z+t.z}}},pov:{plane:function(e){return{x:e.x*s.ang.cplane+e.z*s.ang.splane,y:e.y,z:e.x*-s.ang.splane+e.z*s.ang.cplane}},theta:function(e){return{x:e.x,y:e.y*s.ang.ctheta-e.z*s.ang.stheta,z:e.y*s.ang.stheta+e.z*s.ang.ctheta}},set:function(e){return{x:e.x-s.obj.x,y:e.y-s.obj.y,z:e.z-s.obj.z}}},persp:function(e){return{x:e.x*s.dist.z/e.z*s.zoom,y:e.y*s.dist.z/e.z*s.zoom,z:e.z*s.zoom,p:s.dist.z/e.z}},disp:function(e,t){return{x:e.x+t.x,y:-e.y+t.y,z:e.z+t.z,p:e.p}},steps:function(e,t,i,o,d){var n=p.parts.sz(e,t);return n=p.parts.rot.x(n,i),n=p.parts.rot.y(n,i),n=p.parts.rot.z(n,i),n=p.parts.pos(n,o),n=p.pov.plane(n),n=p.pov.theta(n),n=p.pov.set(n),n=p.persp(n),n=p.disp(n,d),n}};class jt{constructor(t){z(this,"vupd",function(){this.transOut=p.steps(this.transIn.vtx,this.transIn.sz,this.transIn.rot,this.transIn.pos,s.disp)});this.transIn={},this.transOut={},this.transIn.vtx=t.vtx,this.transIn.sz=t.sz,this.transIn.rot=t.rot,this.transIn.pos=t.pos}}class Xt{constructor(t){z(this,"add",function(){this.varr.push(new jt({vtx:{x:O(),y:O(),z:O()},sz:{x:0,y:0,z:0},rot:{x:20,y:-20,z:0},pos:{x:this.diff*Math.sin(360*Math.random()*Math.PI/180),y:this.diff*Math.sin(360*Math.random()*Math.PI/180),z:this.diff*Math.sin(360*Math.random()*Math.PI/180)}})),this.calc.push({x:360*Math.random(),y:360*Math.random(),z:360*Math.random()})});z(this,"upd",function(){s.obj.x+=(this.toX-s.obj.x)*.05,s.obj.y+=(this.toY-s.obj.y)*.05});z(this,"draw",function(){this.$.clearRect(0,0,this.canvas.width,this.canvas.height),s.upd(),this.rotObj.x+=.1,this.rotObj.y+=.1,this.rotObj.z+=.1;for(var t=0;t<this.varr.length;t++){for(var i in this.calc[t])this.calc[t].hasOwnProperty(i)&&(this.calc[t][i]+=this.vel,this.calc[t][i]>this.lim&&(this.calc[t][i]=0));if(this.varr[t].transIn.pos={x:this.diff*Math.cos(this.calc[t].x*Math.PI/180),y:this.diff*Math.sin(this.calc[t].y*Math.PI/180),z:this.diff*Math.sin(this.calc[t].z*Math.PI/180)},this.varr[t].transIn.rot=this.rotObj,this.varr[t].transIn.sz=this.objSz,this.varr[t].vupd(),!(this.varr[t].transOut.p<0)){var o=this.$.createRadialGradient(this.varr[t].transOut.x,this.varr[t].transOut.y,this.varr[t].transOut.p,this.varr[t].transOut.x,this.varr[t].transOut.y,this.varr[t].transOut.p*2);this.$.globalCompositeOperation="lighter",o.addColorStop(0,"hsla(255, 255%, 255%, 1)"),o.addColorStop(.5,"hsla("+(t+2)+",85%, 40%,1)"),o.addColorStop(1,"hsla("+t+",85%, 40%,.5)"),this.$.fillStyle=o,this.$.beginPath(),this.$.arc(this.varr[t].transOut.x,this.varr[t].transOut.y,this.varr[t].transOut.p*2,0,Math.PI*2,!1),this.$.fill(),this.$.closePath()}}});z(this,"anim",function(){window.requestAnimationFrame=function(){return window.requestAnimationFrame||function(i,o){window.setTimeout(i,1e3/60)}}();var t=function(){this.upd(),this.draw(),window.requestAnimationFrame(t)}.bind(this);window.requestAnimationFrame(t)});z(this,"run",function(){this.anim(),this.toX=-69.6,this.toY=23.6});this.canvas=ot(t),this.vel=.04,this.lim=360,this.diff=200,this.initPos=100,this.toX=B,this.toY=k,this.go()}go(){this.canvas.width=$,this.canvas.height=X,this.$=canv.getContext("2d"),this.$.globalCompositeOperation="source-over",this.varr=[],this.dist=[],this.calc=[];for(var t=0,i=Ct;t<i;t++)this.add();this.rotObj={x:0,y:0,z:0},this.objSz={x:$/5,y:X/5,z:$/5}}}const Zt=H({components:{[Y.name]:Y,Map:et,ScaleScreen:It,DXJG:ht,DXCY:ct,DZWZ:lt,DXLX:dt,NYQK:mt,NCZQS:ft,CZNYCY:xt,JK:vt,SBYXZT:yt,QXSZ:zt,SZJCSJ:bt,TRJCSJ:gt,Head:ut,Footer:pt,MapModal:_t},setup(){const e=S(null),t=rt(),i=j({baseId:S(""),baseData:j({})});wt({rootEmitter:t});const o=S(!1);return P(()=>{new Xt(e).run()}),nt(()=>{t.on("map:click",()=>{}),t.on("base:click",d=>{i.baseId=d.id,i.baseData=d,o.value=!0})}),D(_({cavsRef:e},at(i)),{visibleMapModal:o})}}),Dt={class:"overflow-y-scroll"},Jt={class:"flex flex-col h-full bg-img relative w-3120px h-760px"},Wt={class:"absolute left-0 top-0 w-full h-full overflow-hidden",ref:"cavsRef",id:"canv"},Yt={class:"flex flex-col h-full w-full z-100"},Ht={class:"flex-1 flex justify-between px-20px"},Pt={class:"flex"},Nt={class:"grid grid-cols-2 gap-x-10px gap-y-10px"},Tt={class:"flex-1 flex ml-15px justify-between bg-[#162126] bg-opacity-60"},qt={class:"bg-[#10272f] bg-opacity-00"},Bt={class:"flex-1"},kt={class:"bg-[#10272f] bg-opacity-00"},Ft={class:"flex"},Qt={class:"mx-16px"},Rt={class:""};function Kt(e,t,i,o,d,n){const w=r("Head"),m=r("DXJG"),l=r("DXCY"),v=r("DXLX"),h=r("DZWZ"),f=r("NYQK"),x=r("NCZQS"),M=r("Map"),b=r("CZNYCY"),y=r("JK"),g=r("SBYXZT"),F=r("QXSZ"),Q=r("SZJCSJ"),R=r("TRJCSJ"),K=r("Footer"),L=r("MapModal");return T(),q("div",Dt,[c("div",Jt,[c("canvas",Wt,null,512),c("div",Yt,[a(w),c("div",Ht,[c("div",Pt,[c("div",Nt,[a(m,{width:"440px",height:"353px"}),a(l,{width:"440px",height:"353px"}),a(v,{width:"440px",height:"353px"}),a(h,{width:"440px",height:"353px"})])]),c("div",Tt,[c("div",qt,[a(f),a(x,{class:"mt-20px"})]),c("div",Bt,[a(M)]),c("div",kt,[a(b)])]),c("div",Ft,[c("div",Qt,[a(y,{width:"440px",height:"387px"}),a(g,{class:"mt-16px",width:"440px",height:"310px"})]),c("div",Rt,[a(F,{width:"440px",height:"200px"}),a(Q,{class:"mt-11px",width:"440px",height:"245px"}),a(R,{class:"mt-11px",width:"440px",height:"245px"})])])]),a(K)])]),a(L,{visible:e.visibleMapModal,"onUpdate:visible":t[0]||(t[0]=E=>e.visibleMapModal=E),footer:null,baseId:e.baseId,baseData:e.baseData},null,8,["visible","baseId","baseData"])])}var Ye=N(Zt,[["render",Kt],["__scopeId","data-v-6da2eabe"]]);export{Ye as default};
|