import{_ as M,a5 as v,r,o as x,y as w,q as I,p,n,s as V,ay as b,j as h,bv as S,a0 as g,a1 as k,v as C}from"./index.8d733f79.js";const j=s=>(g("data-v-fb1fcdf6"),s=s(),k(),s),P=j(()=>C("div",{id:"deviceMap"},null,-1)),U=v({name:"PositionMapModal"}),B=Object.assign(U,{setup(s,{expose:u}){let l=null;const d=r(!1),e=r({floorId:""});function f(o){d.value=!0,b(()=>{c(o)})}function c(o){l=new jsmap.JSMap({container:"deviceMap",mapServerURL:"/loadMap/factory",showGlobe:!0}),l.openMapById(o.factoryId),l.on("loadComplete",()=>{console.log("Map loadComplete!",l,l.focusFloorId,e),o&&o.xcoordinate&&m({floorId:o.floor,x:Number(o.xcoordinate),y:Number(o.ycoordinate)})})}function m(o){l.removeAllMarker(),e.value.floorId=o.floorId,e.value.x=o.x,e.value.y=o.y;const a=new jsmap.JSPointMarker({id:"point1",color:"#00FF00",size:16,position:new jsmap.JSPoint(o.x,o.y,0),floorId:o.floorId,outlineWidth:2,allowPicking:!0,displayCondition:new jsmap.JSDisplayCondition(0,1e3),depthTest:!1,alwaysShow:!0,show:!0});l.addMarker(a)}function _(){l&&(l.destroy(),l=null),e.value={},d.value=!1}return u({showModal:f}),(o,a)=>{const i=h,y=S;return x(),w(y,{title:o.$t("devicePoint"),modelValue:n(d),"onUpdate:modelValue":a[3]||(a[3]=t=>V(d)?d.value=t:null),width:"800px","align-center":!0,"destroy-on-close":"","append-to-body":"",onClose:_},{default:I(()=>[p(i,{modelValue:n(e).floorId,"onUpdate:modelValue":a[0]||(a[0]=t=>n(e).floorId=t),style:{width:"200px"},placeholder:"",disabled:""},null,8,["modelValue"]),p(i,{modelValue:n(e).x,"onUpdate:modelValue":a[1]||(a[1]=t=>n(e).x=t),style:{width:"200px","margin-left":"16px"},placeholder:"",disabled:""},null,8,["modelValue"]),p(i,{modelValue:n(e).y,"onUpdate:modelValue":a[2]||(a[2]=t=>n(e).y=t),style:{width:"200px","margin-left":"16px"},placeholder:"",disabled:""},null,8,["modelValue"]),P]),_:1},8,["title","modelValue"])}}}),N=M(B,[["__scopeId","data-v-fb1fcdf6"]]);export{N as default};
