import{at as T,by as n,bq as b,a1 as w,bs as f,an as L,aq as s,y as _,ct as a,bT as x,ap as l,bO as m,al as I,am as $,_ as g}from"./index-BVAEVuZQ.js";import{E as R,a as M}from"./el-descriptions-item-CiCTkhAS.js";import{L as A}from"./LayerPreview-D1IGWWV2.js";import"./TileImage-B-0PORC6.js";import"./WMTS-C6QUHVX3.js";import"./TileWMS-Wnr0cw94.js";const O={class:"layer-details-container"},C=T({__name:"LayerDetails",props:{layer:{}},setup(r){const v="/mapserver",e=r,i=n("/mapserver/wms"),u=n("/mapserver/wmts"),c=n("/mapserver/wfs"),d=n(null);b(()=>{!e.layer.bbox||!e.layer.crs||w.tools.postToolsTransformExtent({extent:e.layer.bbox,sourceCrs:e.layer.crs,destCrs:"EPSG:4326"}).then(o=>{d.value=o.data.data})});const y=o=>["shapefile"].includes(o);return b(()=>{i.value=`${window.location.origin}${i.value}?LAYERS=${e.layer.uuid}&FORMAT=image/png&STYLES=${e.layer.style}&VERSION=1.3.0`,u.value=`${window.location.origin}${u.value}?LAYER=${e.layer.uuid}&STYLE=${e.layer.style}&TILEMATRIXSET=EPSG:4326&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image/png`,y(e.layer.fileType)&&(c.value=`${window.location.origin}${c.value}?service=WFS&version=1.0.0&request=GetFeature&typeName=${e.layer.uuid}&outputFormat=application/json`)}),(o,t)=>{const p=M,E=R,S=_;return f(),L("div",O,[s(S,null,{default:a(()=>[s(A,{style:{height:"350px"},url:x(v)+"/wms",type:"WMS",params:{LAYERS:r.layer.uuid,datasourceId:r.layer.dataSourceId,STYLES:r.layer.style},bbox:d.value},null,8,["url","params","bbox"]),s(E,{title:"服务列表",column:1,"label-width":"80px",border:""},{default:a(()=>[s(p,null,{label:a(()=>[...t[0]||(t[0]=[l(" WMS ",-1)])]),default:a(()=>[l(" "+m(i.value),1)]),_:1}),s(p,null,{label:a(()=>[...t[1]||(t[1]=[l(" WMTS ",-1)])]),default:a(()=>[l(" "+m(u.value),1)]),_:1}),y(r.layer.fileType)?(f(),I(p,{key:0},{label:a(()=>[...t[2]||(t[2]=[l(" WFS ",-1)])]),default:a(()=>[l(" "+m(c.value),1)]),_:1})):$("",!0)]),_:1})]),_:1})])}}}),V=g(C,[["__scopeId","data-v-b3917935"]]);export{V as default};
