import{I as e}from"./IndexPagePro-44077094-1780912037814v=1.0.0.js";import{t as a,g as l}from"./typeDialog-f8620030-1780912037814v=1.0.0.js";import{l as t}from"./lodash-2ba6b9f7-1780912037814v=1.0.0.js";import{d as n,r as o,J as s,o as i,a as u,b as r,c as p,w as v,e as d,j as g}from"./index-d052b22f-1780912037814v=1.0.0.js";const c=n({__name:"index",setup(n){const c=o(!1);o(!1),o(!1);const b=o([]);o(null);const m=o(0);s();const f=o(!1),y=o({}),x=o(1),z=o(10),C=e=>{t.exports.assign(y.value,e)},_=async()=>{c.value=!0;const{data:e}=await l({page:x.value,size:z.value});c.value=!1,b.value=e.list,m.value=e.count},h=async()=>{C({name:"",type:1})},j=async e=>{e&&_()};return i((()=>{_()})),(l,t)=>{const n=u("el-table-column"),o=u("el-button"),s=u("el-table"),i=u("el-pagination");return r(),p(e,null,{pagination:v((()=>[d(i,{"current-page":x.value,"onUpdate:currentPage":t[0]||(t[0]=e=>x.value=e),"page-size":z.value,"onUpdate:pageSize":t[1]||(t[1]=e=>z.value=e),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:m.value,onSizeChange:_,onCurrentChange:_},null,8,["current-page","page-size","total"])])),dialog:v((()=>[d(a,{visible:f.value,"onUpdate:visible":t[2]||(t[2]=e=>f.value=e),onClose:t[3]||(t[3]=e=>f.value=!1),info:y.value,onHandleSubmitCheck:j,onReset:h},null,8,["visible","info"])])),default:v((()=>[d(s,{data:b.value,border:"",loading:c.value,style:{width:"100%"}},{default:v((()=>[d(n,{type:"index",label:"序号",width:"80",align:"center"}),d(n,{prop:"name",label:"分类",align:"center"}),d(n,{prop:"type_str",label:"建设场地设施类型",align:"center"}),d(n,{label:"操作",align:"center"},{default:v((e=>[d(o,{type:"primary",link:"",onClick:a=>{return l=e.row,t="edit",f.value=!0,void(t?(l.type=l.type,C({...y.value,...l})):C({name:"",type:1}));var l,t}},{default:v((()=>t[4]||(t[4]=[g("分类管理")]))),_:2},1032,["onClick"])])),_:1})])),_:1},8,["data","loading"])])),_:1})}}});export{c as default};
