import{d,O as x,K as R,k,v as b,o as y,x as I,z as i,b as s,a as n,u as t,t as S,G as N,H as T}from"./vue.1703796278973.js";import{I as U,r as j,aG as C,F as E,K as P}from"./index.17037962789732.js";import"./index.170379627897315.js";import"./index.170379627897318.js";import"./index.170379627897319.js";import"./index.170379627897314.js";import"./default.1703796278973.js";import"./index.1703796278973299.js";import B from"./PermissTree.1703796278973.js";import{h as F}from"./system.1703796278973.js";import{U as w}from"./baseMenu.1703796278973.js";import{g as V,u as A,a as D}from"./role.1703796278973.js";import{aN as G}from"./index.17037962789733.js";import{_ as K}from"./_plugin-vue_export-helper.1703796278973.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./index.1703796278973305.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973302.js";import"./index.170379627897332.js";import"./index.1703796278973303.js";import"./index.170379627897339.js";import"./index.170379627897316.js";import"./index.1703796278973304.js";import"./consts.1703796278973.js";import"./uniqBy.1703796278973.js";import"./comm.1703796278973.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./permission.1703796278973.js";import"./404.1703796278973.js";const u=m=>(N("data-v-686cc562"),m=m(),T(),m),M={class:"role-permiss-container"},q={class:"card"},z=u(()=>i("h5",null,"基本信息",-1)),H={class:"card"},J=u(()=>i("h5",null,"权限分配",-1)),L=d({name:"RolePermiss"}),O=d({...L,setup(m){F();const f=x();R();const c=f.params.id,_=k(),e=b({loading:!1,data:{name:"",description:""},menus:[w],getForm:()=>{V(c).then(a=>{a.status&&(e.data=a.result)})},clickSave:()=>{var a;(a=_.value)==null||a.validate().then(()=>{const o=A(e.data),p=D(c,{menus:e.menus});console.log(e.menus),Promise.all([o,p]).then(l=>{G.success("操作成功")})})}});return e.getForm(),(a,o)=>{const p=U,l=j,v=C,g=E,h=P;return y(),I("div",M,[i("section",q,[z,s(g,{ref_key:"formRef",ref:_,class:"basic-form",model:t(e).data,layout:"vertical"},{default:n(()=>[s(l,{name:"name",label:"名称",rules:[{required:!0,message:"请输入名称"},{max:64,message:"最多可输入64个字符"}]},{default:n(()=>[s(p,{value:t(e).data.name,"onUpdate:value":o[0]||(o[0]=r=>t(e).data.name=r),placeholder:"请输入角色名称"},null,8,["value"])]),_:1}),s(l,{label:"说明"},{default:n(()=>[s(v,{value:t(e).data.description,"onUpdate:value":o[1]||(o[1]=r=>t(e).data.description=r),placeholder:"请输入说明",maxlength:200,"show-count":""},null,8,["value"])]),_:1})]),_:1},8,["model"])]),i("section",H,[J,s(B,{"select-items":t(e).menus,"onUpdate:select-items":o[2]||(o[2]=r=>t(e).menus=r)},null,8,["select-items"]),s(h,{type:"primary",disabled:t(e).loading,onClick:t(e).clickSave,style:{"margin-top":"24px"}},{default:n(()=>[S("保存")]),_:1},8,["disabled","onClick"])])])}}});const je=K(O,[["__scopeId","data-v-686cc562"]]);export{je as default};