/*
 * @Author: your name
 * @Date: 2024-05-20 09:36:55
 * @LastEditTime: 2024-05-22 09:13:09
 * @LastEditors: bogon
 * @Description: In User Settings Edit
 * @FilePath: /performance-test/src/api/system.js
 */
import request from "@/utils/request";
//用户退出登录

export function userLogout(data) {
  return request({
    url: "/energy-manage-service/sysuserinfo/userLogout",
    method: "post",
    data,
  });
}
export function getUserTableList(data) {
  return request({
    url: "/energy-manage-service/sysuserinfo/getUserByName",
    method: "post",
    data,
  });
}
//用户启用
export function enableUser(data) {
  return request({
    url: "/energy-manage-service/sysuserinfo/enableUser",
    method: "post",
    data,
  });
}
//用户禁用
export function disableUser(data) {
  return request({
    url: "/energy-manage-service/sysuserinfo/disableUser",
    method: "post",
    data,
  });
}
//查看用户详情信息
export function getUserInfoByUserId(data) {
  return request({
    url: "/energy-manage-service/sysuserinfo/getUserById",
    method: "get",
    params: data,
  });
}
//修改用户密码
export function updatePWD(data) {
  return request({
    url: "/energy-manage-service/sysuserinfo/updatePWD",
    method: "post",
    data,
  });
}
//删除用户接口

export function deleteUserInfo(data) {
  return request({
    url: "/energy-manage-service/sysuserinfo/deleteUser",
    method: "post",
    data,
  });
}
//新增用户接口
export function addUser(data) {
  return request({
    url: "/energy-manage-service/sysuserinfo/addUser",
    method: "post",
    data,
  });
}
//编辑用户接口
export function editUser(data) {
  return request({
    url: "/energy-manage-service/sysuserinfo/updateUser",
    method: "post",
    data,
  });
}
//角色列表
///energy-manage-service/sysrole
export function getRoleTableList(data) {
  return request({
    url: "/energy-manage-service/sysrole/通过角色名称查询角色列表",
    method: "post",
    data,
  });
}
//删除角色

export function deleteRoleInfo(data) {
  return request({
    url: "/energy-manage-service/sysrole/deleteRole",
    method: "post",
    data,
  });
}
//新增角色接口
export function addRole(data) {
  return request({
    url: "/energy-manage-service/sysrole/addRole",
    method: "post",
    data,
  });
}
//编辑角色接口
export function editRole(data) {
  return request({
    url: "/energy-manage-service/sysrole/updateRole",
    method: "post",
    data,
  });
}
//查看角色详情信息
export function getRoleBId(data) {
  return request({
    url: "/energy-manage-service/sysrole/getRoleBId",
    method: "post",
    data,
  });
}
//更新角色状态

export function updateRoleAvailable(data) {
  return request({
    url: "/energy-manage-service/sysrole/updateRoleAvailable",
    method: "post",
    data,
  });
}

//通过角色获取权限
export function getDetailRoleAuth(data) {
  return request({
    url: "/energy-manage-service/sysrole/getRolePermission",
    method: "post",
    data,
  });
}
//更新角色菜单权限

export function updateRolePermission(data) {
  return request({
    url: "/energy-manage-service/sysrole/updateRolePermission",
    method: "post",
    data,
  });
}

//获取菜单列表
export function getAllMenu(data) {
  return request({
    url: "/energy-manage-service/syspermission/getAll",
    method: "post",
    data,
  });
}
//更新菜单权限
export function updateMenuFn(data) {
  return request({
    url: "/energy-manage-service/syspermission/update",
    method: "post",
    data,
  });
}
//删除菜单
export function deleteMenuFn(data) {
  return request({
    url: "/energy-manage-service/syspermission/delete",
    method: "post",
    data,
  });
}

//增加菜单
export function addMenuFn(data) {
  return request({
    url: "/energy-manage-service/syspermission/add",
    method: "post",
    data,
  });
}
