import createAxios from '@/utils/request'

import { SUPERVISION_BOOT } from '@/utils/constantRequest'

const MAPPING_PATH = SUPERVISION_BOOT + '/surveyTest'


/**
 * 根据id获取普测计划的详细数据
 */
export const getTestById = (id: any) => {
    return createAxios({
        url: MAPPING_PATH + '/getById?id=' + id,
        method: 'GET'
    })
}

/**
 * 新增普测测试结果
 */
export const addSurveyTest = (data: any) => {
    return createAxios({
        url: MAPPING_PATH + '/add',
        method: 'POST',
        data: data
    })
}

/**
 * 重新发起填报普测测试结果
 */
export const updateSurveyTest = (data: any) => {
    return createAxios({
        url: MAPPING_PATH + '/update',
        method: 'POST',
        data: data
    })
}

/**
 * 针对有问题的现场测试发起告警单
 */
export const initiateWarningLeaflet = (data:any) => {
    return createAxios({
        url: MAPPING_PATH + '/initiateWarningLeaflet',
        method: 'POST',
        data
    })
}



