import{_ as C}from"./BaseForm.vue_vue_type_script_setup_true_lang-993d5ec5-1782729249161v=1.0.0.js";import{h as p,a as b}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{u as E}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{E as i}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as f,r as l,m as M,al as w,z as L,I as R,J as k,R as q,u as m,k as d}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";import"./eleValidate-2ce2196e-1782729249161v=1.0.0.js";import"./keepAlive-20a782c5-1782729249161v=1.0.0.js";const B=o=>p.put("/javaPpoEventactivity/eventMaterial/up",o,{headers:{noLoading:!0}}),F=o=>p.get(`/javaPpoEventactivity/eventMaterial/info/${o}`,{},{headers:{noLoading:!0}}),P=f({name:"materialEdit"}),j=f({...P,setup(o){const{closeCurrent:c}=E(),v=l(null),r=l({materialContent:"",qrUrl:[],receivedNum:"",num:"",teamReceiveType:"",unitReceiveType:"",creator:"",creatorName:"",updater:"",createTime:"",updateTime:"",eventId:""}),t=l(!1),n=b(),g=()=>{c()},y=async s=>{t.value=!0;try{let e=B,u="\u66F4\u65B0\u6210\u529F",a=await e(s);a.code==0?(i({type:"success",message:`${u}!`}),c()):i.warning(a.msg),t.value=!1}catch{t.value=!1}},_=async s=>{let e=await F(s);if(e.code!=0){i.warning(e.msg);return}r.value=e.data};return M(()=>{n.query.id&&(v.value=n.query.id,_(n.query.id))}),(s,e)=>{const u=w("HZPageLayout");return L(),R(u,{title:m(n).meta.title,isBack:!0},{default:k(()=>[q(C,{value:m(r),"onUpdate:value":e[0]||(e[0]=a=>d(r)?r.value=a:null),loading:m(t),"onUpdate:loading":e[1]||(e[1]=a=>d(t)?t.value=a:null),onCancel:g,onSubmit:y},null,8,["value","loading"])]),_:1},8,["title"])}}});export{j as default};
