import{r as a,H as s,I as i}from"./element-plus-DSMJnpwa.js";import{N as l,d as e}from"./index-mv7arXuk.js";/* empty css                 */import{g as t,d as n,s as o}from"./index-CWCutGkV.js";import{u as d}from"./house-Dn7jiId_.js";import{B as c,aE as u,ag as m,H as r,L as v,P as g,M as f,Z as p,u as y,F as x,ab as I,O as h,d as _}from"./vue-vendor-DZekML78.js";import"./utils-cPVb2Haz.js";import"./index-nsQnTcne.js";const C={class:"h-full box"},b={class:"header"},j={class:"containerbox"},k={class:"community_nav_box"},A={class:"currentbox"},E={class:"communityBody"},N={class:"image-viewer-slot image-slot"},F={class:"coummunityaction_box"},S={class:"coummunityname"},w={class:"counmmunityaddress"},B={class:"actions flex"},H=["onClick"],L=["onClick"],M=["onClick"],U={class:"addCoummunity"},q=e(c({__name:"index",setup(e){const c=d(),q=u(),D=_([]),G=_();function O(){q.push({path:"/community/AddCommunity"})}return t().then(a=>{D.value=a.rows;const s=localStorage.getItem("villageid"),i=D.value.find(a=>a.villageId===Number(s));i&&(G.value=i)}),(e,t)=>{const d=a,u=i,_=m("AddLocation");return r(),v("div",C,[g("div",b,[t[0]||(t[0]=g("span",{class:""},"智慧物业后台管理系统",-1)),f(l,{ref:"navbarRef"},null,512)]),g("div",j,[g("div",k,[g("div",A,"当前小区:"+p(y(G)&&y(G).villageName),1),t[1]||(t[1]=g("div",{class:"subtitle flex align-center"},[g("div",{class:"changecommunity"},"切换小区")],-1))]),g("div",E,[(r(!0),v(x,null,I(y(D),(a,i)=>(r(),v("div",{class:"coummunity_card",key:i},[f(u,{src:a.villageImageUrl?a.villageImageUrl.split(",")[0]:y("/static/assets/villageimage-C81tFMEE.png")},{error:h(()=>[g("div",N,[f(d,null,{default:h(()=>[f(y(s))]),_:1})])]),_:1},8,["src"]),g("div",F,[g("div",S,p(a.villageName),1),g("div",w,p(a.address),1)]),g("div",B,[g("div",{onClick:s=>function(a){o(a.villageId).then(()=>{localStorage.setItem("villageid",String(a.villageId)),c.getviliageinfo(a.villageId),q.push({path:"/index"})})}(a)},"管理",8,H),g("div",{onClick:s=>function(a){q.push({path:"/community/AddCommunity",query:{id:a.villageId}})}(a)},"编辑",8,L),g("div",{onClick:s=>function(a){n(a.villageId).then(()=>{const s=D.value.filter(s=>s.villageId!==a.villageId);D.value=s})}(a)},"删除",8,M)])]))),128)),g("div",{onClick:O,class:"coummunity_card addActions flex flex-items-center justify-center"},[g("div",U,[f(d,null,{default:h(()=>[f(_)]),_:1}),t[2]||(t[2]=g("div",null,"添加小区",-1))])])])]),t[3]||(t[3]=g("i",{class:"bgcolor"},null,-1))])}}}),[["__scopeId","data-v-7ed474ee"]]);export{q as default};
