import{u as A}from"./useTable-34acff72-1782572373740v=1.0.0.js";import{u as x,b as I,h as b,a as N,n as Z,_ as $}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{_ as U}from"./EventSelect.vue_vue_type_script_setup_true_lang-f04bbe11-1782572373740v=1.0.0.js";import{r as p,R as s,y as D,m as j,al as i,z as M,I as q,J as r,u as t,O as J}from"./vendor-866bb149-1782572373740v=1.0.0.js";import O from"./Dataview-61b40225-1782572373740v=1.0.0.js";import{E}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import"./notData-cef8761e-1782572373740v=1.0.0.js";import"./eventListApi-0bc79350-1782572373740v=1.0.0.js";const X=(o="volunteer")=>{const d=x();I(),p([]);const n=p(!1),g=e=>{n.value=!0,d.push({name:"refereeRegistrationSignUpList",query:{id:e.id}})},v=p([{prop:"eventName",label:"\u8D5B\u4E8B\u540D\u79F0",search:{render:({searchParam:e})=>s(U,{ref:"pageSelectRef",value:e.eventId,"onUpdate:value":l=>e.eventId=l},null)}},{prop:"keyword",label:`${o==="volunteer"?"\u5FD7\u613F\u8005":"\u88C1\u5224\u5458"}\u641C\u7D22`,search:{el:"input",placeholder:"\u8BF7\u8F93\u5165\u4EBA\u5458\u540D\u79F0/\u8BC1\u4EF6\u53F7\u7801/\u624B\u673A\u53F7/\u5B66\u5DE5\u53F7"}}]),C=p([{type:"index",label:"\u5E8F\u53F7",width:70,fixed:"left"},{prop:"eventName",label:"\u8D5B\u4E8B\u540D\u79F0",minWidth:150},{prop:"recruitName",label:"\u62DB\u52DF\u6D3B\u52A8\u540D\u79F0",minWidth:150},{prop:"name",label:"\u59D3\u540D"},{prop:"identityCard",label:"\u8BC1\u4EF6\u53F7\u7801",minWidth:180},{prop:"phone",label:"\u624B\u673A\u53F7\u7801",minWidth:140},{prop:"tsNo",label:"\u5B66\u5DE5\u53F7",minWidth:120},{prop:"collegeName",label:"\u6240\u5728\u5355\u4F4D"},{prop:"sumAmHours",label:"\u4E0A\u5348\u5DE5\u4F5C\u91CF"},{prop:"sumPmHours",label:"\u4E0B\u5348\u5DE5\u4F5C\u91CF"},{prop:"sumEveningHours",label:"\u665A\u4E0A\u5DE5\u4F5C\u91CF"},{prop:"sumHours",label:"\u603B\u5DE5\u4F5C\u91CF"}]);return{columns:v,tableColumns:C,dataCallBack:e=>(e.listData.forEach(l=>{}),e),paramCallBack:e=>(e.serviceTime&&(e.serviceStartDate=e.serviceTime[0],e.serviceEndDate=e.serviceTime[1]),e),showRegistrationDialog:n,handleViewRegistration:g}},G=X,K=o=>b.post("/javaPpoEventactivity/personRecord/workStats",o,{headers:{noLoading:!0}}),Q=o=>b.post("/javaPpoEventactivity/personRecord/listExport",o,{headers:{noLoading:!0},responseType:"blob"}),Y=o=>b.post("/javaPpoEventactivity/personRecord/workStatsSum",o,{headers:{noLoading:!0}}),ee=D({name:"volunteerWorkloadIndex"}),te=D({...ee,props:{type:{type:String,default:"volunteer"}},setup(o){x();const d=N(),n=o,{tableColumns:g,columns:v,dataCallBack:C,paramCallBack:y}=G(n.type),{tableData:_,pageable:e,baseParam:l,searchParam:h,totalParam:F,pageParam:ae,handleSizeChange:S,handleCurrentChange:B,getTableList:H,search:P,reset:w,loading:W}=A(K,C,y),k=p([{title:"\u603B\u5DE5\u4F5C\u91CF",value:0,suffix:"\u5C0F\u65F6",key:"sumHours"},{title:"\u4E0A\u5348\u5DE5\u4F5C\u91CF",value:0,suffix:"\u5C0F\u65F6",key:"sumAmHours"},{title:"\u4E0B\u5348\u5DE5\u4F5C\u91CF",value:0,suffix:"\u5C0F\u65F6",key:"sumPmHours"},{title:"\u665A\u4E0A\u5DE5\u4F5C\u91CF",value:0,suffix:"\u5C0F\u65F6",key:"sumEveningHours"}]),f=async()=>{try{const u=await Y({...F.value,...l.value});u.code===0?k.value.forEach(a=>{var m;a.value=((m=u.data)==null?void 0:m[a.key])||0}):E.error(u.msg)}catch(u){console.error({error:u}),E.error("\u83B7\u53D6\u7EDF\u8BA1\u6570\u636E\u5931\u8D25")}},z=()=>{Z(Q,`${n.type==="volunteer"?"\u5FD7\u613F\u8005":"\u88C1\u5224"}\u5DE5\u4F5C\u91CF\u7EDF\u8BA1\u8868`,F.value,!0,".xlsx")};return j(async()=>{l.value.recruitType=n.type,f(),H()}),(u,a)=>{const m=i("HZSearchForm"),R=i("el-button"),T=i("HZProTable"),L=i("el-pagination"),V=i("HZPageLayout");return M(),q(V,{title:t(d).meta.title},{searchForm:r(()=>[s(m,{"search-param":t(h),columns:t(v),search:()=>{t(P)(null,f)},reset:()=>{t(w)(f)}},null,8,["search-param","columns","search","reset"])]),pagination:r(()=>[s(L,{"current-page":t(e).page,"onUpdate:currentPage":a[1]||(a[1]=c=>t(e).page=c),"page-size":t(e).size,"onUpdate:pageSize":a[2]||(a[2]=c=>t(e).size=c),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:t(e).count,onSizeChange:t(S),onCurrentChange:t(B)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),dialog:r(()=>a[5]||(a[5]=[])),default:r(()=>[s(O,{"data-list":t(k)},null,8,["data-list"]),s(T,{columns:t(g),data:t(_),isFlex:!1,loading:t(W),showColSet:!1},{tableHeader:r(()=>a[3]||(a[3]=[])),toolButton:r(()=>[s(R,{type:"primary",onClick:a[0]||(a[0]=c=>z()),params:{...t(h)}},{default:r(()=>a[4]||(a[4]=[J("\u5BFC\u51FA",-1)])),_:1,__:[4]},8,["params"])]),_:1},8,["columns","data","loading"])]),_:1},8,["title"])}}});const me=$(te,[["__scopeId","data-v-a83ba943"]]);export{me as default};
