import{aG as y,aA as n,bB as a,bm as E,D as T,b3 as o,aF as e,a9 as V,aa as k,ab as x,aC as d,bd as u,ad as C,aE as p,bj as s,ai as m,a8 as z,ac as B}from"./index-DrvLDslf.js";/* empty css             *//* empty css                    *//* empty css                  *//* empty css                     *//* empty css                  */import"./el-tooltip-l0sNRNKZ.js";/* empty css                    *//* empty css                        *//* empty css               */import{C as D}from"./ConfigPageBase-CPF7i-FB.js";/* empty css               *//* empty css                *//* empty css                  */import"./PermissionGuard-BxagL6-4.js";import"./reflection-Dr3WM5Rz.js";const O=y({__name:"AuthRoleView",setup(v){function w(c){switch(c){case"hidden":return"danger";case"readonly":return"warning";case"interactive":return"success";default:return"info"}}return(c,A)=>{const l=x,i=C,_=k,b=V,h=z,g=B;return o(),n(D,{section:"auth",title:"权限与角色管理",description:"角色、权限码、控件级 WidgetGrant（auth.user.write / auth.role.write）",defaults:E(T)},{default:a(({payload:f})=>[e(g,{"model-value":"roles"},{default:a(()=>[e(b,{name:"roles",label:"角色"},{default:a(()=>[e(_,{data:f.roles,size:"small",border:""},{default:a(()=>[e(l,{label:"ID",prop:"id",width:"120"}),e(l,{label:"名称",prop:"name",width:"120"}),e(l,{label:"Scope",prop:"scope",width:"120"}),e(l,{label:"权限码"},{default:a(r=>[(o(!0),d(m,null,u(r.row.permissions,t=>(o(),n(i,{key:t,size:"small",effect:"plain",style:{margin:"2px"}},{default:a(()=>[p(s(t),1)]),_:2},1024))),128))]),_:1}),e(l,{label:"WidgetGrant",width:"280"},{default:a(r=>[(o(!0),d(m,null,u(r.row.widgetGrants,t=>(o(),n(i,{key:t.widgetId,size:"small",type:w(t.visibility),effect:"plain",style:{margin:"2px"}},{default:a(()=>[p(s(t.widgetId)+"="+s(t.visibility),1)]),_:2},1032,["type"]))),128))]),_:1})]),_:1},8,["data"])]),_:2},1024),e(b,{name:"users",label:"用户"},{default:a(()=>[e(_,{data:f.users,size:"small",border:""},{default:a(()=>[e(l,{label:"ID",prop:"id",width:"120"}),e(l,{label:"用户名",prop:"username",width:"140"}),e(l,{label:"角色"},{default:a(r=>[(o(!0),d(m,null,u(r.row.roles,t=>(o(),n(i,{key:t,size:"small"},{default:a(()=>[p(s(t),1)]),_:2},1024))),128))]),_:1}),e(l,{label:"启用",width:"80"},{default:a(r=>[e(h,{modelValue:r.row.enabled,"onUpdate:modelValue":t=>r.row.enabled=t},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])]),_:2},1024)]),_:2},1024)]),_:1},8,["defaults"])}}});export{O as default};
