/* empty css             *//* empty css                   */import{_ as e}from"./index-30b81ccf.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-e37713d5.js";import{_ as a}from"./update.vue_vue_type_script_setup_true_lang-f3e31b71.js";import{_ as t}from"./index.vue_vue_type_script_setup_true_lang-90abd883.js";/* empty css                   *//* empty css                  */import{_ as o}from"./index-a921dba7.js";import{_ as r}from"./operate.vue_vue_type_script_setup_true_lang-61480e03.js";import{_ as l}from"./search.vue_vue_type_script_setup_true_lang-946854ba.js";/* empty css                     *//* empty css                 */import{_ as i}from"./create.vue_vue_type_script_setup_true_lang-c4eb42b0.js";import{u as p}from"./useGetList-927e47a1.js";import{u as n}from"./useDestroy-e8ee11d1.js";import{u as m}from"./useOpen-7c44bdc3.js";import{d as u,p as d,x as _,m as c,o as j,c as f,a as v,w as y,f as h,e as w,W as b,l as g,F as k,y as x,b as C,t as V,ad as U,z as E,a6 as G,a9 as q,a2 as z,a3 as D,a7 as F,ae as P,af as R,a8 as Y,$}from"./index-2b50ecca.js";/* empty css                  *//* empty css                   *//* empty css                  */import"./add.vue_vue_type_script_setup_true_lang-028aa8f1.js";/* empty css                 *//* empty css                      *//* empty css                  *//* empty css                          *//* empty css                        */import"./index.vue_vue_type_script_setup_true_lang-872e1028.js";/* empty css                       *//* empty css                        */import"./useCreate-d1a919fb.js";import"./useShow-5d0f85e9.js";const A={class:"table-default"},B={key:0},H={key:1},L="permissions/permissions",N=u({__name:"index",setup(u){const{data:N,query:O,search:S,reset:T,loading:W}=p(L,!1),{destroy:X,deleted:Z}=n(),{open:I,close:J,title:K,visible:M,id:Q}=m(),ee=d((()=>{var e;return null==(e=N.value)?void 0:e.data}));_((()=>{S(),Z(T)}));const se=c(!1);return(p,n)=>{const m=z,u=D,d=l,_=r,c=F,N=P,Z=o,ae=R,te=t,oe=a,re=s,le=Y,ie=e,pe=$;return j(),f("div",null,[v(d,{search:h(S),reset:h(T)},{body:y((()=>[v(u,{label:"菜单名称",prop:"permission_name"},{default:y((()=>[v(m,{modelValue:h(O).permission_name,"onUpdate:modelValue":n[0]||(n[0]=e=>h(O).permission_name=e),name:"permission_name",clearable:""},null,8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),w("div",A,[v(_,{show:h(I)},null,8,["show"]),b((j(),g(le,{data:ee.value,class:"mt-3","row-key":"id","default-expand-all":!1,"tree-props":{children:"children"}},{default:y((()=>[v(c,{prop:"permission_name",label:"菜单名称"}),v(c,{prop:"route",label:"菜单路由"}),v(c,{prop:"permission_mark",label:"权限标识",width:"360"},{default:y((e=>[e.row.actions.length?(j(),f("div",B,[(j(!0),f(k,null,x(e.row.actions,(e=>(j(),g(N,{key:e.id,class:"mb-3 mr-3 cursor-pointer w-fit min-w-fit",onClick:s=>h(I)(e.id),closable:"",onClose:s=>h(X)(L,e.id)},{default:y((()=>[C(V(e.permission_name),1)])),_:2},1032,["onClick","onClose"])))),128))])):(j(),f("div",H,[v(ae,{"confirm-button-text":"确认",title:"添加基础actions",onConfirm:s=>(async e=>{se.value=!0,q.post(L,{parent_id:e,actions:!0}).then((e=>{S(),se.value=!1}))})(e.row.id),placement:"top"},{reference:y((()=>[w("span",null,[e.row.type===h(U).PAGE_TYPE?(j(),g(N,{key:0,class:"w-8 cursor-pointer"},{default:y((()=>[se.value?(j(),g(Z,{key:0,name:"cog-6-tooth",class:"w-5 h-5 animate-spin"})):(j(),g(Z,{key:1,name:"plus",className:"w-4 h-4"}))])),_:1})):E("",!0)])])),_:2},1032,["onConfirm"])]))])),_:1}),v(c,{prop:"hidden",label:"状态",width:"100"},{default:y((e=>[v(te,{modelValue:e.row.hidden,"onUpdate:modelValue":s=>e.row.hidden=s,id:e.row.id,api:L,onRefresh:h(S)},null,8,["modelValue","onUpdate:modelValue","id","onRefresh"])])),_:1}),v(c,{prop:"created_at",label:"创建时间"}),v(c,{label:"操作",width:"200"},{default:y((e=>[v(oe,{onClick:s=>h(I)(e.row.id)},null,8,["onClick"]),v(re,{onClick:s=>h(X)(L,e.row.id)},null,8,["onClick"])])),_:1})])),_:1},8,["data"])),[[pe,h(W)]])]),v(ie,{modelValue:h(M),"onUpdate:modelValue":n[2]||(n[2]=e=>G(M)?M.value=e:null),title:h(K),"destroy-on-close":""},{default:y((()=>[v(i,{onClose:n[1]||(n[1]=e=>h(J)(h(T))),primary:h(Q),api:L},null,8,["primary"])])),_:1},8,["modelValue","title"])])}}});export{N as default};
