import{M as Ce,r as _,aa as Ne,ae as Te,e as r,D as Z,o as d,c as q,F as N,K as Ie,h as t,f as l,w as e,k as xe,G as L,H as O,l as m,p as u,ab as Q,av as ee,m as c,z as M,n as y,aw as Se,v as Ue,ad as Fe}from"./index.82404a61.js";import{l as le,g as qe,u as Me,a as Re,d as Pe}from"./menu.5cb391aa.js";import{I as $e}from"./index.835a4fb3.js";import"./index.vue_vue_type_style_index_0_scoped_79fe850d_lang.831d5a3c.js";const De={class:"app-container"},Be={class:"dialog-footer"},Ee=Ce({name:"Menu"}),ze=Object.assign(Ee,{setup(Ae){const{proxy:f}=Ue(),{sys_show_hide:te,sys_normal_disable:R}=f.useDict("sys_show_hide","sys_normal_disable"),z=_([]),w=_(!1),P=_(!0),U=_(!0),$=_(""),D=_([]),B=_(!1),E=_(!0),T=_(!1),j=_(null),ae=Ne({form:{},queryParams:{menuName:void 0,visible:void 0},rules:{menuName:[{required:!0,message:"\u83DC\u5355\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],orderNum:[{required:!0,message:"\u83DC\u5355\u987A\u5E8F\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],path:[{required:!0,message:"\u8DEF\u7531\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}}),{queryParams:I,form:n,rules:ne}=Te(ae);function x(){P.value=!0,le(I.value).then(s=>{z.value=f.handleTree(s.data,"menuId"),P.value=!1})}function G(){D.value=[],le().then(s=>{const o={menuId:0,menuName:"\u4E3B\u7C7B\u76EE",children:[]};o.children=f.handleTree(s.data,"menuId"),D.value.push(o)})}function oe(){w.value=!1,A()}function A(){n.value={menuId:void 0,parentId:0,menuName:void 0,icon:void 0,menuType:"M",orderNum:void 0,isFrame:"1",isCache:"0",visible:"0",status:"0"},f.resetForm("menuRef")}function H(){j.value.reset(),T.value=!0}function ue(s){n.value.icon=s,T.value=!1}function de(s){var o=s.relatedTarget||s.srcElement||s.target||s.currentTarget,v=o.className;v!=="el-input__inner"&&(T.value=!1)}function K(){x()}function se(){f.resetForm("queryRef"),K()}function J(s){A(),G(),s!=null&&s.menuId?n.value.parentId=s.menuId:n.value.parentId=0,w.value=!0,$.value="\u6DFB\u52A0\u83DC\u5355"}function re(){E.value=!1,B.value=!B.value,Fe(()=>{E.value=!0})}async function me(s){A(),await G(),qe(s.menuId).then(o=>{n.value=o.data,w.value=!0,$.value="\u4FEE\u6539\u83DC\u5355"})}function pe(){f.$refs.menuRef.validate(s=>{s&&(n.value.menuId!=null?Me(n.value).then(o=>{f.$modal.msgSuccess("\u4FEE\u6539\u6210\u529F"),w.value=!1,x()}):Re(n.value).then(o=>{f.$modal.msgSuccess("\u65B0\u589E\u6210\u529F"),w.value=!1,x()}))})}function ie(s){f.$modal.confirm('\u662F\u5426\u786E\u8BA4\u5220\u9664\u540D\u79F0\u4E3A"'+s.menuName+'"\u7684\u6570\u636E\u9879?').then(function(){return Pe(s.menuId)}).then(()=>{x(),f.$modal.msgSuccess("\u5220\u9664\u6210\u529F")}).catch(()=>{})}return x(),(s,o)=>{const v=r("el-input"),p=r("el-form-item"),ce=r("el-option"),fe=r("el-select"),b=r("el-button"),W=r("el-form"),i=r("el-col"),_e=r("right-toolbar"),X=r("el-row"),h=r("el-table-column"),ye=r("dict-tag"),ve=r("el-table"),be=r("el-tree-select"),V=r("el-radio"),S=r("el-radio-group"),he=r("search"),g=r("el-icon"),Ve=r("el-popover"),ge=r("el-input-number"),k=r("question-filled"),C=r("el-tooltip"),we=r("el-dialog"),F=Z("hasPermi"),ke=Z("loading");return d(),q("div",De,[N(l(W,{model:t(I),ref:"queryRef",inline:!0},{default:e(()=>[l(p,{label:"\u83DC\u5355\u540D\u79F0",prop:"menuName"},{default:e(()=>[l(v,{modelValue:t(I).menuName,"onUpdate:modelValue":o[0]||(o[0]=a=>t(I).menuName=a),placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0",clearable:"",style:{width:"200px"},onKeyup:xe(K,["enter"])},null,8,["modelValue","onKeyup"])]),_:1}),l(p,{label:"\u72B6\u6001",prop:"status"},{default:e(()=>[l(fe,{modelValue:t(I).status,"onUpdate:modelValue":o[1]||(o[1]=a=>t(I).status=a),placeholder:"\u83DC\u5355\u72B6\u6001",clearable:"",style:{width:"200px"}},{default:e(()=>[(d(!0),q(L,null,O(t(R),a=>(d(),m(ce,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(p,null,{default:e(()=>[l(b,{type:"primary",icon:"Search",onClick:K},{default:e(()=>[u("\u641C\u7D22")]),_:1}),l(b,{icon:"Refresh",onClick:se},{default:e(()=>[u("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"]),[[Ie,t(U)]]),l(X,{gutter:10,class:"mb8"},{default:e(()=>[l(i,{span:1.5},{default:e(()=>[N((d(),m(b,{type:"primary",plain:"",icon:"Plus",onClick:J},{default:e(()=>[u("\u65B0\u589E")]),_:1})),[[F,["system:menu:add"]]])]),_:1},8,["span"]),l(i,{span:1.5},{default:e(()=>[l(b,{type:"info",plain:"",icon:"Sort",onClick:re},{default:e(()=>[u("\u5C55\u5F00/\u6298\u53E0")]),_:1})]),_:1},8,["span"]),l(_e,{showSearch:t(U),"onUpdate:showSearch":o[2]||(o[2]=a=>Q(U)?U.value=a:null),onQueryTable:x},null,8,["showSearch"])]),_:1}),t(E)?N((d(),m(ve,{key:0,data:t(z),"row-key":"menuId","default-expand-all":t(B),"tree-props":{children:"children",hasChildren:"hasChildren"}},{default:e(()=>[l(h,{prop:"menuName",label:"\u83DC\u5355\u540D\u79F0","show-overflow-tooltip":!0,width:"160"}),l(h,{prop:"icon",label:"\u56FE\u6807",align:"center",width:"100"},{default:e(a=>[l(t(ee),{"icon-class":a.row.icon},null,8,["icon-class"])]),_:1}),l(h,{prop:"orderNum",label:"\u6392\u5E8F",width:"60"}),l(h,{prop:"perms",label:"\u6743\u9650\u6807\u8BC6","show-overflow-tooltip":!0}),l(h,{prop:"component",label:"\u7EC4\u4EF6\u8DEF\u5F84","show-overflow-tooltip":!0}),l(h,{prop:"status",label:"\u72B6\u6001",width:"80"},{default:e(a=>[l(ye,{options:t(R),value:a.row.status},null,8,["options","value"])]),_:1}),l(h,{prop:"status",label:"\u662F\u5426\u7F13\u5B58",width:"80"},{default:e(a=>[c("span",null,M(a.row.isCache==1?"\u4E0D\u7F13\u5B58":"\u7F13\u5B58"),1)]),_:1}),l(h,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",width:"160",prop:"createTime"},{default:e(a=>[c("span",null,M(s.parseTime(a.row.createTime)),1)]),_:1}),l(h,{label:"\u64CD\u4F5C",align:"center",width:"210","class-name":"small-padding fixed-width"},{default:e(a=>[N((d(),m(b,{link:"",type:"primary",icon:"Edit",onClick:Y=>me(a.row)},{default:e(()=>[u("\u4FEE\u6539")]),_:2},1032,["onClick"])),[[F,["system:menu:edit"]]]),N((d(),m(b,{link:"",type:"primary",icon:"Plus",onClick:Y=>J(a.row)},{default:e(()=>[u("\u65B0\u589E")]),_:2},1032,["onClick"])),[[F,["system:menu:add"]]]),N((d(),m(b,{link:"",type:"primary",icon:"Delete",onClick:Y=>ie(a.row)},{default:e(()=>[u("\u5220\u9664")]),_:2},1032,["onClick"])),[[F,["system:menu:remove"]]])]),_:1})]),_:1},8,["data","default-expand-all"])),[[ke,t(P)]]):y("",!0),l(we,{title:t($),modelValue:t(w),"onUpdate:modelValue":o[17]||(o[17]=a=>Q(w)?w.value=a:null),width:"680px","append-to-body":""},{footer:e(()=>[c("div",Be,[l(b,{type:"primary",onClick:pe},{default:e(()=>[u("\u786E \u5B9A")]),_:1}),l(b,{onClick:oe},{default:e(()=>[u("\u53D6 \u6D88")]),_:1})])]),default:e(()=>[l(W,{ref:"menuRef",model:t(n),rules:t(ne),"label-width":"100px"},{default:e(()=>[l(X,null,{default:e(()=>[l(i,{span:24},{default:e(()=>[l(p,{label:"\u4E0A\u7EA7\u83DC\u5355"},{default:e(()=>[l(be,{modelValue:t(n).parentId,"onUpdate:modelValue":o[3]||(o[3]=a=>t(n).parentId=a),data:t(D),props:{value:"menuId",label:"menuName",children:"children"},"value-key":"menuId",placeholder:"\u9009\u62E9\u4E0A\u7EA7\u83DC\u5355","check-strictly":""},null,8,["modelValue","data"])]),_:1})]),_:1}),l(i,{span:24},{default:e(()=>[l(p,{label:"\u83DC\u5355\u7C7B\u578B",prop:"menuType"},{default:e(()=>[l(S,{modelValue:t(n).menuType,"onUpdate:modelValue":o[4]||(o[4]=a=>t(n).menuType=a)},{default:e(()=>[l(V,{label:"M"},{default:e(()=>[u("\u76EE\u5F55")]),_:1}),l(V,{label:"C"},{default:e(()=>[u("\u83DC\u5355")]),_:1}),l(V,{label:"F"},{default:e(()=>[u("\u6309\u94AE")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(n).menuType!="F"?(d(),m(i,{key:0,span:24},{default:e(()=>[l(p,{label:"\u83DC\u5355\u56FE\u6807",prop:"icon"},{default:e(()=>[l(Ve,{placement:"bottom-start",width:540,visible:t(T),"onUpdate:visible":o[6]||(o[6]=a=>Q(T)?T.value=a:null),trigger:"click",onShow:H},{reference:e(()=>[N((d(),m(v,{modelValue:t(n).icon,"onUpdate:modelValue":o[5]||(o[5]=a=>t(n).icon=a),placeholder:"\u70B9\u51FB\u9009\u62E9\u56FE\u6807",onBlur:H,readonly:""},{prefix:e(()=>[t(n).icon?(d(),m(t(ee),{key:0,"icon-class":t(n).icon,class:"el-input__icon",style:{height:"32px",width:"16px"}},null,8,["icon-class"])):(d(),m(g,{key:1,style:{height:"32px",width:"16px"}},{default:e(()=>[l(he)]),_:1}))]),_:1},8,["modelValue"])),[[t(Se),de]])]),default:e(()=>[l(t($e),{ref_key:"iconSelectRef",ref:j,onSelected:ue},null,512)]),_:1},8,["visible"])]),_:1})]),_:1})):y("",!0),l(i,{span:12},{default:e(()=>[l(p,{label:"\u83DC\u5355\u540D\u79F0",prop:"menuName"},{default:e(()=>[l(v,{modelValue:t(n).menuName,"onUpdate:modelValue":o[7]||(o[7]=a=>t(n).menuName=a),placeholder:"\u8BF7\u8F93\u5165\u83DC\u5355\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1}),l(i,{span:12},{default:e(()=>[l(p,{label:"\u663E\u793A\u6392\u5E8F",prop:"orderNum"},{default:e(()=>[l(ge,{modelValue:t(n).orderNum,"onUpdate:modelValue":o[8]||(o[8]=a=>t(n).orderNum=a),"controls-position":"right",min:0},null,8,["modelValue"])]),_:1})]),_:1}),t(n).menuType!="F"?(d(),m(i,{key:1,span:12},{default:e(()=>[l(p,null,{label:e(()=>[c("span",null,[l(C,{content:"\u9009\u62E9\u662F\u5916\u94FE\u5219\u8DEF\u7531\u5730\u5740\u9700\u8981\u4EE5`http(s)://`\u5F00\u5934",placement:"top"},{default:e(()=>[l(g,null,{default:e(()=>[l(k)]),_:1})]),_:1}),u("\u662F\u5426\u5916\u94FE ")])]),default:e(()=>[l(S,{modelValue:t(n).isFrame,"onUpdate:modelValue":o[9]||(o[9]=a=>t(n).isFrame=a)},{default:e(()=>[l(V,{label:"0"},{default:e(()=>[u("\u662F")]),_:1}),l(V,{label:"1"},{default:e(()=>[u("\u5426")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})):y("",!0),t(n).menuType!="F"?(d(),m(i,{key:2,span:12},{default:e(()=>[l(p,{prop:"path"},{label:e(()=>[c("span",null,[l(C,{content:"\u8BBF\u95EE\u7684\u8DEF\u7531\u5730\u5740\uFF0C\u5982\uFF1A`user`\uFF0C\u5982\u5916\u7F51\u5730\u5740\u9700\u5185\u94FE\u8BBF\u95EE\u5219\u4EE5`http(s)://`\u5F00\u5934",placement:"top"},{default:e(()=>[l(g,null,{default:e(()=>[l(k)]),_:1})]),_:1}),u(" \u8DEF\u7531\u5730\u5740 ")])]),default:e(()=>[l(v,{modelValue:t(n).path,"onUpdate:modelValue":o[10]||(o[10]=a=>t(n).path=a),placeholder:"\u8BF7\u8F93\u5165\u8DEF\u7531\u5730\u5740"},null,8,["modelValue"])]),_:1})]),_:1})):y("",!0),t(n).menuType=="C"?(d(),m(i,{key:3,span:12},{default:e(()=>[l(p,{prop:"component"},{label:e(()=>[c("span",null,[l(C,{content:"\u8BBF\u95EE\u7684\u7EC4\u4EF6\u8DEF\u5F84\uFF0C\u5982\uFF1A`system/user/index`\uFF0C\u9ED8\u8BA4\u5728`views`\u76EE\u5F55\u4E0B",placement:"top"},{default:e(()=>[l(g,null,{default:e(()=>[l(k)]),_:1})]),_:1}),u(" \u7EC4\u4EF6\u8DEF\u5F84 ")])]),default:e(()=>[l(v,{modelValue:t(n).component,"onUpdate:modelValue":o[11]||(o[11]=a=>t(n).component=a),placeholder:"\u8BF7\u8F93\u5165\u7EC4\u4EF6\u8DEF\u5F84"},null,8,["modelValue"])]),_:1})]),_:1})):y("",!0),t(n).menuType!="M"?(d(),m(i,{key:4,span:12},{default:e(()=>[l(p,null,{label:e(()=>[c("span",null,[l(C,{content:"\u63A7\u5236\u5668\u4E2D\u5B9A\u4E49\u7684\u6743\u9650\u5B57\u7B26\uFF0C\u5982\uFF1A@PreAuthorize(`@ss.hasPermi('system:user:list')`)",placement:"top"},{default:e(()=>[l(g,null,{default:e(()=>[l(k)]),_:1})]),_:1}),u(" \u6743\u9650\u5B57\u7B26 ")])]),default:e(()=>[l(v,{modelValue:t(n).perms,"onUpdate:modelValue":o[12]||(o[12]=a=>t(n).perms=a),placeholder:"\u8BF7\u8F93\u5165\u6743\u9650\u6807\u8BC6",maxlength:"100"},null,8,["modelValue"])]),_:1})]),_:1})):y("",!0),t(n).menuType=="C"?(d(),m(i,{key:5,span:12},{default:e(()=>[l(p,null,{label:e(()=>[c("span",null,[l(C,{content:'\u8BBF\u95EE\u8DEF\u7531\u7684\u9ED8\u8BA4\u4F20\u9012\u53C2\u6570\uFF0C\u5982\uFF1A`{"id": 1, "name": "ry"}`',placement:"top"},{default:e(()=>[l(g,null,{default:e(()=>[l(k)]),_:1})]),_:1}),u(" \u8DEF\u7531\u53C2\u6570 ")])]),default:e(()=>[l(v,{modelValue:t(n).query,"onUpdate:modelValue":o[13]||(o[13]=a=>t(n).query=a),placeholder:"\u8BF7\u8F93\u5165\u8DEF\u7531\u53C2\u6570",maxlength:"255"},null,8,["modelValue"])]),_:1})]),_:1})):y("",!0),t(n).menuType=="C"?(d(),m(i,{key:6,span:12},{default:e(()=>[l(p,null,{label:e(()=>[c("span",null,[l(C,{content:"\u9009\u62E9\u662F\u5219\u4F1A\u88AB`keep-alive`\u7F13\u5B58\uFF0C\u9700\u8981\u5339\u914D\u7EC4\u4EF6\u7684`name`\u548C\u5730\u5740\u4FDD\u6301\u4E00\u81F4",placement:"top"},{default:e(()=>[l(g,null,{default:e(()=>[l(k)]),_:1})]),_:1}),u(" \u662F\u5426\u7F13\u5B58 ")])]),default:e(()=>[l(S,{modelValue:t(n).isCache,"onUpdate:modelValue":o[14]||(o[14]=a=>t(n).isCache=a)},{default:e(()=>[l(V,{label:"0"},{default:e(()=>[u("\u7F13\u5B58")]),_:1}),l(V,{label:"1"},{default:e(()=>[u("\u4E0D\u7F13\u5B58")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})):y("",!0),t(n).menuType!="F"?(d(),m(i,{key:7,span:12},{default:e(()=>[l(p,null,{label:e(()=>[c("span",null,[l(C,{content:"\u9009\u62E9\u9690\u85CF\u5219\u8DEF\u7531\u5C06\u4E0D\u4F1A\u51FA\u73B0\u5728\u4FA7\u8FB9\u680F\uFF0C\u4F46\u4ECD\u7136\u53EF\u4EE5\u8BBF\u95EE",placement:"top"},{default:e(()=>[l(g,null,{default:e(()=>[l(k)]),_:1})]),_:1}),u(" \u663E\u793A\u72B6\u6001 ")])]),default:e(()=>[l(S,{modelValue:t(n).visible,"onUpdate:modelValue":o[15]||(o[15]=a=>t(n).visible=a)},{default:e(()=>[(d(!0),q(L,null,O(t(te),a=>(d(),m(V,{key:a.value,label:a.value},{default:e(()=>[u(M(a.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):y("",!0),t(n).menuType!="F"?(d(),m(i,{key:8,span:12},{default:e(()=>[l(p,null,{label:e(()=>[c("span",null,[l(C,{content:"\u9009\u62E9\u505C\u7528\u5219\u8DEF\u7531\u5C06\u4E0D\u4F1A\u51FA\u73B0\u5728\u4FA7\u8FB9\u680F\uFF0C\u4E5F\u4E0D\u80FD\u88AB\u8BBF\u95EE",placement:"top"},{default:e(()=>[l(g,null,{default:e(()=>[l(k)]),_:1})]),_:1}),u(" \u83DC\u5355\u72B6\u6001 ")])]),default:e(()=>[l(S,{modelValue:t(n).status,"onUpdate:modelValue":o[16]||(o[16]=a=>t(n).status=a)},{default:e(()=>[(d(!0),q(L,null,O(t(R),a=>(d(),m(V,{key:a.value,label:a.value},{default:e(()=>[u(M(a.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})):y("",!0)]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"])])}}});export{ze as default};