import{c as V,G as y,u as D}from"./crud.2e35252f.js";import{T as b,M as k}from"./index.ae7ce77b.js";import"./elementPlus.346c766a.js";import{_ as B}from"./index.vue_vue_type_script_setup_true_lang.c8ddaf35.js";import M from"./index.da99e7c6.js";import{d as _,r as o,q as R,j as G,a9 as l,o as I,E as O,G as i,M as a,K as T,L as j,B as E,u as m,t as q}from"./vue.6daa721c.js";import"./dictionary.4409c00a.js";import"./dictionary.270d3d72.js";import"./echarts.72dc8373.js";import"./_plugin-vue_export-helper.c27b6911.js";const z=_({name:"role"}),X=_({...z,setup(K,{expose:w}){let s=o(!1),c=o(null),u=o(null);const t=o(),d=o(),p=o(),P=R("$hasPermissions"),C=async()=>{const e=await y();D().setPermissionData(e.data)},g=e=>{c.value=e.id,u.value=e.name,s.value=!0},x=()=>{s.value=!1},{crudExpose:n}=b({crudRef:d,crudBinding:p});return G(async()=>{await C();const{crudOptions:e}=V({crudExpose:n,rolePermission:t,handleDrawerOpen:g,hasPermissions:P});k({crudExpose:n,crudOptions:e,context:{}}),n.doRefresh()}),w(t),(e,f)=>{const h=l("el-tag"),v=l("fs-crud"),N=l("fs-page");return I(),O(N,null,{default:i(()=>[a(v,E({ref_key:"crudRef",ref:d},p.value),{cell_url:i(r=>[a(h,{size:"small"},{default:i(()=>[T(j(r.row.url),1)]),_:2},1024)]),_:1},16),a(B,{ref_key:"rolePermission",ref:t},null,512),a(M,{drawerVisible:m(s),"onUpdate:drawerVisible":f[0]||(f[0]=r=>q(s)?s.value=r:s=r),roleId:m(c),roleName:m(u),onDrawerClose:x},null,8,["drawerVisible","roleId","roleName"])]),_:1})}}});export{X as default};
