import{M as $,_ as E}from"./index-a6ee13d3.js";import{E as P,a as h}from"./element-plus-91d6d961.js";import{H as g,e as A,_ as R,i as V,ah as n,ar as z,o as v,c as N,V as t,P as o,a as d,T as p,Q as O,O as I,U as w,u as S,aP as L}from"./@vue-6dabbe94.js";import"./pinia-b6f74250.js";import"./vue-router-c1461dfc.js";import"./vue-i18n-b3581196.js";import"./@intlify-ea47d1db.js";import"./source-map-7d7e1c08.js";import"./vue-b1ba6f14.js";import"./js-cookie-edb2da2a.js";import"./@element-plus-64e6e14a.js";import"./nprogress-08a53ce8.js";import"./axios-4a70c6fc.js";import"./qs-c5b6dbf2.js";import"./side-channel-394f276c.js";import"./get-intrinsic-bd2830fd.js";import"./has-symbols-e8f3ca0e.js";import"./has-proto-f7d0b240.js";import"./function-bind-22e7ee79.js";import"./has-26d28e02.js";import"./call-bind-e5c1c8b0.js";import"./object-inspect-8fd4bade.js";import"./mitt-f7ef348c.js";import"./vue-grid-layout-ec2a62c3.js";import"./lodash-es-9851428c.js";import"./@vueuse-e129c873.js";import"./@popperjs-c75af06c.js";import"./@ctrl-f8748455.js";import"./dayjs-f6fdf7b4.js";import"./async-validator-dee29e8b.js";import"./memoize-one-297ddbcb.js";import"./escape-html-b8998962.js";import"./normalize-wheel-es-ed76fb12.js";import"./@floating-ui-880a26aa.js";const H={class:"mb15"},Q={class:"ml10"},U=g({name:"systemMenu"}),Mt=g({...U,setup(j){const _=$(),b=L(()=>E(()=>import("./dialog-0c03258f.js"),["assets/js/dialog-0c03258f.js","assets/js/index-a6ee13d3.js","assets/js/@vue-6dabbe94.js","assets/js/pinia-b6f74250.js","assets/js/vue-router-c1461dfc.js","assets/js/vue-i18n-b3581196.js","assets/js/@intlify-ea47d1db.js","assets/js/source-map-7d7e1c08.js","assets/js/vue-b1ba6f14.js","assets/js/js-cookie-edb2da2a.js","assets/js/@element-plus-64e6e14a.js","assets/js/nprogress-08a53ce8.js","assets/css/nprogress-8b89e2e0.css","assets/js/axios-4a70c6fc.js","assets/js/qs-c5b6dbf2.js","assets/js/side-channel-394f276c.js","assets/js/get-intrinsic-bd2830fd.js","assets/js/has-symbols-e8f3ca0e.js","assets/js/has-proto-f7d0b240.js","assets/js/function-bind-22e7ee79.js","assets/js/has-26d28e02.js","assets/js/call-bind-e5c1c8b0.js","assets/js/object-inspect-8fd4bade.js","assets/js/element-plus-91d6d961.js","assets/js/lodash-es-9851428c.js","assets/js/@vueuse-e129c873.js","assets/js/@popperjs-c75af06c.js","assets/js/@ctrl-f8748455.js","assets/js/dayjs-f6fdf7b4.js","assets/js/async-validator-dee29e8b.js","assets/js/memoize-one-297ddbcb.js","assets/js/escape-html-b8998962.js","assets/js/normalize-wheel-es-ed76fb12.js","assets/js/@floating-ui-880a26aa.js","assets/js/mitt-f7ef348c.js","assets/js/vue-grid-layout-ec2a62c3.js","assets/css/fastcms-01cf5f8f.css"])),m=A(),i=R({tableData:{data:[],loading:!0}}),c=()=>{i.tableData.loading=!0,_.getMenuList().then(a=>{i.tableData.data=a.data,i.tableData.loading=!1})},D=()=>{m.value.openDialog("add",null)},u=(a,l)=>{m.value.openDialog(a,l)},y=a=>{P.confirm(`此操作将永久删除路由：${a.path}, 是否继续?`,"提示",{confirmButtonText:"删除",cancelButtonText:"取消",type:"warning"}).then(()=>{_.delMenu(a.id).then(()=>{h.success("删除成功"),c()}).catch(l=>{h.error(l.message)})}).catch(()=>{})};return V(()=>{c()}),(a,l)=>{const C=n("ele-Plus"),k=n("el-icon"),s=n("el-button"),M=n("SvgIcon"),r=n("el-table-column"),x=n("el-table"),B=n("el-card"),T=z("loading");return v(),N("div",null,[t(B,{shadow:"hover"},{default:o(()=>[d("div",H,[t(s,{size:"default",type:"primary",class:"ml10",onClick:l[0]||(l[0]=e=>D())},{default:o(()=>[t(k,null,{default:o(()=>[t(C)]),_:1}),p(" 新增菜单 ")]),_:1})]),O((v(),I(x,{data:i.tableData.data,style:{width:"100%"},"row-key":"path","tree-props":{children:"children",hasChildren:"hasChildren"}},{default:o(()=>[t(r,{label:"菜单名称","show-overflow-tooltip":""},{default:o(e=>[t(M,{name:e.row.meta.icon},null,8,["name"]),d("span",Q,w(a.$t(e.row.meta.title)),1)]),_:1}),t(r,{prop:"path",label:"路由路径","show-overflow-tooltip":""}),t(r,{label:"组件路径","show-overflow-tooltip":""},{default:o(e=>[d("span",null,w(e.row.component),1)]),_:1}),t(r,{prop:"sortNum",label:"排序","show-overflow-tooltip":"",width:"80"}),t(r,{label:"操作","show-overflow-tooltip":"",width:"140"},{default:o(e=>[t(s,{size:"small",text:"",type:"primary",onClick:f=>u("add",e.row)},{default:o(()=>[p("新增")]),_:2},1032,["onClick"]),t(s,{size:"small",text:"",type:"primary",onClick:f=>u("edit",e.row)},{default:o(()=>[p("修改")]),_:2},1032,["onClick"]),t(s,{size:"small",text:"",type:"primary",onClick:f=>y(e.row)},{default:o(()=>[p("删除")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[T,i.tableData.loading]])]),_:1}),t(S(b),{ref_key:"menuDialogRef",ref:m,onRefresh:l[1]||(l[1]=e=>c())},null,512)])}}});export{Mt as default};
