import{a as N}from"./index-2a45336b.js";import{u as D}from"./useForm-269e95cd.js";import{u as F}from"./usePagination-7442a465.js";import j from"./Menu-e2c0dba4.js";import{a as z,g as y,b as u,o as A,c as E,w as t,e,u as n,U as x,E as H}from"./ant-design-vue-710243d9.js";import"./tinymce-3184e0f1.js";import"./echarts-ca5d9323.js";import"./cropper-47c8e461.js";import"./lodash-es-7cb071db.js";import"./qrcode-bec2257a.js";import"./jschardet-bd496279.js";const X=Object.assign({name:"systemNewMenu"},{__name:"index",setup(O){const U=N(),{searchFormData:i}=F(),{formData:o}=D(),w=z({}),_=y(()=>({height:U.mainHeight})),v=y(()=>({height:"calc(100% - 56px)",padding:0}));function g(m){w.value=m}return(m,l)=>{const r=u("a-col"),d=u("a-input"),s=u("a-form-item"),k=u("a-tree-select"),S=u("a-radio-group"),V=u("a-switch"),C=u("a-button"),B=u("a-form"),f=u("x-scrollbar"),c=u("a-card"),b=u("a-table-column"),L=u("x-form-table"),M=u("a-row");return A(),E(M,{gutter:8,wrap:!1},{default:t(()=>[e(r,{flex:"0 0 280px"},{default:t(()=>[e(j,{value:n(i).menu,"onUpdate:value":l[0]||(l[0]=a=>n(i).menu=a),onChange:g},null,8,["value"])]),_:1}),e(r,{flex:"1.2"},{default:t(()=>[e(c,{title:"菜单信息",style:x(_.value),"body-style":v.value},{default:t(()=>[e(f,{class:"pa-8-2"},{default:t(()=>[e(B,{"label-col":{style:{width:"100px"}},model:n(o)},{default:t(()=>[e(s,{label:"名称",name:"name"},{default:t(()=>[e(d,{value:n(o).name,"onUpdate:value":l[1]||(l[1]=a=>n(o).name=a)},null,8,["value"])]),_:1}),e(s,{label:"所属上级"},{default:t(()=>[e(k,{value:n(o).parent_id,"onUpdate:value":l[2]||(l[2]=a=>n(o).parent_id=a),"field-names":{children:"children",label:"name",key:"key",value:"key"},"tree-data":m.menuList,"tree-default-expand-all":""},null,8,["value","tree-data"])]),_:1}),e(s,{label:"类型",name:"type"},{default:t(()=>[e(S,{value:n(o).type,"onUpdate:value":l[3]||(l[3]=a=>n(o).type=a),options:[{label:"菜单",value:1},{label:"iframe",value:2},{label:"外链",value:3}]},null,8,["value"])]),_:1}),e(s,{extra:"系统唯一且与内置组件名一致，否则导致缓存失效",label:"别名",name:"alias"},{default:t(()=>[e(d,{value:n(o).alias,"onUpdate:value":l[4]||(l[4]=a=>n(o).alias=a)},null,8,["value"])]),_:1}),e(s,{label:"图标",name:"icon"},{default:t(()=>[e(d,{value:n(o).icon,"onUpdate:value":l[5]||(l[5]=a=>n(o).icon=a)},null,8,["value"])]),_:1}),e(s,{label:"路由地址",name:"path"},{default:t(()=>[e(d,{value:n(o).path,"onUpdate:value":l[6]||(l[6]=a=>n(o).path=a)},null,8,["value"])]),_:1}),e(s,{label:"重定向",name:"redirect"},{default:t(()=>[e(d,{value:n(o).redirect,"onUpdate:value":l[7]||(l[7]=a=>n(o).redirect=a)},null,8,["value"])]),_:1}),e(s,{label:"视图地址",name:"view"},{default:t(()=>[e(d,{value:n(o).view,"onUpdate:value":l[8]||(l[8]=a=>n(o).view=a)},null,8,["value"])]),_:1}),e(s,{extra:"子节点或详情页需要高亮的上级菜单别名",label:"菜单高亮",name:"active"},{default:t(()=>[e(d,{value:n(o).active,"onUpdate:value":l[9]||(l[9]=a=>n(o).active=a)},null,8,["value"])]),_:1}),e(s,{extra:"不显示在导航中，但依然可以访问，例如详情页",label:"隐藏",name:"is_menu"},{default:t(()=>[e(V,{checked:n(o).is_menu,"onUpdate:checked":l[10]||(l[10]=a=>n(o).is_menu=a)},null,8,["checked"])]),_:1}),e(s,{label:" ",colon:!1},{default:t(()=>[e(C,{type:"primary"},{default:t(()=>[H(" 保存 ")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["style","body-style"])]),_:1}),e(r,{flex:"1"},{default:t(()=>[e(c,{title:"权限按钮",style:x(_.value),"body-style":v.value},{default:t(()=>[e(f,{class:"pa-8-2"},{default:t(()=>[e(L,{modelValue:m.authList,"onUpdate:modelValue":l[11]||(l[11]=a=>m.authList=a),"row-tpl":{name:"",alias:""},bordered:""},{default:t(()=>[e(b,{"data-index":"name",title:"名称"},{default:t(({record:a})=>[e(d,{value:a.name,"onUpdate:value":p=>a.name=p},null,8,["value","onUpdate:value"])]),_:1}),e(b,{"data-index":"alias",title:"标识"},{default:t(({record:a})=>[e(d,{value:a.alias,"onUpdate:value":p=>a.alias=p},null,8,["value","onUpdate:value"])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["style","body-style"])]),_:1})]),_:1})}}});export{X as default};
