import createAxios from '@/utils/request'

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

const MAPPING_PATH = SUPERVISION_BOOT + '/userReport'

/**
 * 查询流程表单数据
 */
export const getUserReport = (data: any) => {
    return createAxios({
        url: MAPPING_PATH + '/getUserReport',
        method: 'POST',
        data: data
    })
}


/**
 * 根据id获取用户档案录入的详细数据
 */
export const getUserReportById = (id: any) => {
    return createAxios({
        url: MAPPING_PATH + '/getById?id='+id,
        method: 'GET'
    })
}

/**
 * 根据id获取用户档案录入的详细数据
 */
export const getUserReportUpdateById = (id: any) => {
    return createAxios({
        url: '/supervision-boot/userReportRenewal/getUserReportUpdateById?businessId='+id,
        method: 'POST',

    })
}

/**
 * 下载敏感及重要用户模板
 */
export const downloadSensitiveUserTemplate = () => {
    return createAxios({
        url: MAPPING_PATH + '/downloadSensitiveUserTemplate',
        method: 'GET',
        responseType: 'blob'
    })
}
/**
 * 下载敏感及重要用户模板
 */
export const downloadDevTemplate = () => {
    return createAxios({
        url: SUPERVISION_BOOT + '/deVReport/downloadDevTemplate',
        method: 'GET',
        responseType: 'blob'
    })
}
/**
 * 下载干扰源用户台账模板
 */
export const downloadSensitiveReportTemplate = () => {
    return createAxios({
        url: MAPPING_PATH + '/downloadSensitiveReportTemplate',
        method: 'GET',
        responseType: 'blob'
    })
}
/**
 * 下载技术监督模版
 */
export const downloadPlanTemplate = () => {
    return createAxios({
        url: '/supervision-boot/surveyPlan/downloadPlanTemplate',
        method: 'GET',
        responseType: 'blob'
    })
}

/**
 * 导入敏感及重要用户数据
 */
export const importSensitiveUserData = (data: any) => {
    return createAxios({
        url: MAPPING_PATH + '/importSensitiveUserData',
        method: 'POST',
        data: data,
        responseType: 'blob'
    })
}
/**
 * 批量导入干扰源用户
 */
export const importSensitiveReportData = (data: any) => {
    return createAxios({
        url: MAPPING_PATH + '/importSensitiveReportData',
        method: 'POST',
        data: data,
        responseType: 'blob'
    })
}
/**
 * 批量导入技术监督数据
 */
export const importPlanData = (data: any) => {
    return createAxios({
        url: '/supervision-boot/surveyPlan/importPlanData',
        method: 'POST',
        data: data,
        responseType: 'blob'
    })
}

/**
 * 批量导入终端台账入网
 */
export const deVReportImportSensitive = (data: any) => {
    return createAxios({
        url: SUPERVISION_BOOT + '/deVReport/importSensitiveUserData',
        method: 'POST',
        data: data,
        responseType: 'blob'
    })
}



