import { request, uploads } from "@/utils/request";

// 设施类型查询接口
export function typeSelect(param) {
    return request({
        url: "/service-iot/baseFacilityType/typeSelect",
        method: "GET",
        data: param,
    });
}

// 设施类型新增接口
export function add(param) {
    return request({
        url: "/service-iot/baseGgpFacility/add",
        method: "POST",
        data: param,
    });
}

// 图片上传
export function uploadAvatar(data) {
    return uploads({
        url: "/service-file/upload",
        name: data.name,
        filePath: data.filePath,
    });
}

// 部门下拉数据请求
export function treeselect(param) {
    return request({
        url: "/system/dept/treeselect",
        method: "GET",
        data: param,
    });
}