import b from"./baseInfo-99b85552-1779868775780v=1.0.0.js";import{z as C,A as B}from"./systemManage-d67b09c0-1779868775780v=1.0.0.js";import{u as R}from"./useFormEdit-42a9503c-1779868775780v=1.0.0.js";import{b as k}from"./index-0f3e2c06-1779868775780v=1.0.0.js";import{E as u}from"./eleVendor-dbf96bf3-1779868775780v=1.0.0.js";import{l as g,a as r,e as x,d as w,ah as E,m as f,M as c,O as F,u as m,B as p,R as P}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 q=g({name:"systemRoleEdit"}),T=g({...q,setup(M){const{closeCurrent:i,setTitle:N}=R(),l=k(),d=r("");r(""),x(()=>!Boolean(d.value));const v=r("1"),s=r({roleId:"",mpId:"",name:"",remark:"",status:1}),a=r(!1),y=()=>{i()},I=async n=>{a.value=!0;try{let e=C,o="\u7F16\u8F91\u6210\u529F",t=await e(n);t.code===0?(u({type:"success",message:`${o}!`}),i()):u.error(t.msg),a.value=!1}catch{a.value=!1}},_=async n=>{let e=await B(n);e.code!=0&&u.warning(e.msg),e.data.status=Number(e.data.status);for(const o in s.value)s.value[o]=e.data[o]};return w(()=>{l.query.roleId&&(d.value=l.query.roleId,_(l.query.roleId))}),(n,e)=>{const o=E("PaIndexPage");return f(),c(o,{filterWidth:240},{default:F(()=>[m(v)=="1"?(f(),c(b,{key:0,value:m(s),"onUpdate:value":e[0]||(e[0]=t=>p(s)?s.value=t:null),loading:m(a),"onUpdate:loading":e[1]||(e[1]=t=>p(a)?a.value=t:null),onCancel:y,onSubmit:I},null,8,["value","loading"])):P("",!0)]),_:1})}}});export{T as default};
