import request from "@/utils/request";
import {parseStrEmpty} from "@/utils/yanfan";

// 查询用户列表
export function listUser(query) {
    return request({
        url: "/energyBuild/list",
        method: "get",
        params: query,
    });
}

// 查询用户详细
export function getUser(userId) {
    return request({
        url: "/system/user/" + parseStrEmpty(userId),
        method: "get",
    });
}

// 新增用户
export function addData(data) {
    return request({
        url: "/energyBuild/add",
        method: "post",
        data: data,
    });
}

// 修改用户
export function updateUser(data) {
    return request({
        url: "/energyBuild/update",
        method: "post",
        data: data,
    });
}

// 删除用户
export function delUser(query) {
    return request({
        url: "/energyBuild/delete",
        method: "get",
        params: query,
    });
}

// 查询部门下拉树结构
export function deptTreeSelect() {
    return request({
        url: "/energyBuild/deviceLocationDeptTree",
        // url: "/system/user/deptTree",
        method: "get",
    });
}

// 负责人
export function userList() {
    return request({
        url: "/system/user/list",
        method: "get",
    });
}

// 负责人
export function export1() {
    return request({
        url: "/energyBuild/export",
        method: "get",
    });
}
