import{d as X,c7 as Y,h as Z,r as m,e as $,k as aa,P as ea,o as c,c as M,f as a,w as e,a as t,Q as la,F as E,n as ta,q as i,m as _,v as f,O as ra,am as oa,c8 as N,U as sa,z as na,x as ca,y as _a,_ as ua,B as pa,C as ma,V as ia,W as da,D as fa,G as ya,H as ha,__tla as wa}from"./index-73e02845.js";import{_ as ba,__tla as va}from"./DictTag.vue_vue_type_script_lang-af2c8b0f.js";import{_ as ka,__tla as Ca}from"./ContentWrap.vue_vue_type_script_setup_true_lang-589371a6.js";import{a as xa,D as P,__tla as Va}from"./dict-0fdd6c74.js";import{h as ga}from"./tree-fd3a041e.js";import{b as Sa,d as Ua,__tla as Oa}from"./index-b7639f88.js";import Ia,{__tla as Ra}from"./MenuForm-0e255d99.js";import{u as Ta,__tla as Ma}from"./useMessage-1490ad82.js";import{_ as Ea}from"./_plugin-vue_export-helper-1b428a4d.js";import"./color-6e929987.js";import{__tla as Na}from"./el-card-ada74e7d.js";import{__tla as Pa}from"./Dialog-1f04d1b7.js";import{__tla as Aa}from"./Tooltip.vue_vue_type_script_setup_true_lang-b1ac9352.js";import{__tla as Fa}from"./index-c1a24aa4.js";import{__tla as Wa}from"./el-tree-select-a05a2d94.js";import"./constants-a3c69b57.js";let A,qa=Promise.all([(()=>{try{return wa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Wa}catch{}})()]).then(async()=>{A=Ea(X({name:"SystemMenu",__name:"index",setup(Ba){const{wsCache:g}=Y(),{t:F}=Z(),h=Ta(),w=m(!0),S=m([]),r=$({name:void 0,status:void 0,categoryId:1}),U=m(),b=m(!1),v=m(!0),W=u=>{r.categoryId=u.paneName,d()},d=async()=>{w.value=!0;try{const u=await Sa(r);S.value=ga(u)}finally{w.value=!1}},k=()=>{d()},q=()=>{U.value.resetFields(),r.categoryId=1,k()},O=m(),C=(u,o,x)=>{O.value.open(u,o,x)},B=()=>{v.value=!1,b.value=!b.value,oa(()=>{v.value=!0})},D=async()=>{try{await h.confirm("\u5373\u5C06\u66F4\u65B0\u7F13\u5B58\u5237\u65B0\u6D4F\u89C8\u5668\uFF01","\u5237\u65B0\u83DC\u5355\u7F13\u5B58"),g.delete(N.USER),g.delete(N.ROLE_ROUTERS),location.reload()}catch{}};return aa(()=>{d()}),(u,o)=>{const x=sa,V=na,z=ca,G=_a,p=ua,s=pa,H=ma,I=ka,R=ia,K=da,n=fa,L=ba,Q=ya,y=ea("hasPermi"),j=ha;return c(),M(E,null,[a(I,null,{default:e(()=>[a(H,{ref_key:"queryFormRef",ref:U,inline:!0,model:t(r),class:"-mb-15px","label-width":"68px"},{default:e(()=>[a(V,{label:"\u83DC\u5355\u540D\u79F0",prop:"name"},{default:e(()=>[a(x,{modelValue:t(r).name,"onUpdate:modelValue":o[0]||(o[0]=l=>t(r).name=l),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0",onKeyup:la(k,["enter"])},null,8,["modelValue"])]),_:1}),a(V,{label:"\u72B6\u6001",prop:"status"},{default:e(()=>[a(G,{modelValue:t(r).status,"onUpdate:modelValue":o[1]||(o[1]=l=>t(r).status=l),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u83DC\u5355\u72B6\u6001"},{default:e(()=>[(c(!0),M(E,null,ta(t(xa)(t(P).COMMON_STATUS),l=>(c(),i(z,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(V,null,{default:e(()=>[a(s,{onClick:k},{default:e(()=>[a(p,{class:"mr-5px",icon:"ep:search"}),_(" \u641C\u7D22 ")]),_:1}),a(s,{onClick:q},{default:e(()=>[a(p,{class:"mr-5px",icon:"ep:refresh"}),_(" \u91CD\u7F6E ")]),_:1}),f((c(),i(s,{plain:"",type:"primary",onClick:o[2]||(o[2]=l=>C("create"))},{default:e(()=>[a(p,{class:"mr-5px",icon:"ep:plus"}),_(" \u65B0\u589E ")]),_:1})),[[y,["system:menu:create"]]]),a(s,{plain:"",type:"danger",onClick:B},{default:e(()=>[a(p,{class:"mr-5px",icon:"ep:sort"}),_(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1}),a(s,{plain:"",onClick:D},{default:e(()=>[a(p,{class:"mr-5px",icon:"ep:refresh"}),_(" \u5237\u65B0\u83DC\u5355\u7F13\u5B58 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(K,{modelValue:t(r).categoryId,"onUpdate:modelValue":o[3]||(o[3]=l=>t(r).categoryId=l),onTabClick:W,class:"parent-tabs"},{default:e(()=>[a(R,{label:"\u5E73\u53F0\u83DC\u5355",name:1}),a(R,{label:"\u5546\u6237\u83DC\u5355",name:2})]),_:1},8,["modelValue"]),a(I,null,{default:e(()=>[t(v)?f((c(),i(Q,{key:0,data:t(S),"default-expand-all":t(b),"row-key":"id"},{default:e(()=>[a(n,{"show-overflow-tooltip":!0,label:"\u83DC\u5355\u540D\u79F0",prop:"name",width:"250"}),a(n,{align:"center",label:"\u56FE\u6807",prop:"icon",width:"100"},{default:e(l=>[a(p,{icon:l.row.icon},null,8,["icon"])]),_:1}),a(n,{label:"\u6392\u5E8F",prop:"sort",width:"60"}),a(n,{"show-overflow-tooltip":!0,label:"\u6743\u9650\u6807\u8BC6",prop:"permission"}),a(n,{"show-overflow-tooltip":!0,label:"\u7EC4\u4EF6\u8DEF\u5F84",prop:"component"}),a(n,{"show-overflow-tooltip":!0,label:"\u7EC4\u4EF6\u540D\u79F0",prop:"componentName"}),a(n,{label:"\u72B6\u6001",prop:"status",width:"80"},{default:e(l=>[a(L,{type:t(P).COMMON_STATUS,value:l.row.status},null,8,["type","value"])]),_:1}),a(n,{align:"center",label:"\u64CD\u4F5C"},{default:e(l=>[f((c(),i(s,{link:"",type:"primary",onClick:T=>C("update",l.row.id)},{default:e(()=>[_(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[y,["system:menu:update"]]]),f((c(),i(s,{link:"",type:"primary",onClick:T=>C("create",void 0,l.row.id)},{default:e(()=>[_(" \u65B0\u589E ")]),_:2},1032,["onClick"])),[[y,["system:menu:create"]]]),f((c(),i(s,{link:"",type:"danger",onClick:T=>(async J=>{try{await h.delConfirm(),await Ua(J),h.success(F("common.delSuccess")),await d()}catch{}})(l.row.id)},{default:e(()=>[_(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["system:menu:delete"]]])]),_:1})]),_:1},8,["data","default-expand-all"])),[[j,t(w)]]):ra("",!0)]),_:1}),a(Ia,{ref_key:"formRef",ref:O,onSuccess:d},null,512)],64)}}}),[["__scopeId","data-v-1524007a"]])});export{qa as __tla,A as default};