text: import{_ as e}from"./TableImg.ed458e7b.js";import{f as t}from"./BasicForm.60d248ec.js";import{u as o}from"./useTable.4d31d66c.js";import{g as i,c as n,s as a,d}from"./module.data.f5189516.js";import{h as r}from"./index.91fd9f50.js";import s from"./ModuleModal.266a4b11.js";import l from"./PValueSettingModal.b95141fe.js";import{b as c}from"./index.ae3ca81c.js";import{j as u,J as m,K as p,o as f,m as h,n as b,Q as j,Y as g}from"./vendor.686fd1d4.js";/* empty css              *//* empty css              */import"./useForm.cb0c17a2.js";/* empty css              *//* empty css              *//* empty css              */import"./uuid.2b29000c.js";import"./useWindowSizeFn.d82e06bf.js";import"./onMountedOrActivated.172ad1ec.js";/* empty css              */import"./useSortable.a91eed20.js";/* empty css              *//* empty css              *//* empty css              *//* empty css              */import"./index.262ea813.js";/* empty css              *//* empty css              *//* empty css              */import"./download.7e240992.js";import"./base64Conver.bb012c73.js";import"./index.11164cc8.js";import"./appPrivilegeValue.755c8810.js";const{createMessage:x}=r();var M=u({name:"Module",components:{BasicTable:e,TableAction:t,ModuleModal:s,PValueSettingModal:l},setup(){const[e,{openModal:t,setModalProps:r}]=c(),[s,{openModal:l}]=c(),[u,{reload:p,expandAll:f}]=o({title:"列表",api:i,columns:n,isTreeTable:!0,formConfig:{labelWidth:120,schemas:a,showAdvancedButton:!1,showResetButton:!1,autoSubmitOnEnter:!0},expandRowByClick:!0,canColDrag:!0,useSearchForm:!0,pagination:!1,bordered:!0,showIndexColumn:!1,actionColumn:{width:170,title:"操作",dataIndex:"action",slots:{customRender:"action"}}});return m((()=>{setTimeout((()=>{f()}),1e3)})),{registerTable:u,registerModal:e,registerPValueModal:s,handleCreate:function(e){r({title:"新增菜单"}),t(!0,{record:e,isUpdate:!1})},handleEdit:function(e,o){o.stopPropagation(),r({title:"修改菜单"}),t(!0,{record:e,isUpdate:!0})},handleEditPValue:function(e,t){t.stopPropagation(),l(!0,{record:e,isUpdate:!0})},handleCreateChild:function(e,o){o.stopPropagation(),r({title:"新增【"+e.name+"】的子菜单"}),e={pid:e.id},t(!0,{record:e,isUpdate:!0})},handleDelete:function(e){e.children&&e.children.length>0?x.warning("有子节点，不能删除！"):d([e.id]).then((()=>{p()}))},handleSuccess:function(){return e=this,t=null,o=function*(){yield p(),setTimeout((()=>{f()}),100)},new Promise(((i,n)=>{var a=e=>{try{r(o.next(e))}catch(t){n(t)}},d=e=>{try{r(o.throw(e))}catch(t){n(t)}},r=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,d);r((o=o.apply(e,t)).next())}));var e,t,o}}}});const C=g(" 新增 ");M.render=function(e,t,o,i,n,a){const d=p("a-button"),r=p("Authority"),s=p("TableAction"),l=p("BasicTable"),c=p("ModuleModal"),u=p("PValueSettingModal");return f(),h("div",null,[b(l,{onRegister:e.registerTable},{toolbar:j((()=>[b(r,{value:"Module:0"},{default:j((()=>[b(d,{type:"primary",onClick:e.handleCreate},{default:j((()=>[C])),_:1},8,["onClick"])])),_:1})])),action:j((({record:t})=>[b(s,{actions:[{auth:"Module:0",title:"添加子节点",icon:"ant-design:plus-outlined",onClick:e.handleCreateChild.bind(null,t)},{auth:"Module:6",title:"设置权限值",icon:"ant-design:setting-outlined",onClick:e.handleEditPValue.bind(null,t)},{auth:"Module:2",title:"修改",icon:"clarity:note-edit-line",onClick:e.handleEdit.bind(null,t)},{auth:"Module:3",title:"删除",icon:"ant-design:delete-outlined",color:"error",onClick:e=>{e.stopPropagation()},popConfirm:{title:"是否确认删除",confirm:e.handleDelete.bind(null,t)}}]},null,8,["actions"])])),_:1},8,["onRegister"]),b(c,{onRegister:e.registerModal,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"]),b(u,{onRegister:e.registerPValueModal,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])])};export default M;
  