import { get, uget, post, upost } from '@/http/index'
import { praseStrEmpty } from '@/utils/index'

// 获取用户列表
export const userList = async (query) => {
  return await post('/system/user/list', query)
}

export const getUnAuthRoleUser = async (query) => {
  return await get('/system/user/getUnAuthRoleUser', query)
}

// 新增用户
export const addUser = async (query) => {
  return await post('/system/user/add', query)
}

// 新增用户
export const deleteUser = async (query) => {
  return await uget('/system/user/delete/', query)
}

// 状态修改
export const changeStatus = async (query) => {
  return await post('/system/user/changeStatus', query)
}

// 获取部门树列表
export const deptTree = async (query) => {
  return await get('/system/user/deptTree', query)
}

// 修改用户
export const userUpdate = async (query) => {
  return await post('/system/user/update', query)
}

// 获取角色选择框列表
export const optionselect = async (query) => {
  return await get('/system/role/optionselect', query)
}

// 用户授权角色
export const authRole = async (query) => {
  return await post('/system/user/authRole', query)
}
