import{_ as P}from"./menu-tree.vue_vue_type_script_setup_true_lang.0f69e472.js";import{u as v,_ as F}from"./use-page-modal.88aec721.js";import{aJ as u,aK as S,aI as _,b as $,p as g,k as m,o as w,h as x,A as c,a as T,j as o,f as t}from"./index.4d3e3847.js";import{r as q}from"./column-helper.adef10ea.js";import{b as I}from"./btnList.6c44b4ef.js";import{P as N}from"./page-content.1fdb6363.js";import"./menuOperator.24540560.js";import"./basic-form.114da3ff.js";import"./validate.93ab4ac7.js";import"./basic-form.vue_vue_type_style_index_0_scoped_d6f0d2ed_lang.3165143d.js";import"./useAsync.24db85a6.js";import"./useNav.afbe69e0.js";import"./image.7849d972.js";import"./hooks.428ba1c3.js";import"./index.a5d44002.js";import"./responseHandle.db1518c7.js";import"./xlsx.ed122d16.js";const{VITE_PROXY_DOMAIN_REAL:i}=S();async function R(e){return u.request("post",`${i}admin/menuAction`,{data:e})}async function O(e){return u.request("post",`${i}admin/menuActionAdd`,{data:e})}async function L(e){return u.request("post",`${i}admin/menuActionSave`,{data:e})}async function M(e){return u.request("post",`${i}admin/menuActionStatus`,{data:e})}async function U(e){return u.request("post",`${i}admin/menuActionDel`,{data:e})}const V=[{type:"selection",width:55,hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{prop:"action_name",label:"\u6309\u94AE\u540D\u79F0"},{prop:"action_code",label:"\u6309\u94AE\u7F16\u7801"},{prop:"status",label:"\u72B6\u6001",width:"70px",...q(_)},{prop:"addtime",label:"\u521B\u5EFA\u65F6\u95F4"},{label:"\u64CD\u4F5C",fixed:"right",width:160,slot:"operation"}],j={title:"\u6309\u94AE\u7BA1\u7406",columns:V,apis:{httpAdd:O,httpList:R,httpUpdate:L,httpStatus:M,httpDelete:U}},J=j;function K(){return I.map(e=>({label:e.name,value:e.code}))}const W={title:"\u6309\u94AE",colLayout:{span:24},itemStyle:{},contact:"setBtn",labelWidth:"100px",formItems:[{field:"action_code",type:"select",label:"\u6309\u94AE\u540D\u79F0",placeholder:"\u6309\u94AE\u540D\u79F0",options:K(),rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u6309\u94AE\u6807\u8BC6"}]},{field:"status",type:"radio",label:"\u6309\u94AE\u72B6\u6001",options:_,rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u6309\u94AE\u72B6\u6001"}]}]},X=W,Y={class:"main seBtn"},de=$({__name:"index",setup(e){const r=g(null),p=g(""),C="setBtn",{pageModalRef:A,handleUpdateData:h,handleCreateData:B,handlePreviewData:E,handleConfrim:b,defaultInfo:y}=v({pageContentRef:r,confirmCallback:()=>({menuid:p.value})});function D(a){const{data:n}=a,{menu_type:s,id:l}=n;s+""=="2"&&(p.value=l,r.value.getPageData({menuid:l}))}function k(a){p.value=a,r.value.getPageData({menuid:a})}return(a,n)=>{const s=m("el-col"),l=m("el-row"),f=m("PageAuth");return w(),x(f,{pageName:C},{default:c(()=>[T("div",Y,[o(l,null,{default:c(()=>[o(s,{span:5},{default:c(()=>[o(P,{onTreeSelectChange:D,onInitTableData:k})]),_:1}),o(s,{span:19,style:{"padding-left":"18px",background:"transparent"}},{default:c(()=>[o(t(N),{ref_key:"pageContentRef",ref:r,"content-config":t(J),onCreateBtnClick:t(B),onPreviewBtnClick:n[0]||(n[0]=d=>t(E)(d)),onUpdateBtnClick:n[1]||(n[1]=d=>t(h)(d))},null,8,["content-config","onCreateBtnClick"])]),_:1})]),_:1}),o(t(F),{ref_key:"pageModalRef",ref:A,"modal-config":t(X),"default-info":t(y),onConfirmBtnClick:t(b)},null,8,["modal-config","default-info","onConfirmBtnClick"])])]),_:1})}}});export{de as default};
