import createAxios from '@/utils/request'

// 获取参数指标
export function getIndex() {
    return createAxios({
        // url: '/harmonic-boot/customReport/reportChooseTree',
        url: '/cs-harmonic-boot/customReport/reportChooseTree',
        method: 'get'
    })
}
//、查询数据激活报表模板
export function updateTemplateActive(data) {
    return createAxios({
        url: '/cs-harmonic-boot/customReport/updateTemplateActive',
        method: 'post',
        data
    })
}

//获取报表模板 //部门树查询
export function getTemplateList(data:any) {
    return createAxios({
        // url: '/harmonic-boot/customReport/getTemplateList',
        url: '/cs-harmonic-boot/customReport/getTemplateList',
        // url:'/api3/harmonic-boot/customReport/getTemplateList',
        method: 'post',
        data
    })
}
//删除报表模板
export function delTemplate(data:any) {
    return createAxios({
        url: '/cs-harmonic-boot/customReport/delTemplate',
        method: 'post',
        data
    })
}

//修改获取数据
export function getCustomReportTemplateById(params) {
    return createAxios({
        url: '/cs-harmonic-boot/customReport/getCustomReportTemplateById',
        method: 'get',
        params
    })
}

//修改获取数据
export function viewCustomReportTemplateById(params) {
    return createAxios({
        url: '/cs-harmonic-boot/customReport/viewCustomReportTemplateById',
        method: 'get',
        params
    })
}
//修改模板
export function dateTemplateup(data) {
    return createAxios({
        url: '/cs-harmonic-boot/customReport/updateTemplate',
        method: 'POST',
        data
    })
}

//新增报表模板
export function addTemplate(data:any) {
    return createAxios({
        // url: '/harmonic-boot/customReport/addTemplate',
         url: '/cs-harmonic-boot/customReport/addTemplate',
        method: 'post',
        data: data
    })
}
//模板对应指标替换
export function getCustomReport(data: any) {
    return createAxios({
        url: '/cs-harmonic-boot/customReport/getCustomReport',
        method: 'POST',
        data
    })
}
//绑定模板
export function updateBindTemplate(data) {
    return createAxios({
        url: '/cs-harmonic-boot/customReport/updateBindTemplate',
        method: 'post',
        data
    })
}
//根据模板ID查询数据
export function getDataByTempId(params) {
    return createAxios({
        url: '/cs-harmonic-boot/customReport/getDataByTempId',
        method: 'get',
        params
    })
}
//根据部门查询模板
export function getTemplateByDept(params) {
    return createAxios({
        url: '/cs-harmonic-boot/customReport/getTemplateByDept',
        method: 'get',
        params
    })
}
// 获取模版
export function querySysExcel(params) {
    return createAxios({
        url: '/cs-harmonic-boot/sysExcel/querySysExcel',
        method: 'post',
        params
    })
}
//资源管理 查询数据
export function queryData(data) {
    return createAxios({
        url: '/system-boot/resourceAdministration/queryData',
        method: 'post',
        data
    })
}
//资源管理 查询数据
export function uploadFile(data) {
    return createAxios({
        url: '/system-boot/resourceAdministration/uploadFile',
        method: 'post',
        data
    })
}
//资源管理 删除资源
export function deleteFile(params) {
    return createAxios({
        url: '/system-boot/resourceAdministration/deleteFile',
        method: 'get',
        params
    })
}
//资源管理 下载资源
export function downloadFile(params) {
    return createAxios({
        url: '/system-boot/resourceAdministration/downloadFile',
        method: 'get',
        params,
        responseType: 'blob'
    })
}
//资源管理 修改资源
export function updateFile(data) {
    return createAxios({
        url: '/system-boot/resourceAdministration/updateFile',
        method: 'post',
        data
    })
}
//合格率报告
export function pageTable(data) {
    return createAxios({
        url: '/cs-harmonic-boot/qualifiedReport/pageTable',
        method: 'post',
        data
    })
}
//合格率报告
export function targetLimitChooseTree() {
    return createAxios({
        // url: '/harmonic-boot/customReport/targetLimitChooseTree',
         url: '/cs-harmonic-boot/customReport/targetLimitChooseTree',
        method: 'get'
    })
}
//监测点指标
export function terminalChooseTree() {
    return createAxios({
        // url: '/harmonic-boot/customReport/terminalChooseTree',
         url: '/cs-harmonic-boot/customReport/terminalChooseTree',
        method: 'get'
    })
}
//新增模版
export function addSysExcel(data:any) {
    return createAxios({
         url: '/cs-harmonic-boot/sysExcel/addSysExcel',
        method: 'post',
        data
    })
}
//修改模版
export function updateSysExcel(data:any) {
    return createAxios({
         url: '/cs-harmonic-boot/sysExcel/updateSysExcel',
        method: 'post',
        data
    })
}
//删除模版
export function deleteSysExcel(params:any) {
    return createAxios({
         url: '/cs-harmonic-boot/sysExcel/deleteSysExcel',
        method: 'post',
        params
    })
}
//查詢綁定
export function queryList(params:any) {
    return createAxios({
         url: '/cs-harmonic-boot/sysExcelRelation/queryList',
        method: 'post',
        params
    })
}
//綁定
export function bandRelation(data:any) {
    return createAxios({
         url: '/cs-harmonic-boot/sysExcelRelation/bandRelation',
        method: 'post',
        data
    })
}
