import { defHttp } from '@/utils/http/axios';
enum Api{
    getLeftTree = '/api/SysDataItemDetail/Load',
    addLeftItem = '/api/SysDataItemDetail/Add',
    delLeftItem = '/api/SysDataItemDetail/Delete',
    editLeftItem = '/api/SysDataItemDetail/Update',
    LoadPage = '/api/DroneCloudQueryContent/LoadPage',
    Get = '/api/DroneCloudQueryContent/Get',
    Add = '/api/DroneCloudQueryContent/Add',
    Update = '/api/DroneCloudQueryContent/Update',
    Delete = '/api/DroneCloudQueryContent/Delete',
}

// 分类
export function getLeftTree(params) {
    return defHttp.get({ url: Api.getLeftTree, params });
}

export function addLeftItem(params){
    return defHttp.post({ url: Api.addLeftItem + '?code=' + params.itemCode, params });
}

export function delLeftItem(params){
    return defHttp.post({ url: Api.delLeftItem + '?id=' + params.id });
}

// 云查询管理
export function LoadPage(params) {
    return defHttp.get({ url: Api.LoadPage, params });
}
export function Get(params) {
    return defHttp.get({ url: Api.Get, params });
}
export function Add(params) {
    return defHttp.post({ url: Api.Add, params });
}
export function Update(params) {
    return defHttp.post({ url: Api.Update, params });
}
export function Delete(params) {
    return defHttp.post({ url: Api.Delete + '?id=' + params.id , params });
}