import{_ as e}from"./index-7266ee79.js";import{_ as a}from"./destroy.vue_vue_type_script_setup_true_lang-03aacc43.js";import{_ as s}from"./update.vue_vue_type_script_setup_true_lang-34cf7a97.js";import{_ as l}from"./add.vue_vue_type_script_setup_true_lang-9cf41186.js";import{_ as r}from"./search.vue_vue_type_script_setup_true_lang-bbdf4bb9.js";import t from"./create-f0cb0f87.js";import{u as o}from"./useGetList-4b13a7ea.js";import{u as i}from"./useDestroy-7132f8f0.js";import{u as p}from"./useOpen-280ec4e6.js";import{d as u,m as n,k as d,p as _,r as m,K as c,o as f,c as v,a as j,w as y,f as b,e as h,J as g,j as k,Q as w}from"./index-018fb6dd.js";import"./index-765bf96c.js";import"./index.vue_vue_type_script_setup_true_lang-7071596f.js";import"./useCreate-b3492f2b.js";import"./useShow-ca493df3.js";const x={class:"table-default"},C={class:"pt-5 pl-2"},V=u({__name:"index",setup(u){const V="permissions/roles",{data:U,query:L,search:O,reset:S,loading:q}=o(V,!1),{destroy:D,deleted:E}=i(),{open:G,close:J,title:K,visible:M,id:N}=p(),P=n((()=>{var e;return null==(e=U.value)?void 0:e.data})),Q=d([]),T=(e,a)=>{Q.value=a,G(e)};return _((()=>{O(),E(S)})),(o,i)=>{const p=m("el-input"),u=m("el-form-item"),n=r,d=l,_=m("el-table-column"),U=s,E=a,G=m("el-table"),W=e,z=c("loading");return f(),v("div",null,[j(n,{search:b(O),reset:b(S)},{body:y((()=>[j(u,{label:"角色名称",prop:"role_name"},{default:y((()=>[j(p,{modelValue:b(L).role_name,"onUpdate:modelValue":i[0]||(i[0]=e=>b(L).role_name=e),name:"role_name",clearable:""},null,8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),h("div",x,[h("div",C,[j(d,{onClick:i[1]||(i[1]=e=>T(null,[]))})]),g((f(),k(G,{data:b(P),class:"mt-3","row-key":"id","default-expand-all":"","tree-props":{children:"children"}},{default:y((()=>[j(_,{prop:"role_name",label:"角色名称"}),j(_,{prop:"identify",label:"角色标识"}),j(_,{prop:"description",label:"角色描述"}),j(_,{prop:"created_at",label:"创建时间"}),j(_,{label:"操作",width:"200"},{default:y((e=>[j(U,{onClick:a=>T(e.row.id,e.row.permissions)},null,8,["onClick"]),j(E,{onClick:a=>b(D)(V,e.row.id)},null,8,["onClick"])])),_:1})])),_:1},8,["data"])),[[z,b(q)]])]),j(W,{modelValue:b(M),"onUpdate:modelValue":i[3]||(i[3]=e=>w(M)?M.value=e:null),title:b(K),"destroy-on-close":""},{default:y((()=>[j(t,{onClose:i[2]||(i[2]=e=>b(J)(b(S))),primary:b(N),api:V,"has-permissions":Q.value},null,8,["primary","has-permissions"])])),_:1},8,["modelValue","title"])])}}});export{V as default};
