1 |
- import{d as Y,cb as j,i as Z,r as p,f as $,l as aa,R as ea,o as c,c as M,g as a,w as e,a as t,S as la,F as z,v as ta,x as m,n as _,y as f,Q as ra,ao as oa,cc as A,W as sa,B as na,z as ca,A as _a,q as ua,D as ia,G as pa,X as ma,Y as da,H as fa,I as ya,J as ha,_ as wa,__tla as va}from"./index-b362e1d5.js";import{_ as ba,__tla as ka}from"./DictTag-e097450d.js";import{_ as xa,__tla as Ca}from"./ContentWrap-a3bb871b.js";import{a as ga,D as N,__tla as Sa}from"./dict-9948b178.js";import{h as Ua}from"./tree-0af4953a.js";import{b as Va,d as Ia,__tla as Ra}from"./index-a1eb233e.js";import Oa,{__tla as Ta}from"./MenuForm-1782a23e.js";import{u as Ma,__tla as za}from"./useMessage-7c1dd10e.js";import"./color-6e929987.js";import{__tla as Aa}from"./el-card-732e29b8.js";import{__tla as Na}from"./Dialog-71bebaff.js";import{__tla as Da}from"./Tooltip-d9b8fce5.js";import{__tla as Ea}from"./index-39b44010.js";import{__tla as Fa}from"./el-tree-select-0f207944.js";import"./constants-637baed6.js";let D,qa=Promise.all([(()=>{try{return va}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Fa}catch{}})()]).then(async()=>{D=wa(Y({name:"SystemMenu",__name:"index",setup(Ba){const{wsCache:S}=j(),{t:E}=Z(),h=Ma(),w=p(!0),U=p([]),r=$({name:void 0,status:void 0,categoryId:1}),V=p(),v=p(!1),b=p(!0),F=u=>{r.categoryId=u.paneName,console.log(r.categoryId),d()},d=async()=>{w.value=!0;try{const u=await Va(r);U.value=Ua(u)}finally{w.value=!1}},k=()=>{d()},q=()=>{V.value.resetFields(),r.categoryId=1,k()},I=p(),x=(u,o,C)=>{I.value.open(u,o,C)},B=()=>{b.value=!1,v.value=!v.value,oa(()=>{b.value=!0})},P=async()=>{try{await h.confirm("\u5373\u5C06\u66F4\u65B0\u7F13\u5B58\u5237\u65B0\u6D4F\u89C8\u5668\uFF01","\u5237\u65B0\u83DC\u5355\u7F13\u5B58"),S.delete(A.USER),S.delete(A.ROLE_ROUTERS),location.reload()}catch{}};return aa(()=>{d()}),(u,o)=>{const C=sa,g=na,W=ca,G=_a,i=ua,s=ia,H=pa,R=xa,O=ma,J=da,n=fa,K=ba,L=ya,y=ea("hasPermi"),Q=ha;return c(),M(z,null,[a(R,null,{default:e(()=>[a(H,{ref_key:"queryFormRef",ref:V,inline:!0,model:t(r),class:"-mb-15px","label-width":"68px"},{default:e(()=>[a(g,{label:"\u83DC\u5355\u540D\u79F0",prop:"name"},{default:e(()=>[a(C,{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(g,{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(z,null,ta(t(ga)(t(N).COMMON_STATUS),l=>(c(),m(W,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(g,null,{default:e(()=>[a(s,{onClick:k},{default:e(()=>[a(i,{class:"mr-5px",icon:"ep:search"}),_(" \u641C\u7D22 ")]),_:1}),a(s,{onClick:q},{default:e(()=>[a(i,{class:"mr-5px",icon:"ep:refresh"}),_(" \u91CD\u7F6E ")]),_:1}),f((c(),m(s,{plain:"",type:"primary",onClick:o[2]||(o[2]=l=>x("create"))},{default:e(()=>[a(i,{class:"mr-5px",icon:"ep:plus"}),_(" \u65B0\u589E ")]),_:1})),[[y,["system:menu:create"]]]),a(s,{plain:"",type:"danger",onClick:B},{default:e(()=>[a(i,{class:"mr-5px",icon:"ep:sort"}),_(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1}),a(s,{plain:"",onClick:P},{default:e(()=>[a(i,{class:"mr-5px",icon:"ep:refresh"}),_(" \u5237\u65B0\u83DC\u5355\u7F13\u5B58 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(J,{modelValue:t(r).categoryId,"onUpdate:modelValue":o[3]||(o[3]=l=>t(r).categoryId=l),onTabClick:F,class:"parent-tabs"},{default:e(()=>[a(O,{label:"\u5E73\u53F0\u83DC\u5355",name:1}),a(O,{label:"\u5546\u6237\u83DC\u5355",name:2})]),_:1},8,["modelValue"]),a(R,null,{default:e(()=>[t(b)?f((c(),m(L,{key:0,data:t(U),"default-expand-all":t(v),"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(i,{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(K,{type:t(N).COMMON_STATUS,value:l.row.status},null,8,["type","value"])]),_:1}),a(n,{align:"center",label:"\u64CD\u4F5C"},{default:e(l=>[f((c(),m(s,{link:"",type:"primary",onClick:T=>x("update",l.row.id)},{default:e(()=>[_(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[y,["system:menu:update"]]]),f((c(),m(s,{link:"",type:"primary",onClick:T=>x("create",void 0,l.row.id)},{default:e(()=>[_(" \u65B0\u589E ")]),_:2},1032,["onClick"])),[[y,["system:menu:create"]]]),f((c(),m(s,{link:"",type:"danger",onClick:T=>(async X=>{try{await h.delConfirm(),await Ia(X),h.success(E("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"])),[[Q,t(w)]]):ra("",!0)]),_:1}),a(Oa,{ref_key:"formRef",ref:I,onSuccess:d},null,512)],64)}}}),[["__scopeId","data-v-e0161664"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/menu/index.vue"]])});export{qa as __tla,D as default};
|