import request from '@/utils/request';


/**
 * 查询用户列表
 * */
export function getUser(data: any) {
  return request({
    url: '/api/user/getUser',
    method: 'post',
    data: data,
  });
}


/**
* 用户新增
* */
export function addUser(data: any) {
  return request({
    url: '/api/user/addUser',
    method: 'post',
    data: data,
  });
}
/**
 * 用户编辑
 * */
export function updateUser(data: any) {
  return request({
    url: '/api/user/editUser',
    method: 'post',
    data: data,
  });
}
/**
 * 用户删除
 * */
export function deleteUser(data: any) {
  return request({
    url: '/api/user/deleteUser',
    method: 'post',
    data: data,
  });
}

/**
 * 用户关联的角色
 * */
export function getUserRoleList(data: any) {
  return request({
    url: '/user/role/list',
    method: 'post',
    data: data,
  });
}

/**
 * 保存用户关联的角色
 */
export function updateUserRole(data: any) {
  return request({
    url: '/api/user/saveUserRole',
    method: 'post',
    data: data,
  });
}
