text: import{_ as e}from"./TableImg.c292f6c6.js";import{g as o}from"./BasicForm.8dd34761.js";import{u as t}from"./useTable.28113166.js";import{g as i,c as n,s as a,d}from"./module.data.1f04011f.js";import{h as r}from"./index.63ccfb82.js";import s from"./ModuleModal.ff22eba2.js";import l from"./PValueSettingModal.bcc2dd69.js";import{b as c}from"./index.0433a71f.js";import{y as u,Y as p,Z as m,B as f,F as b,v as h,a2 as g,a9 as j}from"./vendor.880b4c6c.js";/* empty css              *//* empty css              */import"./useForm.ba0f60da.js";/* empty css              *//* empty css              *//* empty css              */import"./uuid.2b29000c.js";import"./useWindowSizeFn.564cf32e.js";import"./onMountedOrActivated.8f899bfb.js";/* empty css              */import"./useSortable.7fdc4a8b.js";/* empty css              *//* empty css              *//* empty css              *//* empty css              */import"./index.b3d678de.js";/* empty css              *//* empty css              *//* empty css              */import"./download.41df5c96.js";import"./base64Conver.bb012c73.js";import"./index.c6f733ce.js";import"./appPrivilegeValue.d3e6bcb6.js";const{createMessage:x}=r();var M=u({name:"Module",components:{BasicTable:e,TableAction:o,ModuleModal:s,PValueSettingModal:l},setup(){const[e,{openModal:o,setModalProps:r}]=c(),[s,{openModal:l}]=c(),[u,{reload:m,expandAll:f}]=t({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 p((()=>{setTimeout((()=>{f()}),1e3)})),{registerTable:u,registerModal:e,registerPValueModal:s,handleCreate:function(e){r({title:"新增菜单"}),o(!0,{record:e,isUpdate:!1})},handleEdit:function(e,t){t.stopPropagation(),r({title:"修改菜单"}),o(!0,{record:e,isUpdate:!0})},handleEditPValue:function(e,o){o.stopPropagation(),l(!0,{record:e,isUpdate:!0})},handleCreateChild:function(e,t){t.stopPropagation(),r({title:"新增【"+e.name+"】的子菜单"}),e={pid:e.id},o(!0,{record:e,isUpdate:!0})},handleDelete:function(e){e.children&&e.children.length>0?x.warning("有子节点，不能删除！"):d([e.id]).then((()=>{m()}))},handleSuccess:function(){return e=this,o=null,t=function*(){yield m(),setTimeout((()=>{f()}),100)},new Promise(((i,n)=>{var a=e=>{try{r(t.next(e))}catch(o){n(o)}},d=e=>{try{r(t.throw(e))}catch(o){n(o)}},r=e=>e.done?i(e.value):Promise.resolve(e.value).then(a,d);r((t=t.apply(e,o)).next())}));var e,o,t}}}});const C=j(" 新增 ");M.render=function(e,o,t,i,n,a){const d=m("a-button"),r=m("Authority"),s=m("TableAction"),l=m("BasicTable"),c=m("ModuleModal"),u=m("PValueSettingModal");return f(),b("div",null,[h(l,{onRegister:e.registerTable},{toolbar:g((()=>[h(r,{value:"Module:0"},{default:g((()=>[h(d,{type:"primary",onClick:e.handleCreate},{default:g((()=>[C])),_:1},8,["onClick"])])),_:1})])),action:g((({record:o})=>[h(s,{actions:[{auth:"Module:0",tooltip:"添加子菜单",icon:"ant-design:plus-outlined",onClick:e.handleCreateChild.bind(null,o)},{auth:"Module:6",tooltip:"设置权限值",icon:"ant-design:setting-outlined",onClick:e.handleEditPValue.bind(null,o)},{auth:"Module:2",tooltip:"修改",icon:"clarity:note-edit-line",onClick:e.handleEdit.bind(null,o)},{auth:"Module:3",tooltip:"删除",icon:"ant-design:delete-outlined",color:"error",onClick:e=>{e.stopPropagation()},popConfirm:{title:"是否确认删除",confirm:e.handleDelete.bind(null,o)}}]},null,8,["actions"])])),_:1},8,["onRegister"]),h(c,{onRegister:e.registerModal,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"]),h(u,{onRegister:e.registerPValueModal,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])])};export default M;
  