import axios from 'axios';
// ----------------------列表-----------------------
const pageBillUrl = '/ambientAir/ambientAirBill/page';
// 添加
const saveAirBill = function (data) {
    return axios.post("/ambientAir/ambientAirBill/importBatch",data)
}

// 删除
const removeAirBill = function (id) {
    return axios.delete(`/ambientAir/ambientAirBill/${id}`,)
}
// 批量删除
const removeBatchAirBill = function (ids) {
    return axios.delete("/ambientAir/ambientAirBill/batch",{data:ids})
}

// 修改
const updateAirBill = function (data) {
    return axios.put("/ambientAir/ambientAirBill",data)
}
// 审核
const verifyAirBill = function (data) {
    return axios.put("/ambientAir/ambientAirBill/verify",data);
}
const getAirBill = function (id) {
    return axios.get(`/ambientAir/ambientAirBill/${id}`)
}
// -------------------------数据---------------------
// 分页
const pageAirUrl = '/ambientAir/ambientAir/page';
// 全部
const listAllAir = function (params){
    return axios .get("/ambientAir/ambientAir",{params})
}
// 添加
const saveAir = function (data) {
    return axios.post("/ambientAir/ambientAir",data)
}

// 删除
const removeAir = function (id) {
    return axios.delete(`/ambientAir/ambientAir/${id}`,)
}
// 批量删除
const removeBatchAir = function (ids) {
    return axios.delete("/ambientAir/ambientAir/batch",{data:ids})
}

// 修改
const updateAir = function (data) {
        return axios.put("/ambientAir/ambientAir",data)
}

// -------------------------统计---------------------

const getColumnOptions = function(column){
    return axios.get("/ambientAir/ambientAir/options",{params:{column}})
}
//均值 百分位
const statisticAvg = "/ambientAir/ambientAir/statistic/avg";

//市县站点统计
const statisticUrl = "/ambientAir/ambientAir/statistic";

//城区统计
const statisticAreaBase = "/ambientAir/ambientAir/statistic/areaBase";
const statisticArea = "/ambientAir/ambientAir/statistic/area";

// ---gis--
const getPlaceGis = function(data){
    return axios.get("/ambientAir/ambientAir/gis/place",{params:data})
}
// 排行
const airDayRankUrl = "/zhenQiWang/ambientAirZhenqiCityDayAqiRankData";
const airMonthRankUrl = "/zhenQiWang/ambientAirZhenqiCityMonthComprehensiveAqiRankData/page";
const airMonthProvincialCapitalRankUrl = "/zhenQiWang/ambientAirZhenqiCityMonthComprehensiveAqiRankData/listProvincialCapitalRank";
const airYearRankUrl = "/zhenQiWang/ambientAirZhenqiCityYearComprehensiveAqiRankData/page";
const airYearProvincialCapitalRankUrl = "/zhenQiWang/ambientAirZhenqiCityYearComprehensiveAqiRankData/listProvincialCapitalRank";
const airPm25YearRankUrl = "/zhenQiWang/ambientAirZhenqiCityYearPm25RankData/page";
const airPm25YearProvincialCapitalRankUrl = "/zhenQiWang/ambientAirZhenqiCityYearPm25RankData/listProvincialCapitalRank";
export {
    pageBillUrl,
    saveAirBill,
    removeAirBill,
    updateAirBill,
    removeBatchAirBill,
    verifyAirBill,
    getAirBill,
    pageAirUrl,
    listAllAir,
    saveAir,
    removeAir,
    updateAir,
    removeBatchAir,
    getColumnOptions,
    getPlaceGis,
    statisticAvg,
    statisticUrl,
    statisticAreaBase,
    statisticArea,
    airDayRankUrl,
    airMonthRankUrl,
    airYearRankUrl,
    airPm25YearRankUrl,
    airYearProvincialCapitalRankUrl,
    airPm25YearProvincialCapitalRankUrl,
    airMonthProvincialCapitalRankUrl
  
}
