import{c as D,G as N,u as V}from"./crud.41954777.js";import{T as y,M as b}from"./index.ad3efb29.js";import"./elementPlus.4833989a.js";import{_ as k}from"./index.vue_vue_type_script_setup_true_lang.4a733e75.js";import B from"./index.b4c6f134.js";import{d as M,r as o,B as O,j as R,ai as i,o as T,M as I,O as l,U as a,S as j,T as G,K as S,u as m,D as U}from"./vue.adf17aba.js";import"./dictionary.bf4815bd.js";import"./dictionary.506d4581.js";import"./echarts.72dc8373.js";import"./_plugin-vue_export-helper.c27b6911.js";const W=M({__name:"index",setup(z,{expose:_}){let s=o(!1),c=o(null),u=o(null);const n=o(),d=o(),p=o(),w=O("$hasPermissions"),P=async()=>{const e=await N();V().setPermissionData(e.data)},C=e=>{c.value=e.id,u.value=e.name,s.value=!0},x=()=>{s.value=!1},{crudExpose:t}=y({crudRef:d,crudBinding:p});return R(async()=>{await P();const{crudOptions:e}=D({crudExpose:t,rolePermission:n,handleDrawerOpen:C,hasPermissions:w});b({crudExpose:t,crudOptions:e,context:{}}),t.doRefresh()}),_(n),(e,f)=>{const g=i("el-tag"),h=i("fs-crud"),v=i("fs-page");return T(),I(v,null,{default:l(()=>[a(h,S({ref_key:"crudRef",ref:d},p.value),{cell_url:l(r=>[a(g,{size:"small"},{default:l(()=>[j(G(r.row.url),1)]),_:2},1024)]),_:1},16),a(k,{ref_key:"rolePermission",ref:n},null,512),a(B,{drawerVisible:m(s),"onUpdate:drawerVisible":f[0]||(f[0]=r=>U(s)?s.value=r:s=r),roleId:m(c),roleName:m(u),onDrawerClose:x},null,8,["drawerVisible","roleId","roleName"])]),_:1})}}});export{W as default};
