import{ac as e,Q as a,R as s}from"./element-plus-DSMJnpwa.js";import{d as o}from"./index-mv7arXuk.js";/* empty css                    *//* empty css                          *//* empty css                        *//* empty css               */import{i as t}from"./index-nsQnTcne.js";import u from"./houseItem-rJuu15g-.js";import{u as l}from"./house-Dn7jiId_.js";import{B as n,g as i,aE as r,u as d,H as c,L as m,M as p,O as f,P as h,Z as b,F as x,ab as j,I as k,X as v}from"./vue-vendor-DZekML78.js";import"./utils-cPVb2Haz.js";import"./index-CWCutGkV.js";const g={key:0,class:"TableBox p-5 h-full"},H=o(n({__name:"table",setup(o){const n=l(),{proxy:H}=i(),I=r(),_=[{label:"编辑",value:"edit"},{label:"详情",value:"main"},{label:"删除",value:"delete"}];function y(e){n.checkoutHousesFun([]),n.checkoutHousesFun(e)}function w(e){switch(e.type){case"edit":I.push({path:"/house/addHouse",query:{id:e.value}});break;case"money":break;case"main":I.push({path:"/house/HouseDetails",query:{id:e.value}});break;case"delete":H?.$modal.confirm("该信息删除后无法恢复，确定要删除吗？").then(()=>{t(e.value).then(()=>{n.switchBuilding(n.currentBuildingInfo.id),H?.$modal.msgSuccess("删除成功")})})}}return(o,t)=>{const l=s,i=a,r=e;return null!==d(n).currentHouseInfoList?(c(),m("div",g,[p(r,{onChange:y,modelValue:d(n).checkoutHouses,"onUpdate:modelValue":t[0]||(t[0]=e=>d(n).checkoutHouses=e)},{default:f(()=>[p(i,{border:"",data:d(n).currentFloorInfoList},{default:f(()=>[p(l,{align:"center",fixed:"",label:"楼层\\单元","max-width":"100"},{default:f(({row:e})=>[h("span",null,b(e)+"楼",1)]),_:1}),(c(!0),m(x,null,j(d(n).currentHouseInfoList?.units??[],(e,a)=>(c(),k(l,{"min-width":"260",align:"center",label:`${e.unitNo}单元`,key:a},{default:f(({row:a})=>[p(u,{onContextmenufun:w,"menu-list":_,unit:e.floors,"f-idx":a},null,8,["unit","f-idx"])]),_:2},1032,["label"]))),128))]),_:1},8,["data"])]),_:1},8,["modelValue"])])):v("",!0)}}}),[["__scopeId","data-v-da66d2af"]]);export{H as default};
