import{_ as C}from"./BaseForm.vue_vue_type_script_setup_true_lang-f1af8d1f-1782572373740v=1.0.0.js";import{h as p,a as b}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{u as E}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import{E as i}from"./eleVendor-48a7d3b8-1782572373740v=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-866bb149-1782572373740v=1.0.0.js";import"./eleValidate-aae13e4d-1782572373740v=1.0.0.js";import"./keepAlive-0ac97bbd-1782572373740v=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};
