import{P as C}from"./index.f84801a7.js";import{i as D,m as y}from"./auth.a54adaef.js";import{d as F,q as E,o as w,a as n,b as l,c as s,f as e,w as t,t as i,e as T,m as p}from"./vendor.d574ef89.js";import"./index.b32171ca.js";const B={class:"menu"},k=p("\u6DFB\u52A0\u83DC\u5355"),A={key:0},x={key:1},M={key:2},N=p("\u7F16\u8F91"),v=p("\u5220\u9664"),L=F({setup(g){const _={CATALOG:"M",MENU:"C",BUTTON:"A"},m=E([]),c=()=>{D().then(u=>{m.value=u})},f=async u=>{await y({id:u}),c()};return w(()=>{c()}),(u,z)=>{const r=n("el-button"),d=n("router-link"),o=n("el-table-column"),b=n("el-table"),h=n("el-card");return l(),s("div",B,[e(h,{shadow:"never"},{default:t(()=>[e(d,{to:"/permission/menu/edit"},{default:t(()=>[e(r,{type:"primary",size:"small"},{default:t(()=>[k]),_:1})]),_:1}),e(b,{data:m.value,class:"m-t-24","row-key":"id","default-expand-all":"","tree-props":{children:"children"},size:"mini"},{default:t(()=>[e(o,{prop:"menuName",label:"\u540D\u79F0",width:"180"}),e(o,{prop:"menuType",label:"\u83DC\u5355\u7C7B\u578B"},{default:t(a=>[a.row.menuType==_.CATALOG?(l(),s("span",A,i("\u76EE\u5F55"))):a.row.menuType==_.MENU?(l(),s("span",x,i("\u83DC\u5355"))):(l(),s("span",M,i("\u6309\u94AE")))]),_:1}),e(o,{prop:"menuIcon",label:"\u56FE\u6807"}),e(o,{prop:"menuSort",label:"\u6392\u5E8F"}),e(o,{prop:"perms",label:"\u6743\u9650\u6807\u8BC6"}),e(o,{prop:"paths",label:"\u7EC4\u4EF6\u8DEF\u5F84"}),e(o,{prop:"isDisable",label:"\u72B6\u6001"},{default:t(a=>[T("span",null,i(a.row.isDisable==0?"\u542F\u7528":"\u5173\u95ED"),1)]),_:1}),e(o,{prop:"createTime",label:"\u521B\u5EFA\u65F6\u95F4",width:"160"}),e(o,{label:"\u64CD\u4F5C"},{default:t(a=>[e(d,{class:"m-r-10",to:{path:"/permission/menu/edit",query:{id:a.row.id}}},{default:t(()=>[e(r,{type:"text",size:"mini"},{default:t(()=>[N]),_:1})]),_:2},1032,["to"]),e(C,{class:"m-r-10 inline",onConfirm:G=>f(a.row.id)},{trigger:t(()=>[e(r,{type:"text",size:"mini"},{default:t(()=>[v]),_:1})]),_:2},1032,["onConfirm"])]),_:1})]),_:1},8,["data"])]),_:1})])}}});export{L as default};
