import { get, post, parmasPost, put } from '@/http/index'

// 用户管理 -> 权限设置 -> 角色接口
export const prwersetuprole = async (params) => {
  return await get('/system/role/list', params)
}

// 用户管理 -> 权限设置 -> 根据用户查询角色接口
export const getRoleListByUserld = async (params) => {
  return await get(`/system/role/getRoleListByUserId/${params}`)
}

// 用户管理 -> 权限设置 -> 给用户绑定角色接口
export const AddUserRole = async (formData) => {
  return await post('/system/role/batchAddUserRole', formData)
}

// 用户管理 -> 权限设置 -> 给用户删除角色
export const DeleteUserRole = async (formData) => {
  return await post('/system/role/batchDeleteUserRole', formData)
}

//用户管理 -> 权限设置 ->  查找装备专业
export const querySelfEquipmentProfession = async () => {
  return await get('/system/equipmentProfession/querySelfEquipmentProfession')
}

//用户管理 -> 权限设置 ->  查找装备专业
export const querySelfEquipmentProfession1 = async () => {
  return await get('/system/equipmentProfession/querySelfEquipmentProfession1')
}

//用户管理 -> 权限设置 -> 根据用户查询装备专业
export const rolequeryEquipmentProfessionByUserId = async (userId) => {
  return await get('/system/equipmentProfession/queryEquipmentProfessionByUserId/' + userId)
}

//用户管理 -> 权限设置 -> 给装备专业绑定用户/给用户绑定装备专业
export const userbindingspecialty = async (formData) => {
  return await post('/system/equipmentProfession/batchAddEquipmentProfessionUser', formData)
}

//用户管理 -> 权限设置 -> 删除装备专业
export const userdeletespecialty = async (formData) => {
  return await post('/system/equipmentProfession/batchDeleteEquipmentProfessionUser', formData)
}

// 用户管理 -> 权限设置 -> 查询菜单
export const querymenu = async () => {
  return await get('/system/menu/AllList')
}

// 用户管理 -> 权限设置 -> 根据用户查询菜单
export const queryUserMenus = async (userId) => {
  return await get('/system/user/queryUserMenus/' + userId)
}

// 用户管理 -> 权限设置 -> 给用户绑定菜单
export const addUserMenus = async (formData) => {
  return await post('/system/user/addUserMenus', formData)
}
