import{i as f}from"./deviceType.30ac56e5.js";import{_ as g,a5 as v,o as y,c as M}from"./index.8d733f79.js";const j={id:"mapContainer"},x=v({name:"ModalMapPointModal"}),h=Object.assign(x,{setup(k,{expose:d}){let a=null,i=[];function l(t,{pointInfoList:e,path:n,mapInfo:o}){a&&(a.destroy(),a=null),f({deviceType:t.productKey}).then(m=>{i=m.data,e!=null&&e.length&&e.forEach(p=>{const s=i.find(u=>u.identifier===p.pointIdentifier);s&&(s.position={x:p.x,y:p.y,z:p.z})}),r(n,o)})}const c={rotate:20,tilt:70,distance:70};function r(t,e){let n="/loadMap/factory";a=new jsmapplugin.JSMap({container:"mapContainer",mapServerURL:n,showLoading:!0,viewOptions:e?JSON.parse(e):c,backgroundColor:"#00264c",selectedEffect:!1}),a.openMapById(t.split(".")[0],{modelType:jsmapplugin.JSModelType.GLTF}),a.on(jsmapplugin.JSEventType.LOAD_COMPLETE,()=>{console.log("\u52A0\u8F7D\u5B8C\u6210",i),_()}),a.on(jsmapplugin.JSEventType.CLICK_NODE,o=>{console.log(o,o.mapCoord)})}const _=()=>{for(let t=0;t<i.length;t++){const e=i[t],n=new jsmapplugin.JSDomMarker({id:e.identifier,position:e.position||{x:2.474714942726038,y:5.351457367210571,z:.8792980975223372},content:`<div class="jsmapplugin-dom" ><div class="jsmapplugin-text">${e.name}</div><div class="jsmapplugin-line"></div><div class="jsmapplugin-point" data-point='${JSON.stringify(e)}'></div></div>`,show:!0,properties:{identifier:e.identifier,name:e.name},callback:o=>{}});a.addMarker(n)}};return d({loadDeviceModel:l}),(t,e)=>(y(),M("div",j))}}),S=g(h,[["__scopeId","data-v-80e3121a"]]);export{S as default};
