import{_ as y}from"./BaseForm.vue_vue_type_script_setup_true_lang-4e97b225-1782468512657v=1.0.0.js";import{u as I,b}from"./managerManageApi-3f76fe12-1782468512657v=1.0.0.js";import{u as M}from"./useFormEdit-57ddb914-1782468512657v=1.0.0.js";import{a as F}from"./index-c87bcfde-1782468512657v=1.0.0.js";import{E as u}from"./eleVendor-12a75a9a-1782468512657v=1.0.0.js";import{x as f,r as n,k as C,al as k,y as w,H as B,I as E,Q as x,u as m,l as c}from"./vendor-27e23c1b-1782468512657v=1.0.0.js";import"./collageManageApi-6fb2328f-1782468512657v=1.0.0.js";import"./majorManageApi-caa0d416-1782468512657v=1.0.0.js";import"./clubManageApi-720ad24a-1782468512657v=1.0.0.js";import"./classManageApi-9a7ec3ed-1782468512657v=1.0.0.js";import"./staffManageApi-23e00b5a-1782468512657v=1.0.0.js";import"./keepAlive-a871c896-1782468512657v=1.0.0.js";const R=f({name:"managerManageEdit"}),V=f({...R,setup(h){const{closeCurrent:i}=M(),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=I,r="\u66F4\u65B0\u6210\u529F";t.attachment=t.fileStr;let e=await a(t);e.code==0?u({type:"success",message:`${r}!`}):u.warning(e.msg),s.value=!1,i()}catch{s.value=!1}},l=F(),d=n(null),_=async t=>{let a=await b(t);if(a.code!=0){u.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 C(()=>{l.query.id&&(g.value=l.query.id,_(l.query.id))}),(t,a)=>{const r=k("HZPageLayout");return w(),B(r,{title:"\u7F16\u8F91\u7BA1\u7406\u5458",isBack:!0},{default:E(()=>[x(y,{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})}}});export{V as default};
