import{Y as V}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{E as P}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as S,c as T,r as l,m as k,al as s,z as H,I,J as i,R as g,u as t,k as L}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";const D=S({__name:"VolunteerServiceTimesDialog",props:{visible:{type:Boolean,default:!1},title:{default:""},personId:{default:""}},emits:["update:visible","update:value","submit","update:loading"],setup(f,{emit:v}){const p=f,m=v,r=T({get:()=>p.visible,set:e=>{m("update:visible",e)}}),b=()=>{m("update:visible",!1)};l({}),l([]),l({}),l({});const z=l([{type:"index",label:"\u5E8F\u53F7",width:70,fixed:"left"},{prop:"eventName",label:"\u8D5B\u4E8B\u540D\u79F0",minWidth:160},{prop:"serviceTime",label:"\u670D\u52A1\u65F6\u95F4",minWidth:200},{prop:"serviceAddress",label:"\u670D\u52A1\u5730\u70B9",minWidth:160},{prop:"hours",label:"\u670D\u52A1\u65F6\u957F",minWidth:120}]),c=l([]),u=l(!1),a=l({page:1,size:10,count:0}),C=e=>{a.value.size=e,d()},_=e=>{a.value.page=e,d()},d=async()=>{u.value=!0;try{const e=await V({personId:p.personId,page:a.value.page,size:a.value.size});e.code===0?(c.value=e.data.listData,a.value.count=e.data.total):P.warning(e.msg)}catch{}finally{u.value=!1}};return k(()=>{d()}),(e,o)=>{const h=s("HZProTable"),y=s("el-pagination"),w=s("HZPageLayout"),x=s("el-dialog");return H(),I(x,{modelValue:t(r),"onUpdate:modelValue":o[2]||(o[2]=n=>L(r)?r.value=n:null),width:"80vw",title:p.title,"before-close":b},{footer:i(()=>o[3]||(o[3]=[])),default:i(()=>[g(w,{isCard:!1},{pagination:i(()=>[g(y,{"current-page":t(a).page,"onUpdate:currentPage":o[0]||(o[0]=n=>t(a).page=n),"page-size":t(a).size,"onUpdate:pageSize":o[1]||(o[1]=n=>t(a).size=n),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:t(a).count,onSizeChange:C,onCurrentChange:_},null,8,["current-page","page-size","total"])]),default:i(()=>[g(h,{columns:t(z),data:t(c),isFlex:!1,loading:t(u),showColSet:!1},null,8,["columns","data","loading"])]),_:1})]),_:1},8,["modelValue","title"])}}});export{D as _};
