/* empty css             *//* empty css                   */import{_ as e}from"./index-e025ca33.js";/* empty css                        *//* empty css                    *//* empty css               */import"./el-tooltip-4ed993c7.js";/* empty css                  *//* empty css                     */import{_ as s}from"./destroy.vue_vue_type_script_setup_true_lang-35bf4cb0.js";import{_ as a}from"./update.vue_vue_type_script_setup_true_lang-b418af91.js";import{_ as l}from"./add.vue_vue_type_script_setup_true_lang-ddaf2b26.js";import{_ as r}from"./search.vue_vue_type_script_setup_true_lang-8edf6ccf.js";/* empty css                     *//* empty css                 */import t from"./create-e537de90.js";import{u as o}from"./useGetList-d550ec92.js";import{u as i}from"./useDestroy-eecfd4a1.js";import{u as p}from"./useOpen-8f14d39d.js";import{d as m,p as u,m as n,x as d,o as _,c,a as j,w as f,f as v,e as b,Z as y,l as h,a9 as g,a5 as x,a6 as w,aa as k,ab as C,a2 as V}from"./index-41bf27b7.js";/* empty css                  *//* empty css                   *//* empty css                  */import"./index-2a89b0c2.js";/* empty css                *//* empty css                  *//* empty css                       */import"./index.vue_vue_type_script_setup_true_lang-94b20c4f.js";/* empty css                          *//* empty css                 */import"./useCreate-9054a19b.js";import"./useShow-b44df7c8.js";const U={class:"table-default"},S={class:"pt-5 pl-2"},q=m({__name:"index",setup(m){const q="permissions/roles",{data:z,query:A,search:D,reset:G,loading:L}=o(q,!1),{destroy:O,deleted:Q}=i(),{open:R,close:T,title:W,visible:X,id:Y}=p(),Z=u((()=>{var e;return null==(e=z.value)?void 0:e.data})),$=n([]),B=(e,s)=>{$.value=s,R(e)};return d((()=>{D(),Q(G)})),(o,i)=>{const p=x,m=w,u=r,n=l,d=k,z=a,Q=s,R=C,E=e,F=V;return _(),c("div",null,[j(u,{search:v(D),reset:v(G)},{body:f((()=>[j(m,{label:"角色名称",prop:"role_name"},{default:f((()=>[j(p,{modelValue:v(A).role_name,"onUpdate:modelValue":i[0]||(i[0]=e=>v(A).role_name=e),name:"role_name",clearable:""},null,8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),b("div",U,[b("div",S,[j(n,{onClick:i[1]||(i[1]=e=>B(null,[]))})]),y((_(),h(R,{data:v(Z),class:"mt-3","row-key":"id","default-expand-all":"","tree-props":{children:"children"}},{default:f((()=>[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:f((e=>[j(z,{onClick:s=>B(e.row.id,e.row.permissions)},null,8,["onClick"]),j(Q,{onClick:s=>v(O)(q,e.row.id)},null,8,["onClick"])])),_:1})])),_:1},8,["data"])),[[F,v(L)]])]),j(E,{modelValue:v(X),"onUpdate:modelValue":i[3]||(i[3]=e=>g(X)?X.value=e:null),title:v(W),"destroy-on-close":""},{default:f((()=>[j(t,{onClose:i[2]||(i[2]=e=>v(T)(v(G))),primary:v(Y),api:q,"has-permissions":$.value},null,8,["primary","has-permissions"])])),_:1},8,["modelValue","title"])])}}});export{q as default};
