import{u as G}from"./useTable-34acff72-1782572373740v=1.0.0.js";import{u as K}from"./useHandleData-64cc6aad-1782572373740v=1.0.0.js";import{u as W}from"./useEventApplyManage-6fda2bcd-1782572373740v=1.0.0.js";import{g as X,u as Y,e as ee}from"./eventApplyMgmtApi-d35d9842-1782572373740v=1.0.0.js";import te from"./AchievementSubmitDialog-d8efb75a-1782572373740v=1.0.0.js";import{u as oe,a as ae,v as P,_ as ne}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{g as re,E as C}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{y as h,m as ue,r as f,al as p,z as m,I as c,J as a,R as r,u as n,M as s,O as u,A as le,Q as se}from"./vendor-866bb149-1782572373740v=1.0.0.js";import"./notData-cef8761e-1782572373740v=1.0.0.js";import"./showAuditDialog-d8482297-1782572373740v=1.0.0.js";const ie=h({name:"agreementManageIndex"}),pe=h({...ie,setup(me){const _=oe(),F=ae(),{tableColumns:b,columns:w,dataCallBack:S,paramCallBack:B}=W(),{tableData:U,pageable:d,baseParam:de,searchParam:I,totalParam:ce,pageParam:ge,handleSizeChange:R,handleCurrentChange:x,getTableList:k,search:z,reset:M,loading:H}=G(X,S,B);ue(async()=>{await k()});const L=()=>{_.push({name:"eventApplyMgmtApplyAdd"})},$=t=>{_.push({name:"eventApplyMgmtApplyDetail",query:{id:t.eventProposerId}})},g=f(null),E=f(!1),A=f({eventProgramUrl:"",gradeUrl:"",competitionStyleUrl:"",otherFileUrl:""}),v=f(null),T=t=>{re.alert(t.eventProposerResultInfo.auditFailureCause,"\u9A73\u56DE\u539F\u56E0",{confirmButtonText:"\u786E\u5B9A"})},D=async t=>{v.value=t.eventProposerResultInfo,A.value=P(t.eventProposerResultInfo),E.value=!0,g.value.open()},Z=async t=>{v.value=t,A.value=P(t.eventProposerResultInfo),E.value=!1,g.value.open()},V=async t=>{try{if(!v.value){C.error("\u6570\u636E\u9519\u8BEF\uFF0C\u8BF7\u91CD\u8BD5");return}const e={eventProposerId:v.value.eventProposerId,eventProgramUrl:t.eventProgramUrl,gradeUrl:t.gradeUrl,competitionStyleUrl:t.competitionStyleUrl,otherFileUrl:t.otherFileUrl},y=await Y(e);y.code===0?(C.success("\u6210\u679C\u63D0\u4EA4\u6210\u529F"),await k(),g.value.close()):C.error(y.msg)}catch(e){console.error("\u6210\u679C\u63D0\u4EA4\u5931\u8D25:",e),C.error("\u6210\u679C\u63D0\u4EA4\u5931\u8D25")}},N=async t=>{await K(ee,{id:t.eventProposerId},"\u63D0\u4EA4\u7533\u8BF7"),k()},q=t=>{_.push({name:"eventApplyMgmtApplyEdit",query:{id:t.eventProposerId}})};return(t,e)=>{const y=p("HZSearchForm"),J=p("el-button"),l=p("el-link"),O=p("HZProTable"),Q=p("el-pagination"),j=p("HZPageLayout");return m(),c(j,{title:n(F).meta.title},{searchForm:a(()=>[r(y,{"search-param":n(I),columns:n(w),search:n(z),reset:n(M)},null,8,["search-param","columns","search","reset"])]),pagination:a(()=>[r(Q,{"current-page":n(d).page,"onUpdate:currentPage":e[0]||(e[0]=o=>n(d).page=o),"page-size":n(d).size,"onUpdate:pageSize":e[1]||(e[1]=o=>n(d).size=o),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:n(d).count,onSizeChange:n(R),onCurrentChange:n(x)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),dialog:a(()=>[s(" \u6210\u679C\u63D0\u4EA4\u5F39\u7A97 "),r(te,{ref_key:"achievementRef",ref:g,"is-edit":E.value,data:A.value,onSubmit:V},null,8,["is-edit","data"])]),default:a(()=>[r(O,{columns:n(b),data:n(U),isFlex:!1,loading:n(H)},{tableHeader:a(()=>e[2]||(e[2]=[])),toolButton:a(()=>[r(J,{type:"primary",onClick:L},{default:a(()=>e[3]||(e[3]=[u(" \u65B0\u589E\u53C2\u8D5B\u7533\u8BF7 ",-1)])),_:1,__:[3]})]),operation:a(o=>[r(l,{type:"primary",onClick:i=>$(o.row)},{default:a(()=>e[4]||(e[4]=[u(" \u67E5\u770B ",-1)])),_:2,__:[4]},1032,["onClick"]),o.row.isCurrentLoginUserSubmit?(m(),c(l,{key:0,type:"primary",onClick:i=>N(o.row)},{default:a(()=>e[5]||(e[5]=[u(" \u63D0\u4EA4\u7533\u8BF7 ",-1)])),_:2,__:[5]},1032,["onClick"])):s("v-if",!0),o.row.isCurrentLoginUserEdit?(m(),c(l,{key:1,type:"primary",onClick:i=>q(o.row)},{default:a(()=>e[6]||(e[6]=[u(" \u7F16\u8F91 ",-1)])),_:2,__:[6]},1032,["onClick"])):s("v-if",!0),o.row.eventProposerResultInfo.isCurrentLoginUserSubmit?(m(),c(l,{key:2,type:"primary",onClick:i=>D(o.row)},{default:a(()=>e[7]||(e[7]=[u(" \u6210\u679C\u63D0\u4EA4 ",-1)])),_:2,__:[7]},1032,["onClick"])):s("v-if",!0),o.row.resultAuditStatus=="audit_success"||o.row.resultAuditStatus=="auditing"?(m(),c(l,{key:3,type:"primary",onClick:i=>Z(o.row)},{default:a(()=>e[8]||(e[8]=[u(" \u6210\u679C\u67E5\u770B ",-1)])),_:2,__:[8]},1032,["onClick"])):s("v-if",!0),o.row.resultAuditStatus=="audit_failed"?(m(),le(se,{key:4},[r(l,{type:"primary",onClick:i=>D(o.row)},{default:a(()=>e[9]||(e[9]=[u(" \u6210\u679C\u91CD\u65B0\u63D0\u4EA4 ",-1)])),_:2,__:[9]},1032,["onClick"]),r(l,{type:"primary",onClick:i=>T(o.row)},{default:a(()=>e[10]||(e[10]=[u(" \u539F\u56E0 ",-1)])),_:2,__:[10]},1032,["onClick"])],64)):s("v-if",!0),s(' <el-link type="danger" @click="handleDel(scope.row)"> \u5220\u9664 </el-link> ')]),_:1},8,["columns","data","loading"])]),_:1},8,["title"])}}});const he=ne(pe,[["__scopeId","data-v-1946644a"]]);export{he as default};
