import createAxios from '@/utils/request'

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

const MAPPING_PATH = SUPERVISION_BOOT + '/warningLeaflet'


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

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

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

/**
 * 根据id获取预告警单的详细数据
 */
export const getById = (id: string) => {
    return createAxios({
        url: MAPPING_PATH + '/getById?id=' + id,
        method: 'GET'
    })
}

