import{r as Q,c as T}from"./eventApplyMgmtApi-6b4840c2-1782729249161v=1.0.0.js";import{E as _}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as w,r as E,l as q,c as b,h as G,al as p,z as C,A as D,R as t,J as a,B as y,O as v,u as i,M as u,k,Q as H}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";import{_ as K}from"./index-b309bf9f-1782729249161v=1.0.0.js";const W={class:"formContainer"},X={class:"flexBox"},Y={key:0,class:"dialog-footer"},Z={key:1,class:"auditBtns"},$={class:"dialog-footer"},ee=w({name:"AchievementSubmitDialog"}),le=w({...ee,props:{isEdit:{type:Boolean,default:!1},data:{},isAuditing:{type:Boolean,default:!1}},emits:["close","submit","update"],setup(P,{expose:S,emit:L}){const n=P,h=L,c=E(),d=E(!1),r=E({auditFailureCause:"",mode:"pass"}),x=()=>{d.value=!1,r.value.auditFailureCause=""},B=()=>{r.value.mode="pass",d.value=!0},V=()=>{r.value.mode="reject",d.value=!0},M=async()=>{let s=null;if(r.value.mode=="pass")s=Q;else{if(!r.value.auditFailureCause)return _.warning("\u8BF7\u8F93\u5165\u6279\u590D\u610F\u89C1");s=T}const e=await s({auditFailureCause:r.value.auditFailureCause,id:l.eventProposerId});e.code==0?(_.success(e.msg),x(),f.value=!1,h("update")):_.warning(e.msg)},l=q({eventProgramUrl:"",gradeUrl:"",competitionStyleUrl:"",otherFileUrl:"",eventProposerId:""}),f=E(!1),j=b(()=>n.isEdit),z=b(()=>n.isEdit?"\u6210\u679C\u63D0\u4EA4":"\u6210\u679C\u67E5\u770B"),U=()=>{I(),f.value=!1},N=()=>{f.value=!0},I=()=>{c.value&&c.value.resetFields(),l.eventProgramUrl="",l.gradeUrl="",l.competitionStyleUrl="",l.otherFileUrl="",l.eventProposerId=""},R=async()=>{if(c.value)try{await c.value.validate(),h("submit",{...l})}catch(s){console.error("\u8868\u5355\u9A8C\u8BC1\u5931\u8D25:",s)}};return G(()=>n.data,()=>{n.data&&(l.eventProgramUrl=n.data.eventProgramUrl,l.gradeUrl=n.data.gradeUrl,l.competitionStyleUrl=n.data.competitionStyleUrl,l.otherFileUrl=n.data.otherFileUrl,l.eventProposerId=n.data.eventProposerId)},{immediate:!0,deep:!0}),S({open:N,close:U}),(s,e)=>{const g=p("DocumentMul"),F=p("el-form-item"),J=p("el-form"),m=p("el-button"),A=p("el-dialog"),O=p("el-input");return C(),D(H,null,[t(A,{modelValue:i(f),"onUpdate:modelValue":e[4]||(e[4]=o=>k(f)?f.value=o:null),title:i(z),width:"70vw","before-close":U,"destroy-on-close":""},{footer:a(()=>[y("div",X,[t(m,{style:{"margin-right":"10px"},onClick:U},{default:a(()=>e[7]||(e[7]=[v("\u5173\u95ED",-1)])),_:1,__:[7]}),i(j)?(C(),D("span",Y,[u(' <el-button @click="handleClose">\u53D6\u6D88</el-button> '),t(m,{type:"primary",onClick:R},{default:a(()=>e[8]||(e[8]=[v("\u63D0\u4EA4",-1)])),_:1,__:[8]})])):u("v-if",!0),u(` <span class="dialog-footer" v-else>
				<el-button @click="handleClose">\u5173\u95ED</el-button>
			</span> `),s.isAuditing?(C(),D("div",Z,[t(m,{type:"primary",onClick:B},{default:a(()=>e[9]||(e[9]=[v("\u901A\u8FC7",-1)])),_:1,__:[9]}),t(m,{type:"danger",onClick:V},{default:a(()=>e[10]||(e[10]=[v("\u9A73\u56DE",-1)])),_:1,__:[10]})])):u("v-if",!0)])]),default:a(()=>[y("div",W,[t(J,{ref_key:"formRef",ref:c,model:i(l),"label-width":"120px"},{default:a(()=>[u(" \u79E9\u5E8F\u518C\u4E0A\u4F20 "),t(F,{label:"\u79E9\u5E8F\u518C",prop:"eventProgramUrl"},{default:a(()=>[t(g,{fileList:i(l).eventProgramUrl,"onUpdate:fileList":e[0]||(e[0]=o=>i(l).eventProgramUrl=o),showFileList:!1,accept:".pdf,.doc,.docx,.xls,.xlsx,.ppt,.jpg,.png,.jpeg,.zip",fileSize:5120,limit:5,multiple:!0,detailMode:!s.isEdit,isChangeFileName:!1},null,8,["fileList","detailMode"]),u(` <div v-else class="file-list-view">
					<div v-if="formData.eventProgramUrl && formData.eventProgramUrl.length > 0" class="file-item">
						<a :href="formData.eventProgramUrl[0].url" target="_blank" class="file-link">
							{{ formData.eventProgramUrl[0].name }}
						</a>
					</div>
					<span v-else class="no-file">\u6682\u65E0\u6587\u4EF6</span>
				</div> `)]),_:1}),u(" \u6210\u7EE9\u518C\u4E0A\u4F20 "),t(F,{label:"\u6210\u7EE9\u518C",prop:"gradeUrl"},{default:a(()=>[t(g,{fileList:i(l).gradeUrl,"onUpdate:fileList":e[1]||(e[1]=o=>i(l).gradeUrl=o),showFileList:!1,accept:".pdf,.doc,.docx,.xls,.xlsx,.ppt,.jpg,.png,.jpeg,.zip",fileSize:5120,limit:5,multiple:!0,detailMode:!s.isEdit,isChangeFileName:!1},null,8,["fileList","detailMode"]),u(` <div v-else class="file-list-view">
					<div v-if="formData.gradeUrl && formData.gradeUrl.length > 0" class="file-item">
						<a :href="formData.gradeUrl[0].url" target="_blank" class="file-link">
							{{ formData.gradeUrl[0].name }}
						</a>
					</div>
					<span v-else class="no-file">\u6682\u65E0\u6587\u4EF6</span>
				</div> `)]),_:1}),u(" \u7ADE\u8D5B\u98CE\u91C7\u4E0A\u4F20 "),t(F,{label:"\u7ADE\u8D5B\u98CE\u91C7",prop:"competitionStyleUrl"},{default:a(()=>[t(g,{fileList:i(l).competitionStyleUrl,"onUpdate:fileList":e[2]||(e[2]=o=>i(l).competitionStyleUrl=o),showFileList:!1,accept:".pdf,.doc,.docx,.xls,.xlsx,.ppt,.jpg,.png,.jpeg,.zip",fileSize:5120,limit:5,multiple:!0,detailMode:!s.isEdit,isChangeFileName:!1},null,8,["fileList","detailMode"]),u(` <div v-else class="file-list-view">
					<div v-if="formData.competitionStyleUrl && formData.competitionStyleUrl.length > 0">
						<div v-for="(file, index) in formData.competitionStyleUrl" :key="index" class="file-item">
							<a :href="file.url" target="_blank" class="file-link">
								{{ file.name }}
							</a>
						</div>
					</div>
					<span v-else class="no-file">\u6682\u65E0\u6587\u4EF6</span>
				</div> `)]),_:1}),u(" \u5176\u4ED6\u6587\u4EF6\u4E0A\u4F20 "),t(F,{label:"\u5176\u4ED6\u6587\u4EF6",prop:"otherFileUrl"},{default:a(()=>[t(g,{fileList:i(l).otherFileUrl,"onUpdate:fileList":e[3]||(e[3]=o=>i(l).otherFileUrl=o),showFileList:!1,accept:".pdf,.doc,.docx,.xls,.xlsx,.ppt,.jpg,.png,.jpeg,.zip",fileSize:5120,limit:5,multiple:!0,detailMode:!s.isEdit,isChangeFileName:!1},null,8,["fileList","detailMode"]),u(` <div v-else class="file-list-view">
					<div v-if="formData.otherFileUrl && formData.otherFileUrl.length > 0">
						<div v-for="(file, index) in formData.otherFileUrl" :key="index" class="file-item">
							<a :href="file.url" target="_blank" class="file-link">
								{{ file.name }}
							</a>
						</div>
					</div>
					<span v-else class="no-file">\u6682\u65E0\u6587\u4EF6</span>
				</div> `)]),_:1})]),_:1},8,["model"])])]),_:1},8,["modelValue","title"]),u(" \u6279\u590D\u610F\u89C1\u5F39\u7A97\u3001\u5305\u542B\u4E00\u4E2A\u6587\u672C\u6846\u548C\u4E24\u4E2A\u6309\u94AE "),t(A,{modelValue:i(d),"onUpdate:modelValue":e[6]||(e[6]=o=>k(d)?d.value=o:null),title:"\u6279\u590D\u610F\u89C1",width:"60%",height:"300px",top:"30vh"},{footer:a(()=>[y("span",$,[t(m,{onClick:x},{default:a(()=>e[11]||(e[11]=[v("\u53D6\u6D88",-1)])),_:1,__:[11]}),t(m,{type:"primary",onClick:M},{default:a(()=>e[12]||(e[12]=[v("\u63D0\u4EA4",-1)])),_:1,__:[12]})])]),default:a(()=>[t(O,{type:"textarea",modelValue:i(r).auditFailureCause,"onUpdate:modelValue":e[5]||(e[5]=o=>i(r).auditFailureCause=o),placeholder:"\u8BF7\u8F93\u5165\u6279\u590D\u610F\u89C1"},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}});const se=K(le,[["__scopeId","data-v-fd4db88d"]]);export{se as default};
