import{r as i}from"./element-plus-DSMJnpwa.js";import{d as s}from"./index-mv7arXuk.js";import{h as n}from"./index-nsQnTcne.js";import{u as e}from"./house-Dn7jiId_.js";import{B as l,g as a,aD as o,aE as d,ag as u,H as r,L as t,P as c,F as m,ab as p,R as g,u as f,Z as v,M as h,O as b}from"./vue-vendor-DZekML78.js";import"./utils-cPVb2Haz.js";import"./index-CWCutGkV.js";const j={class:"BuildingBox"},k=["onClick"],x={class:"buildactions flex align-center justify-around"},B=s(l({__name:"building",setup(s){const{proxy:l}=a(),B=e(),{switchBuilding:C}=B,{currentBuildingInfoList:_,currentBuildingInfo:y}=o(B),I=d(),F=()=>{I.push({path:"/house/addbuilding"})};return(s,e)=>{const a=u("Setting"),o=i,d=u("Delete");return r(),t("div",j,[c("div",{class:"buildingheader flex align-center justify-between"},[e[0]||(e[0]=c("div",null,"楼栋",-1)),c("div",null,[c("span",{class:"pointer",onClick:F},"+增加楼栋")])]),c("ul",null,[(r(!0),t(m,null,p(f(_),(i,s)=>(r(),t("li",{class:g({active:i.id===f(y).id}),key:s},[c("div",{class:"buildingname",onClick:s=>f(C)(i.id??null)},v(i.buildingName??"测试数据"),9,k),c("div",x,[h(o,{class:"pointer hover-color-blue",onClick:s=>{return n=i.id,void I.push({path:"/house/addbuilding",query:{buildingId:n}});var n}},{default:b(()=>[h(a)]),_:1},8,["onClick"]),h(o,{class:"pointer hover-color-red",onClick:s=>{return e=i.id,void l?.$modal.confirm("该信息删除后无法恢复，确定要删除吗？").then(()=>{n(e).then(()=>{B.deleteBuildingFun(e),l?.$modal.msgSuccess("删除成功")})});var e}},{default:b(()=>[h(d)]),_:1},8,["onClick"])])],2))),128))])])}}}),[["__scopeId","data-v-f0853491"]]);export{B as default};
