/*
 * @Author: wt 1241351815@qq.com
 * @Date: 2022-04-25 10:21:18
 * @LastEditors: wt 1241351815@qq.com
 * @LastEditTime: 2022-05-11 10:49:38
 * @FilePath: \securityHtml\src\api\system\user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/yongtian";



export function userList(params) { //用户查询
    return request({
        url: '/sys/user/list',
        method: 'post',
        params
    })
}

// 查询用户详细
export function getOne(userId) {
    return request({
        url: '/sys/user/' + praseStrEmpty(userId),
        method: 'get'
    })
}




export function userEdit(data) { //修改用户
    return request({
        url: '/sys/user/edit',
        method: 'put',
        data
    })
}

export function resetPwd(params) { //密码重置
    return request({
        url: '/sys/user/resetPwd',
        method: 'post',
        params
    })
}

export function userAdd(data) { //系统-用户添加
    return request({
        url: '/sys/user/addUser',
        method: 'post',
        data
    })
}

export function userRemove(id) { //系统-用户删除
    return request({
        url: '/sys/user/' + id,
        method: 'delete',
    })
}




export function listDept(params) { //部门查询=>全部
    return request({
        url: '/system/dept/treeselect',
        method: 'get',
        params: params
    })
}