/* 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 t}from"./index.vue_vue_type_script_setup_true_lang-0d8f66cc.js";/* empty css                   *//* empty css                  */import{_ as o}from"./index-2a89b0c2.js";import{_ as r}from"./operate.vue_vue_type_script_setup_true_lang-ffb863d5.js";import{_ as l}from"./search.vue_vue_type_script_setup_true_lang-8edf6ccf.js";/* empty css                     *//* empty css                 */import{_ as i}from"./create.vue_vue_type_script_setup_true_lang-51bbea45.js";import{u as p}from"./useGetList-d550ec92.js";import{u as n}from"./useDestroy-eecfd4a1.js";import{u as m}from"./useOpen-8f14d39d.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,Z as b,l as g,F as k,y as x,b as C,t as V,ag as U,z as R,a9 as q,ac as E,a5 as G,a6 as P,aa as S,ah as T,ai as Y,ab as z,a2 as A}from"./index-41bf27b7.js";/* empty css                  *//* empty css                   *//* empty css                  */import"./add.vue_vue_type_script_setup_true_lang-ddaf2b26.js";/* empty css                 *//* empty css                          *//* empty css                        */import"./index.vue_vue_type_script_setup_true_lang-94b20c4f.js";/* empty css                  *//* empty css                       *//* empty css                        */import"./useCreate-9054a19b.js";import"./useShow-b44df7c8.js";const D={class:"table-default"},F={key:0},L={key:1},N=u({__name:"index",setup(u){const N="permissions/permissions",{data:O,query:Q,search:W,reset:X,loading:Z}=p(N,!1),{destroy:$,deleted:B}=n(),{open:H,close:I,title:J,visible:K,id:M}=m(),ee=d((()=>{var e;return null==(e=O.value)?void 0:e.data}));_((()=>{W(),B(X)}));const se=c(!1);return(p,n)=>{const m=G,u=P,d=l,_=r,c=S,O=T,B=o,ae=Y,te=t,oe=a,re=s,le=z,ie=e,pe=A;return j(),f("div",null,[v(d,{search:h(W),reset:h(X)},{body:y((()=>[v(u,{label:"菜单名称",prop:"permission_name"},{default:y((()=>[v(m,{modelValue:h(Q).permission_name,"onUpdate:modelValue":n[0]||(n[0]=e=>h(Q).permission_name=e),name:"permission_name",clearable:""},null,8,["modelValue"])])),_:1})])),_:1},8,["search","reset"]),w("div",D,[v(_,{show:h(H)},null,8,["show"]),b((j(),g(le,{data:h(ee),class:"mt-3","row-key":"id","default-expand-all":"","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",F,[(j(!0),f(k,null,x(e.row.actions,(e=>(j(),g(O,{class:"mb-3 mr-3 cursor-pointer w-fit min-w-fit",onClick:s=>h(H)(e.id),closable:"",onClose:s=>h($)(N,e.id)},{default:y((()=>[C(V(e.permission_name),1)])),_:2},1032,["onClick","onClose"])))),256))])):(j(),f("div",L,[v(ae,{"confirm-button-text":"确认",title:"添加基础actions",onConfirm:s=>(async e=>{se.value=!0,E.post(N,{parent_id:e,actions:!0}).then((e=>{W(),se.value=!1}))})(e.row.id),placement:"top"},{reference:y((()=>[e.row.type===h(U).PAGE_TYPE?(j(),g(O,{key:0,class:"w-8 cursor-pointer"},{default:y((()=>[se.value?(j(),g(B,{key:0,name:"cog-6-tooth",class:"w-5 h-5 animate-spin"})):(j(),g(B,{key:1,name:"plus",className:"w-4 h-4"}))])),_:1})):R("",!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:N,onRefresh:h(W)},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(H)(e.row.id)},null,8,["onClick"]),v(re,{onClick:s=>h($)(N,e.row.id)},null,8,["onClick"])])),_:1})])),_:1},8,["data"])),[[pe,h(Z)]])]),v(ie,{modelValue:h(K),"onUpdate:modelValue":n[2]||(n[2]=e=>q(K)?K.value=e:null),title:h(J),"destroy-on-close":""},{default:y((()=>[v(i,{onClose:n[1]||(n[1]=e=>h(I)(h(X))),primary:h(M),api:N},null,8,["primary"])])),_:1},8,["modelValue","title"])])}}});export{N as default};
