import request from '@/utils/request'
import {managerApi} from '@/utils/api'
export default {

  //应用列表
  getMenuTree: (data: any) => request.get(managerApi+'/menu/treeData', {
    params:data
  }),
  // 查询菜单按键详细
  getMenu: (data: any) => request.get(managerApi+'/menu/info',{
    params:data
  }),

  // 新增菜单按键
  addMenu: (data: any) => request.post(managerApi+'/menu/save' , data),

  // 修改菜单按键
  updateMenu: (data: any) => request.post(managerApi+'/menu/save', data),
  // 修改菜单是否启用
  updateMenushow: (data: any) => request.post(managerApi+'/menu/updateMenuShow', data),


  //切换菜单验证开关
  updateMenuVerification: (data: any) => request.post(managerApi+'/menu/updateMenuVerification', data),
  

  // 删除菜单按键
  delMenu: (data: any) => request.get(managerApi+'/menu/delete',{
    params:data
  }),

  //获取实体类可选字段
  getColumnList: (permission: any) => request.get(managerApi+'/menu/getColumnList',{
    params:{
      permission:permission
    }
  }),

  //获取实体类权限字段
  getPermissionParam: (permission: any) => request.get(managerApi+'/menu/getPermissionParam',{
    params:{
      permission:permission
    }
  }),
}
