import request from '@/utils/request'

// 查询检测计划列表
export function listDetection(query) {
    return request({
        url: '/system/detection/list',
        method: 'get',
        params: query
    })
}

// 查询检测计划详细
export function getDetection(id) {
    return request({
        url: '/system/detection/' + id,
        method: 'get'
    })
}

// 新增检测计划
export function addDetection(data) {
    return request({
        url: '/system/detection',
        method: 'post',
        data: data
    })
}

// 修改检测计划
export function updateDetection(data) {
    return request({
        url: '/system/detection',
        method: 'put',
        data: data
    })
}

// 删除检测计划
export function delDetection(id) {
    return request({
        url: '/system/detection/' + id,
        method: 'delete'
    })
}

// 派发检测计划
export function distributedDetection(data) {
    return request({
        url: "/system/detection/distributed",
        method: "post",
        data: data,
    });
}

// 反馈检测计划
export function feedbackDetection(data) {
    return request({
        url: "/system/detection/feedback",
        method: "post",
        data: data,
    });
}

// 成果上传检测计划
export function completeDetection(data) {
    return request({
        url: "/system/detection/complete",
        method: "post",
        data: data,
    });
}