index-bcca5d23.js 5.2 KB

1
  1. import{d as L,dR as X,h as Q,r as i,e as W,q as Y,M as Z,o as n,c as g,f as a,w as e,a as t,N as $,F as A,v as aa,x as p,y as u,z as m,a0 as ea,aj as la,dS as N,R as ta,C as ra,A as sa,B as oa,j as na,G as ua,H as _a,I as ca,J as ia,K as pa,_ as ma,__tla as da}from"./index-8dc1e40a.js";import{_ as fa,__tla as ya}from"./DictTag-85aade2b.js";import{_ as ha,__tla as wa}from"./ContentWrap-0aca5216.js";import{a as va,D as q,__tla as ka}from"./dict-f13a3c8f.js";import{h as ba}from"./tree-0af4953a.js";import{b as xa,d as Ca,__tla as Sa}from"./index-e4c05952.js";import Ra,{__tla as Ua}from"./MenuForm-bce97951.js";import{u as Ma,__tla as Oa}from"./useMessage-7a27dd80.js";import"./color-6e929987.js";import{__tla as Va}from"./el-card-18df90f0.js";import{__tla as Ta}from"./Dialog-41802231.js";import{__tla as ga}from"./index-803dbf9a.js";import{__tla as Aa}from"./el-tree-select-d82790d8.js";import"./constants-a1da293a.js";let E,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 Oa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return Aa}catch{}})()]).then(async()=>{E=ma(L({name:"SystemMenu",__name:"index",setup(qa){const{wsCache:R}=X(),{t:F}=Q(),h=Ma(),w=i(!0),U=i([]),_=W({name:void 0,status:void 0}),M=i(),v=i(!1),k=i(!0),d=async()=>{w.value=!0;try{const f=await xa(_);U.value=ba(f)}finally{w.value=!1}},b=()=>{d()},H=()=>{M.value.resetFields(),b()},O=i(),x=(f,r,C)=>{O.value.open(f,r,C)},j=()=>{k.value=!1,v.value=!v.value,la(()=>{k.value=!0})},z=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 C=ta,S=ra,D=sa,J=oa,c=na,s=ua,K=_a,V=ha,o=ca,P=fa,B=ia,y=Z("hasPermi"),G=pa;return n(),g(A,null,[a(V,null,{default:e(()=>[a(K,{ref_key:"queryFormRef",ref:M,inline:!0,model:t(_),class:"-mb-15px","label-width":"68px"},{default:e(()=>[a(S,{label:"\u83DC\u5355\u540D\u79F0",prop:"name"},{default:e(()=>[a(C,{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(J,{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(A,null,aa(t(va)(t(q).COMMON_STATUS),l=>(n(),p(D,{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:H},{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=>x("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:j},{default:e(()=>[a(c,{class:"mr-5px",icon:"ep:sort"}),u(" \u5C55\u5F00/\u6298\u53E0 ")]),_:1}),a(s,{plain:"",onClick:z},{default:e(()=>[a(c,{class:"mr-5px",icon:"ep:refresh"}),u(" \u5237\u65B0\u83DC\u5355\u7F13\u5B58 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),a(V,null,{default:e(()=>[t(k)?m((n(),p(B,{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(P,{type:t(q).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:T=>x("update",l.row.id)},{default:e(()=>[u(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[y,["system:menu:update"]]]),m((n(),p(s,{link:"",type:"primary",onClick:T=>x("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:T=>(async I=>{try{await h.delConfirm(),await Ca(I),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"])),[[G,t(w)]]):ea("",!0)]),_:1}),a(Ra,{ref_key:"formRef",ref:O,onSuccess:d},null,512)],64)}}}),[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/system/menu/index.vue"]])});export{Na as __tla,E as default};