index-7cf8b6f4.js 2.9 KB

1
  1. /* empty css *//* empty css */import{u as e,_ as s}from"./useOpen-a24750bc.js";import{u as a}from"./useGetList-10bd17fb.js";/* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css */import{_ as l}from"./destroy.vue_vue_type_script_setup_true_lang-3e425698.js";import{_ as t}from"./update.vue_vue_type_script_setup_true_lang-03546537.js";import{_ as r}from"./add.vue_vue_type_script_setup_true_lang-ff3ef2bf.js";import{_ as o}from"./search.vue_vue_type_script_setup_true_lang-5fdc06f2.js";/* empty css *//* empty css */import i from"./create-399c06ac.js";import{u as p}from"./useDestroy-ee426241.js";import{d as m,n as u,q as n,z as d,o as _,c,a as j,w as v,f,e as b,Z as y,l as h,a9 as g,a5 as k,a6 as w,aa as x,ab as C,a2 as V}from"./index-fe6c8641.js";/* empty css *//* empty css *//* empty css */import"./index-7cd89372.js";/* empty css *//* empty css *//* empty css */import"./index.vue_vue_type_script_setup_true_lang-bbb77980.js";/* empty css *//* empty css */import"./useCreate-21e18dc5.js";import"./useShow-401252b0.js";const U={class:"table-default"},q={class:"pt-5 pl-2"},G=m({__name:"index",setup(m){const G="permissions/roles",{data:L,query:O,search:S,reset:Z,loading:z}=a(G,!1),{destroy:D,deleted:F}=p(),{open:H,close:I,title:K,visible:M,id:P}=e(),Q=u((()=>{var e;return null==(e=L.value)?void 0:e.data})),R=n([]),Y=(e,s)=>{R.value=s,H(e)};return d((()=>{S(),F(Z)})),(e,a)=>{const p=k,m=w,u=o,n=r,d=x,L=t,F=l,H=C,A=s,B=V;return _(),c("div",null,[j(u,{search:f(S),reset:f(Z)},{body:v((()=>[j(m,{label:"角色名称",prop:"role_name"},{default:v((()=>[j(p,{modelValue:f(O).role_name,"onUpdate:modelValue":a[0]||(a[0]=e=>f(O).role_name=e),name:"role_name",clearable:""},null,8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),b("div",U,[b("div",q,[j(n,{onClick:a[1]||(a[1]=e=>Y(null,[]))})]),y((_(),h(H,{data:f(Q),class:"mt-3","row-key":"id","default-expand-all":"","tree-props":{children:"children"}},{default:v((()=>[j(d,{prop:"role_name",label:"角色名称"}),j(d,{prop:"identify",label:"角色标识"}),j(d,{prop:"description",label:"角色描述"}),j(d,{prop:"created_at",label:"创建时间"}),j(d,{label:"操作",width:"200"},{default:v((e=>[j(L,{onClick:s=>Y(e.row.id,e.row.permissions)},null,8,["onClick"]),j(F,{onClick:s=>f(D)(G,e.row.id)},null,8,["onClick"])])),_:1})])),_:1},8,["data"])),[[B,f(z)]])]),j(A,{modelValue:f(M),"onUpdate:modelValue":a[3]||(a[3]=e=>g(M)?M.value=e:null),title:f(K),"destroy-on-close":""},{default:v((()=>[j(i,{onClose:a[2]||(a[2]=e=>f(I)(f(Z))),primary:f(P),api:G,"has-permissions":R.value},null,8,["primary","has-permissions"])])),_:1},8,["modelValue","title"])])}}});export{G as default};