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

// 删除
const removeDrinkingWaterVillageBill = function (id) {
    return axios.delete(`/drinkingWaterVillage/drinkingWaterVillageBill/${id}`,)
}
// 批量删除
const removeBatchDrinkingWaterVillageBill = function (ids) {
    return axios.delete("/drinkingWaterVillage/drinkingWaterVillageBill/batch",{data:ids})
}

// 修改
const updateDrinkingWaterVillageBill = function (data) {
    return axios.put("/drinkingWaterVillage/drinkingWaterVillageBill",data)
}
// 审核
const verifyDrinkingWaterVillageBill = function (data) {
    return axios.put("/drinkingWaterVillage/drinkingWaterVillageBill/verify",data);
}
const getDrinkingWaterVillageBill = function (id) {
    return axios.get(`/drinkingWaterVillage/drinkingWaterVillageBill/${id}`)
}
// -------------------------数据---------------------
const pageDrinkingWaterVillageUrl = '/drinkingWaterVillage/drinkingWaterVillage/page';

const listAll = function(data){
    return axios.get("/drinkingWaterVillage/drinkingWaterVillage",{params:data})
}
// 添加
const saveDrinkingWaterVillage = function (data) {
    return axios.post("/drinkingWaterVillage/drinkingWaterVillage",data)
}

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

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



// -------------------------统计---------------------
const pageDrinkingWaterVillageStatisticUrl = '/drinkingWaterVillage/drinkingWaterVillage/VillageAnalysePage';
// const pageDrinkingWaterVillageCompare = '/drinkingWaterVillage/drinkingWaterVillage/statistic/compare';
const getHistoryyears = function () {
    return axios.get("/drinkingWaterVillage/drinkingWaterVillage/history-year")
}
const getColumnOptions = function(column){
    return axios.get("/drinkingWaterVillage/drinkingWaterVillage/options",{params:{column}})
}

const getGisBase = function(data){
    return axios.get("/drinkingWaterVillage/drinkingWaterVillage/gis",{params:data})
}

const getGisArea = function(data){
    return axios.get("/drinkingWaterVillage/drinkingWaterVillage/gis/area",{params:data})
}
export {
    pageBillUrl,
    saveDrinkingWaterVillageBill,
    removeDrinkingWaterVillageBill,
    updateDrinkingWaterVillageBill,
    removeBatchDrinkingWaterVillageBill,
    verifyDrinkingWaterVillageBill,
    getDrinkingWaterVillageBill,
    pageDrinkingWaterVillageUrl,
    saveDrinkingWaterVillage,
    removeDrinkingWaterVillage,
    updateDrinkingWaterVillage,
    removeBatchDrinkingWaterVillage,
    pageDrinkingWaterVillageStatisticUrl,
    getHistoryyears,
    // pageDrinkingWaterVillageCompare,
    getColumnOptions,
    listAll,
    getGisBase,
    getGisArea
  
}
