import{K as k,a0 as C,aA as P}from"./index.17037962789732.js";import"./index.1703796278973303.js";import{_ as B}from"./index.vue_vue_type_script_setup_true_lang.17037962789732.js";import"./index.170379627897336.js";import"./index.170379627897315.js";import{f as b}from"./instance.1703796278973.js";import{u as j}from"./instance.17037962789732.js";import{e as A}from"./encodeQuery.1703796278973.js";import{d as w,k as m,m as D,r as N,o as V,c as z,a as o,z as u,b as s,t as _,u as d}from"./vue.1703796278973.js";const J={style:{position:"relative"}},L={style:{position:"absolute",right:"0",top:"5px","z-index":"999"}},W=w({__name:"PropertyAMap",props:{data:{type:Object,default:()=>{}},time:{type:Array,default:()=>[]}},setup(f){const t=f,h=j(),l=m([]),i=m(!1),p=m(),y=()=>{p.value.start()},v=()=>{p.value.stop()},g=async()=>{var c,a;i.value=!0;const e=await b(h.current.id,A({paging:!1,terms:{property:t.data.id,timestamp$BTW:t.time[0]&&t.time[1]?t.time:[]},sorts:{timestamp:"asc"}}));if(i.value=!1,e.status===200){const n=[];(((c=e.result)==null?void 0:c.data)||[]).forEach(r=>{n.push([r.value.lon,r.value.lat])}),l.value=[{name:(a=t==null?void 0:t.data)==null?void 0:a.name,path:n}]}};return D(()=>[t.data.id,t.time],([e])=>{e&&g()},{deep:!0,immediate:!0}),(e,c)=>{const a=k,n=C,r=N("PathSimplifier"),x=B,S=P;return V(),z(S,{spinning:d(i)},{default:o(()=>[u("div",J,[u("div",L,[s(n,null,{default:o(()=>[s(a,{type:"primary",onClick:y},{default:o(()=>[_("开始动画")]),_:1}),s(a,{type:"primary",onClick:v},{default:o(()=>[_("停止动画")]),_:1})]),_:1})])]),s(x,{style:{height:"500px"}},{default:o(()=>[s(r,{pathData:d(l),ref_key:"amapPath",ref:p},null,8,["pathData"])]),_:1})]),_:1},8,["spinning"])}}});export{W as _};
