import axios from 'axios'
// if (process.env.NODE_ENV === 'development') {
//     axios.defaults.baseURL = '/api'
// } else if (process.env.NODE_ENV === 'production') {
//     axios.defaults.baseURL = '/api'
// }
//设置请求头参数 common 为设置所有的接口  post为设置post请求的接口
// axios.defaults.headers.common['Authorization'] = `Bearer ${localStorage.getItem('access_token')}`;

// 电力概况
export const getCompanyInfo = (params) => {
    return axios.get('api/Handler/Company.ashx', {
        params
    })
};
// 路线查询  下拉
export const getLine = (params) => {
    return axios.get('api/Handler/Line.ashx', {
        params
    })
};
// 查询设备素材
export const getDevice = (params) => {
    return axios.get('api/Handler/Device.ashx', {
        params
    })
};
//班组故障查询
export const getBanzugz = (params) => {
    return axios.get('api/Handler/Banzugz.ashx', {
        params
    })
};
//查询工单统计
export const getGdtj = (params) => {
    return axios.get('api/Handler/gdtj.ashx', {
        params
    })
};
//查询单位本周故障
export const getDwbzgz = (params) => {
    return axios.get('api/Handler/Dwbzgz.ashx', {
        params
    })
};
//查询供电所供电质量情况
export const getGdsgdzl = (params) => {
    return axios.get('api/Handler/Gdsgdzl.ashx', {
        params
    })
};
//查询配变停运情况
export const getPbtyqk = (params) => {
    return axios.get('api/Handler/Pbtyqk.ashx', {
        params
    })
};
// //查询天气
// export const getWather = (params) => {
//     return axios.get('aps/weather/prediction/', {
//         params
//     })
// };
//查询天气
// export const Weather = (params) => {
//     return axios.get('api/Handler/Weather.ashx', {
//         params
//     })
// };
//查询天气1
export const Weather = (params) => {
    return axios.get('api/Handler/Data.ashx', {
        params
    })
};