import createAxios from '@/utils/request'

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

const MAPPING_PATH = SUPERVISION_BOOT + '/workflow/wfForm'

/**
 * 提交表单数据
 */
export const submitFormData = (data: any) => {
    return createAxios({
        url: '/supervision-boot/userReport/add',
        method: 'POST',
        data: data
    })
}
/**
 * 提交表单数据
 */
export const addEditor = (data: any) => {
    return createAxios({
        url: '/supervision-boot/userReportRenewal/addEditor',
        method: 'POST',
        data: data
    })
}

/**
 * 重新发起表单数据(编辑)
 */
export const updateFormData = (data: any) => {
    return createAxios({
        url: '/supervision-boot/userReport/update',
        method: 'POST',
        data: data
    })
}
/**
 * 重新发起表单数据(编辑)
 */
export const resend = (data: any) => {
    return createAxios({
        url: '/supervision-boot/userReportRenewal/resend',
        method: 'POST',
        data: data
    })
}

//取消干扰源审批
export const cancelFormData = (data: any) => {
    return createAxios({
        url: '/supervision-boot/userReport/cancel',
        method: 'POST',
        data
    })
}

export const submitGoNet = (data: any) => {
    return createAxios({
        url: '/supervision-boot/userReportNormal/addUserReportNormal',
        method: 'POST',
        data: data
    })
}

export const userReportGoNetById = (data: any) => {
    return createAxios({
        url: '/supervision-boot/userReportNormal/userReportGoNetById',
        method: 'get',
        params: data
    })
}
// 根据id获取用户档案录入的详细数据
export const getById = (data: any) => {
    return createAxios({
        url: '/supervision-boot/userReport/getById',
        method: 'get',
        params: data
    })
}
// 根据id获取用户档案录入的详细数据
export const cancel = (data: any) => {
    return createAxios({
        url: '/supervision-boot/userReportNormal/cancel',
        method: 'post',
        data
    })
}
