import{at as q,b_ as J,by as o,cu as O,bs as d,an as w,ak as g,aq as a,ct as l,q as j,s as G,g as Z,bT as b,bG as H,ap as m,bz as K,p as Q,F as W,Z as X,t as Y,am as c,A as ee,x as ae,al as v,l as te,a1 as h,v as le,u as oe,_ as ne}from"./index-BVAEVuZQ.js";import{v as se}from"./el-loading-CAgvVMg5.js";import ie from"./LayerDetails-G3v3phr6.js";import re from"./LayerAdd-By2ZklpC.js";import ue from"./CesiumTerrainDetails-GEPq6kwn.js";import de from"./Cesium3DtilesDetails-Dc8vNtPW.js";import"./el-descriptions-item-CiCTkhAS.js";import"./LayerPreview-D1IGWWV2.js";import"./TileImage-B-0PORC6.js";import"./WMTS-C6QUHVX3.js";import"./TileWMS-Wnr0cw94.js";import"./CesiumPreview-Dmv-s9ru.js";const pe={class:"ms-page-main","element-loading-background":"rgba(255, 255, 255, 0.8)"},me={class:"ms-query-form"},ce={class:"ms-table"},_e={key:0,class:"ms-table-handlers"},ve={class:"ms-page"},ye=q({__name:"layer",setup(fe){const L=J("layer_type"),n=o({pageSize:10,pageNum:1,name:""}),k=o(0),C=o([]),y=o(!1),N=()=>{n.value={pageSize:10,pageNum:1,name:""}},r=()=>{y.value=!0,h.layer.getLayerList(n.value).then(i=>{C.value=i.data.data||[],k.value=i.data.total||0}).finally(()=>{y.value=!1})};r();const T=()=>{N(),r()},s=o({name:"",type:"",filePath:"",bbox:[],crs:"",style:"",attributes:[],fileType:""}),_=o(!1),E=o(""),p=o("");o();const z=i=>{s.value=JSON.parse(JSON.stringify(i)),p.value="view",E.value="图层详情",_.value=!0},D=i=>{le.confirm(`确认删除id为${i.id}的图层？`,{type:"warning",title:"提示"}).then(()=>{h.layer.deleteLayer(i).then(e=>{oe.success("删除成功！"),r()})})},V=()=>{_.value=!1},I=o("");return(i,e)=>{const B=G,x=j,f=Z,U=Q,u=W,M=X,S=Y,P=ee,R=ae,A=te,F=se;return O((d(),w("div",pe,[g("div",me,[a(U,{inline:"","label-width":"110px"},{default:l(()=>[a(x,{label:"图层名称"},{default:l(()=>[a(B,{modelValue:n.value.name,"onUpdate:modelValue":e[0]||(e[0]=t=>n.value.name=t),clearable:""},null,8,["modelValue"])]),_:1}),a(x,{label:""},{default:l(()=>[a(f,{onClick:r,icon:b(H)},{default:l(()=>[...e[4]||(e[4]=[m("查询",-1)])]),_:1},8,["icon"]),a(f,{type:"info",onClick:T,icon:b(K)},{default:l(()=>[...e[5]||(e[5]=[m("重置",-1)])]),_:1},8,["icon"])]),_:1})]),_:1})]),g("div",ce,[a(P,{data:C.value,height:"100%","row-key":"id","default-expand-all":""},{default:l(()=>[a(u,{label:"序号",type:"index",width:"60px",align:"center"}),a(u,{label:"名称",prop:"name",align:"center"}),a(u,{label:"图层类型",align:"center"},{default:l(({row:t})=>[a(M,{dicts:b(L).layer_type,value:t.type},null,8,["dicts","value"])]),_:1}),a(u,{label:"创建时间",prop:"created_at"}),a(u,{label:"更新时间",prop:"updated_at"}),a(u,{label:"操作",width:"150px",fixed:"right"},{default:l(({row:t})=>[t.code!=="superadmin"?(d(),w("div",_e,[a(S,{type:"primary",onClick:$=>z(t)},{default:l(()=>[...e[6]||(e[6]=[m("查看",-1)])]),_:1},8,["onClick"]),a(S,{type:"primary",onClick:$=>D(t)},{default:l(()=>[...e[7]||(e[7]=[m("删除",-1)])]),_:1},8,["onClick"])])):c("",!0)]),_:1})]),_:1},8,["data"])]),g("div",ve,[a(R,{"current-page":n.value.pageNum,"onUpdate:currentPage":e[1]||(e[1]=t=>n.value.pageNum=t),"page-size":n.value.pageSize,"onUpdate:pageSize":e[2]||(e[2]=t=>n.value.pageSize=t),"page-sizes":[10,20,30,50],layout:"total, sizes, prev, pager, next, jumper",total:k.value,onCurrentChange:r,onSizeChange:r},null,8,["current-page","page-size","total"])]),a(A,{modelValue:_.value,"onUpdate:modelValue":e[3]||(e[3]=t=>_.value=t),title:E.value,class:"ms-drawer","destroy-on-close":""},{footer:l(()=>[a(f,{type:"info",onClick:V},{default:l(()=>[...e[8]||(e[8]=[m("取消",-1)])]),_:1})]),default:l(()=>[p.value=="view"&&s.value.type!="CESIUMTERRAIN"&&s.value.type!="3DTILES"?(d(),v(ie,{key:0,layer:s.value},null,8,["layer"])):c("",!0),p.value=="view"&&s.value.type=="CESIUMTERRAIN"?(d(),v(ue,{key:1,layer:s.value},null,8,["layer"])):c("",!0),p.value=="view"&&s.value.type=="3DTILES"?(d(),v(de,{key:2,layer:s.value},null,8,["layer"])):c("",!0),p.value=="add"?(d(),v(re,{key:3,type:I.value},null,8,["type"])):c("",!0)]),_:1},8,["modelValue","title"])])),[[F,y.value]])}}}),ze=ne(ye,[["__scopeId","data-v-79d83b4b"]]);export{ze as default};
