index-18a8e350.js 5.2 KB

1
  1. import{d as J,dQ as X,n as I,r as i,f as W,B as Y,P as Z,o as n,c as g,i as a,w as e,a as t,Q as $,F as E,k as aa,l as p,j as u,C as m,a2 as ea,am as la,dR as N,U as ta,H as ra,D as sa,G as oa,v as na,J as ua,K as _a,L as ca,M as ia,N as pa,_ as ma,__tla as da}from"./index-af173888.js";import{_ as fa,__tla as ya}from"./DictTag-4a35e2b7.js";import{_ as ha,__tla as wa}from"./ContentWrap-b959c1be.js";import{a as va,D as A,__tla as ka}from"./dict-093d1dfa.js";import{h as ba}from"./tree-02f455f9.js";import{b as Ca,d as xa,__tla as Sa}from"./index-5a53c3c3.js";import Ra,{__tla as Ua}from"./MenuForm-149dc04d.js";import{u as Ta,__tla as Ma}from"./useMessage-170c1b43.js";import"./color-6e929987.js";import{__tla as Oa}from"./el-card-178b9654.js";import{__tla as Va}from"./Dialog-987c90a1.js";import{__tla as ga}from"./index-54b8f773.js";import{__tla as Ea}from"./el-tree-select-cd58540b.js";import"./constants-a3c69b57.js";let D,Na=Promise.all([(()=>{try{return da}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return Ea}catch{}})()]).then(async()=>{D=ma(J({name:"SystemMenu",__name:"index",setup(Aa){const{wsCache:R}=X(),{t:F}=I(),h=Ta(),w=i(!0),U=i([]),_=W({name:void 0,status:void 0}),T=i(),v=i(!1),k=i(!0),d=async()=>{w.value=!0;try{const f=await Ca(_);U.value=ba(f)}finally{w.value=!1}},b=()=>{d()},K=()=>{T.value.resetFields(),b()},M=i(),C=(f,r,x)=>{M.value.open(f,r,x)},L=()=>{k.value=!1,v.value=!v.value,la(()=>{k.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"),R.delete(N.USER),R.delete(N.ROLE_ROUTERS),location.reload()}catch{}};return Y(()=>{d()}),(f,r)=>{const x=ta,S=ra,H=sa,Q=oa,c=na,s=ua,j=_a,O=ha,o=ca,q=fa,z=ia,y=Z("hasPermi"),B=pa;return n(),g(E,null,[a(O,null,{default:e(()=>[a(j,{ref_key:"queryFormRef",ref:T,inline:!0,model:t(_),class:"-mb-15px","label-width":"68px"},{default:e(()=>[a(S,{label:"\u83DC\u5355\u540D\u79F0",prop:"name"},{default:e(()=>[a(x,{modelValue:t(_).name,"onUpdate:modelValue":r[0]||(r[0]=l=>t(_).name=l),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0",onKeyup:$(b,["enter"])},null,8,["modelValue"])]),_:1}),a(S,{label:"\u72B6\u6001",prop:"status"},{default:e(()=>[a(Q,{modelValue:t(_).status,"onUpdate:modelValue":r[1]||(r[1]=l=>t(_).status=l),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u83DC\u5355\u72B6\u6001"},{default:e(()=>[(n(!0),g(E,null,aa(t(va)(t(A).COMMON_STATUS),l=>(n(),p(H,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(S,null,{default:e(()=>[a(s,{onClick:b},{default:e(()=>[a(c,{class:"mr-5px",icon:"ep:search"}),u(" \u641C\u7D22 ")]),_:1}),a(s,{onClick:K},{default:e(()=>[a(c,{class:"mr-5px",icon:"ep:refresh"}),u(" \u91CD\u7F6E ")]),_:1}),m((n(),p(s,{plain:"",type:"primary",onClick:r[2]||(r[2]=l=>C("create"))},{default:e(()=>[a(c,{class:"mr-5px",icon:"ep:plus"}),u(" \u65B0\u589E ")]),_:1})),[[y,["system:menu:create"]]]),a(s,{plain:"",type:"danger",onClick:L},{default:e(()=>[a(c,{class:"mr-5px",icon:"ep:sort"}),u(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1}),a(s,{plain:"",onClick:P},{default:e(()=>[a(c,{class:"mr-5px",icon:"ep:refresh"}),u(" \u5237\u65B0\u83DC\u5355\u7F13\u5B58 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(O,null,{default:e(()=>[t(k)?m((n(),p(z,{key:0,data:t(U),"default-expand-all":t(v),"row-key":"id"},{default:e(()=>[a(o,{"show-overflow-tooltip":!0,label:"\u83DC\u5355\u540D\u79F0",prop:"name",width:"250"}),a(o,{align:"center",label:"\u56FE\u6807",prop:"icon",width:"100"},{default:e(l=>[a(c,{icon:l.row.icon},null,8,["icon"])]),_:1}),a(o,{label:"\u6392\u5E8F",prop:"sort",width:"60"}),a(o,{"show-overflow-tooltip":!0,label:"\u6743\u9650\u6807\u8BC6",prop:"permission"}),a(o,{"show-overflow-tooltip":!0,label:"\u7EC4\u4EF6\u8DEF\u5F84",prop:"component"}),a(o,{"show-overflow-tooltip":!0,label:"\u7EC4\u4EF6\u540D\u79F0",prop:"componentName"}),a(o,{label:"\u72B6\u6001",prop:"status",width:"80"},{default:e(l=>[a(q,{type:t(A).COMMON_STATUS,value:l.row.status},null,8,["type","value"])]),_:1}),a(o,{align:"center",label:"\u64CD\u4F5C"},{default:e(l=>[m((n(),p(s,{link:"",type:"primary",onClick:V=>C("update",l.row.id)},{default:e(()=>[u(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[y,["system:menu:update"]]]),m((n(),p(s,{link:"",type:"primary",onClick:V=>C("create",void 0,l.row.id)},{default:e(()=>[u(" \u65B0\u589E ")]),_:2},1032,["onClick"])),[[y,["system:menu:create"]]]),m((n(),p(s,{link:"",type:"danger",onClick:V=>(async G=>{try{await h.delConfirm(),await xa(G),h.success(F("common.delSuccess")),await d()}catch{}})(l.row.id)},{default:e(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[y,["system:menu:delete"]]])]),_:1})]),_:1},8,["data","default-expand-all"])),[[B,t(w)]]):ea("",!0)]),_:1}),a(Ra,{ref_key:"formRef",ref:M,onSuccess:d},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/system/menu/index.vue"]])});export{Na as __tla,D as default};