import d from"./BaseForm-83de054e-1782468512657v=1.0.0.js";import{a as g}from"./roleManageApi-4da48f6f-1782468512657v=1.0.0.js";import{u as _}from"./useFormEdit-57ddb914-1782468512657v=1.0.0.js";import{E as m}from"./eleVendor-12a75a9a-1782468512657v=1.0.0.js";import{x as f,r,y as v,H as b,u,l as i}from"./vendor-27e23c1b-1782468512657v=1.0.0.js";import"./index-c87bcfde-1782468512657v=1.0.0.js";import"./BaseInfo-894a9fa1-1782468512657v=1.0.0.js";import"./role-d87c2313-1782468512657v=1.0.0.js";import"./AuthInfo-7a1f8c17-1782468512657v=1.0.0.js";import"./keepAlive-a871c896-1782468512657v=1.0.0.js";const y=f({name:"roleManageAdd"}),A=f({...y,setup(B){const{closeCurrent:t}=_(),s=r({role_id:"",mp_name:"",role_name:"",role_desc:"",role_status:""}),a=r(!1),p=()=>{t()};r("");const c=async l=>{a.value=!0;try{let e=g,o="\u65B0\u589E\u6210\u529F",n=await e(l);n.code==0?(m({type:"success",message:`${o}!`}),t()):m.warning(n.msg),a.value=!1}catch{a.value=!1}};return(l,e)=>(v(),b(d,{value:u(s),"onUpdate:value":e[0]||(e[0]=o=>i(s)?s.value=o:null),loading:u(a),"onUpdate:loading":e[1]||(e[1]=o=>i(a)?a.value=o:null),onCancel:p,onSubmit:c},null,8,["value","loading"]))}});export{A as default};
