import{x as f,r as n,k as y,al as I,y as b,H as M,I as F,Q as h,u as m,l as c}from"./vendor-6ae0c374-1783405707921v=1.0.0.js";import k from"./BaseForm-380e8e61-1783405707921v=1.0.0.js";import{u as w,b as B}from"./managerManageApi-d2a7b827-1783405707921v=1.0.0.js";import{u as C}from"./useFormEdit-38c2c94d-1783405707921v=1.0.0.js";import{a as x,_ as E}from"./index-71d7b18c-1783405707921v=1.0.0.js";import{E as l}from"./eleVendor-d42abce8-1783405707921v=1.0.0.js";import"./collageManageApi-e21931eb-1783405707921v=1.0.0.js";import"./majorManageApi-836cbfa2-1783405707921v=1.0.0.js";import"./clubManageApi-2b55464b-1783405707921v=1.0.0.js";import"./classManageApi-893dbbd8-1783405707921v=1.0.0.js";import"./staffManageApi-119a99cf-1783405707921v=1.0.0.js";import"./keepAlive-6cb682d1-1783405707921v=1.0.0.js";const D=f({name:"managerManageEdit"}),R=f({...D,setup(q){const{closeCurrent:i}=C(),g=n(null),o=n({schManagerType:"",tsId:"",collegeIds:"",majorIds:"",clubIds:"",classIds:"",tsName:""}),s=n(!1),p=()=>{i()},v=async t=>{s.value=!0;try{let a=w,r="\u66F4\u65B0\u6210\u529F";t.attachment=t.fileStr;let e=await a(t);e.code==0?l({type:"success",message:`${r}!`}):l.warning(e.msg),s.value=!1,i()}catch{s.value=!1}},u=x(),d=n(null),_=async t=>{let a=await B(t);if(a.code!=0){l.warning(a.msg);return}["collegeIds","majorIds","clubIds","classIds"].forEach(e=>{a.data[e]&&a.data[e].split(",").length===1&&(a.data[e]=Number(a.data[e]))}),o.value=a.data,d.value.initData(a.data),o.value};return y(()=>{u.query.id&&(g.value=u.query.id,_(u.query.id))}),(t,a)=>{const r=I("HZPageLayout");return b(),M(r,{title:"\u7F16\u8F91\u7BA1\u7406\u5458",isBack:!0},{default:F(()=>[h(k,{value:m(o),"onUpdate:value":a[0]||(a[0]=e=>c(o)?o.value=e:null),loading:m(s),"onUpdate:loading":a[1]||(a[1]=e=>c(s)?s.value=e:null),onCancel:p,onSubmit:v,tsIdDisabled:!0,ref_key:"formRef",ref:d},null,8,["value","loading"])]),_:1})}}}),j=E(R,[["__file","D:/desktop/huaZhong/huazhong-common/apps/vue-admin/src/views/managerManage/managerManage/edit.vue"]]);export{j as default};
