index-fb26be84.js 5.5 KB

1
  1. import{d as j,dT as Q,B as W,r as p,g as X,z as aa,T as ea,o as c,c as R,i as a,w as e,a as t,U as la,F as E,C as ta,k as d,l as u,D as f,S as ra,ap as oa,dU as N,Y as sa,I as na,G as ca,H as ua,n as _a,s as ia,J as pa,Z as da,$ as ma,K as fa,L as ya,M as ha,_ as wa,__tla as va}from"./index-2f799233.js";import{_ as ba,__tla as ka}from"./DictTag-ea4c6cc2.js";import{_ as Ca,__tla as xa}from"./ContentWrap-9da801df.js";import{a as ga,D as z,__tla as Sa}from"./dict-20c916e2.js";import{h as Ua}from"./tree-0af4953a.js";import{b as Va,d as Ia,__tla as Oa}from"./index-3067fd7d.js";import Ta,{__tla as Ma}from"./MenuForm-dd510c8c.js";import{u as Ra,__tla as Ea}from"./useMessage-e567ad40.js";import"./color-6e929987.js";import{__tla as Na}from"./el-card-c64c83d1.js";import{__tla as za}from"./Dialog-6fd39e06.js";import{__tla as Da}from"./index-1c180a16.js";import{__tla as Fa}from"./el-tree-select-ef4257fc.js";import"./constants-d55a3460.js";let D,Ka=Promise.all([(()=>{try{return va}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Fa}catch{}})()]).then(async()=>{D=wa(j({name:"SystemMenu",__name:"index",setup(La){const{wsCache:S}=Q(),{t:F}=W(),h=Ra(),w=p(!0),U=p([]),r=X({name:void 0,status:void 0,categoryId:1}),V=p(),v=p(!1),b=p(!0),K=_=>{r.categoryId=_.paneName,console.log(r.categoryId),m()},m=async()=>{w.value=!0;try{const _=await Va(r);U.value=Ua(_)}finally{w.value=!1}},k=()=>{m()},L=()=>{V.value.resetFields(),r.categoryId=1,k()},I=p(),C=(_,o,x)=>{I.value.open(_,o,x)},q=()=>{b.value=!1,v.value=!v.value,oa(()=>{b.value=!0})},A=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(N.USER),S.delete(N.ROLE_ROUTERS),location.reload()}catch{}};return aa(()=>{m()}),(_,o)=>{const x=sa,g=na,P=ca,B=ua,i=_a,s=ia,G=pa,O=Ca,T=da,H=ma,n=fa,J=ba,Y=ya,y=ea("hasPermi"),Z=ha;return c(),R(E,null,[a(O,null,{default:e(()=>[a(G,{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(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(g,{label:"\u72B6\u6001",prop:"status"},{default:e(()=>[a(B,{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),R(E,null,ta(t(ga)(t(z).COMMON_STATUS),l=>(c(),d(P,{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"}),u(" \u641C\u7D22 ")]),_:1}),a(s,{onClick:L},{default:e(()=>[a(i,{class:"mr-5px",icon:"ep:refresh"}),u(" \u91CD\u7F6E ")]),_:1}),f((c(),d(s,{plain:"",type:"primary",onClick:o[2]||(o[2]=l=>C("create"))},{default:e(()=>[a(i,{class:"mr-5px",icon:"ep:plus"}),u(" \u65B0\u589E ")]),_:1})),[[y,["system:menu:create"]]]),a(s,{plain:"",type:"danger",onClick:q},{default:e(()=>[a(i,{class:"mr-5px",icon:"ep:sort"}),u(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1}),a(s,{plain:"",onClick:A},{default:e(()=>[a(i,{class:"mr-5px",icon:"ep:refresh"}),u(" \u5237\u65B0\u83DC\u5355\u7F13\u5B58 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(H,{modelValue:t(r).categoryId,"onUpdate:modelValue":o[3]||(o[3]=l=>t(r).categoryId=l),onTabClick:K,class:"parent-tabs"},{default:e(()=>[a(T,{label:"\u5E73\u53F0\u83DC\u5355",name:1}),a(T,{label:"\u5546\u6237\u83DC\u5355",name:2})]),_:1},8,["modelValue"]),a(O,null,{default:e(()=>[t(b)?f((c(),d(Y,{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(J,{type:t(z).COMMON_STATUS,value:l.row.status},null,8,["type","value"])]),_:1}),a(n,{align:"center",label:"\u64CD\u4F5C"},{default:e(l=>[f((c(),d(s,{link:"",type:"primary",onClick:M=>C("update",l.row.id)},{default:e(()=>[u(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[y,["system:menu:update"]]]),f((c(),d(s,{link:"",type:"primary",onClick:M=>C("create",void 0,l.row.id)},{default:e(()=>[u(" \u65B0\u589E ")]),_:2},1032,["onClick"])),[[y,["system:menu:create"]]]),f((c(),d(s,{link:"",type:"danger",onClick:M=>(async $=>{try{await h.delConfirm(),await Ia($),h.success(F("common.delSuccess")),await m()}catch{}})(l.row.id)},{default:e(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["system:menu:delete"]]])]),_:1})]),_:1},8,["data","default-expand-all"])),[[Z,t(w)]]):ra("",!0)]),_:1}),a(Ta,{ref_key:"formRef",ref:I,onSuccess:m},null,512)],64)}}}),[["__scopeId","data-v-e0161664"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/system/menu/index.vue"]])});export{Ka as __tla,D as default};