import axios from 'axios';
import config from '@api/config.js';

const urls = config.urls;
export default {
    exportDiagnosticAll(param){ //诊断依据--导出诊断依据
        // return axios.post(urls.exportDiagnosticAll, param)
        return axios({
            method:'post',
            url:urls.exportDiagnosticAll,
            data: param,
            contentType: "application/vnd.ms-excel" ,
            responseType: 'blob'//必须添加，否则会乱码
        })
    },
    exportDiagnosticBasis(data){ //诊断依据--导出诊断依据问题
        // return axios.post(urls.exportDiagnosticBasis, param,{
        //     contentType: "application/vnd.ms-excel" ,
        //     responseType: 'blob' //必须添加，否则会乱码
        // })
        return axios({
            method:'post',
            url:urls.exportDiagnosticBasis,
            data,
            contentType: "application/vnd.ms-excel" ,
            responseType: 'blob'//必须添加，否则会乱码
        })
    },
    
    importDiagnosticBasis(param){ //诊断依据--导入诊断依据数据
        return axios.post(urls.importDiagnosticBasis, param)
    },
    queryQuestionPage(param){ //诊断依据--问题词分页查询
        return axios.post(urls.queryQuestionPage, param)
    },
    diagBaseDelete(param){ //诊断依据--删除
        return axios.post(urls.diagBaseDelete, param)
    },
    diagBaseGetDetail(param){ //诊断依据--获取详情
        return axios.post(urls.diagBaseGetDetail, param)
    },
    diagBaseIndex(param){ //诊断依据--诊断检索
        return axios.post(urls.diagBaseIndex, param)
    },
    diagBasePage(param){ //诊断依据--分页
        return axios.post(urls.diagBasePage, param)
    },
    diagBaseUpdateNeo(param){ //诊断依据--更新图谱
        return axios.post(urls.diagBaseUpdateNeo, param)
    },
    diagBaseVerifyAllData(param){ //诊断依据--校验所有数据
        return axios.post(urls.diagBaseVerifyAllData, param)
    },
    diagBaseVerifyData(param){ //诊断依据--校验数据
        return axios.post(urls.diagBaseVerifyData, param)
    },
    getUniqueNameWithList(param) { //诊断依据--获取公表项
        return axios.post(urls.getUniqueNameWithList, param)
    },
    tempSaveOrUpate(param) { //诊断依据-临时保存
        return axios.post(urls.tempSaveOrUpate, param)
    },
    diagBaseSearch(param) { //诊断依据-临时保存
        return axios.post(urls.diagBaseSearch, param)
    }
}