import request from '@/utils/request';
//获取表格数据
export function getdata(params: any) {
    return request({
        url: '/patroltasks/task/getTaskList',
        method: 'get',
        params: params
    });
}
//新增巡视任务
export function addTask(params: any) {
    return request({
        url: '/patroltasks/task/addTask',
        method: 'post',
        data: params
    });
}
//修改巡视任务
export function editTask(params: any) {
    return request({
        url: '/patroltasks/task/updateTask',
        method: 'post',
        data: params
    });
}
//修改状态
export function changeSwitch(params: any) {
    return request({
        url: '/patroltasks/task/setTaskStatus',
        method: 'post',
        params: params
    });
}
//删除巡视任务
export function delTask(params: any) {
    return request({
        url: '/patroltasks/task/deleteTaskById',
        method: 'post',
        params: params
    });
}
//获取变电站下拉列表
export function getelect(params: any) {
    return request({
        url: '/basedata/substation/getSubstationList',
        method: 'get',
        params: params
    });
}

////获取变电站间隔树
export function getBayTree(params: any) {
    return request({
        url: '/basedata/substation/getSubstationTree',
        method: 'get',
        params: params
    });
}
////获取变电站区域间隔导航树
export function getSubstationNaviTree(params: any) {
    return request({
        url: '/basedata/substation/getSubstationNaviTree',
        method: 'get',
        params: params
    });
}



//获取主设备类型
export function getmaintype() {
    return request({
        url: '/basedata/substation-maindevice/getDeviceType',
        method: 'get',
    });
}
//获取关联主设备表格数据
export function getmaindata(params:any) {
    return request({
        url: '/basedata/substation-maindevice/getMainDevice',
        method: 'get',
        params:params
    });
}

//查询巡视任务
export function QueryTour(params:any) {
    return request({
        url: '/patroltasks/task/getBindInfoById',
        method: 'get',
        params:params
    });
}
//复核巡视任务
export function checkTask(params:any) {
    return request({
        url: '/patroltasks/task/checkTask',
        method: 'post',
        params:params
    });
}
//巡视任务上报
export function PatrolTask(params:any) {
    return request({
        url: '/patroltasks/task/reportTaskById',
        method: 'post',
        params:params
    });
}
//获取机器人，无人机
export function getRobotAndUavList() {
    return request({
        url: '/basedata/substation-patroldevice/getRobotAndUavList',
        method: 'get',
    });
}