import b from"./baseInfo-99b85552-1779868775780v=1.0.0.js";import{x as C}from"./systemManage-d67b09c0-1779868775780v=1.0.0.js";import{u as x}from"./useFormEdit-42a9503c-1779868775780v=1.0.0.js";import{b as B}from"./index-0f3e2c06-1779868775780v=1.0.0.js";import{E as m}from"./eleVendor-dbf96bf3-1779868775780v=1.0.0.js";import{l as c,a as s,e as I,d as y,ah as R,m as d,M as i,O as k,u as r,B as f,R as E}from"./vendor-98154105-1779868775780v=1.0.0.js";import"./_plugin-vue_export-helper-8c5478df-1779868775780v=1.0.0.js";import"./tabs-e9b8af2b-1779868775780v=1.0.0.js";const P=c({name:"systemRoleAdd"}),T=c({...P,setup(M){const{closeCurrent:l,setTitle:w}=x();B();const p=s("");s(""),I(()=>!Boolean(p.value));const g=s("1"),t=s({mpId:"",name:"",remark:"",roleId:"",status:1}),o=s(!1),v=()=>{l()},_=async u=>{o.value=!0;try{let e=C,n="\u65B0\u589E\u6210\u529F",a=await e(u);a.code===0?(m({type:"success",message:`${n}!`}),l()):m.error(a.msg),o.value=!1}catch{o.value=!1}};return y(()=>{}),(u,e)=>{const n=R("PaIndexPage");return d(),i(n,{filterWidth:240},{default:k(()=>[r(g)=="1"?(d(),i(b,{key:0,value:r(t),"onUpdate:value":e[0]||(e[0]=a=>f(t)?t.value=a:null),loading:r(o),"onUpdate:loading":e[1]||(e[1]=a=>f(o)?o.value=a:null),onCancel:v,onSubmit:_},null,8,["value","loading"])):E("",!0)]),_:1})}}});export{T as default};
