import axios from 'axios';
// ----------------------列表-----------------------
const pageBillUrl = '/waterFunctionArea/nationalLevelWaterFunctionAreaBill/page';
// 判断是否有重复数据
const saveJudgeInfoWater = function (data) {
    return axios.post("/waterFunctionArea/nationalLevelWaterFunctionAreaBill/judgeInfo",data)
}
// 添加
const saveWaterFunctionAreaBill = function (data) {
    return axios.post("/waterFunctionArea/nationalLevelWaterFunctionAreaBill/importBatch",data)
}

// 删除
const removeWaterFunctionAreaBill = function (id) {
    return axios.delete(`/waterFunctionArea/nationalLevelWaterFunctionAreaBill/${id}`,)
}
// 批量删除
const removeBatchWaterFunctionAreaBill = function (ids) {
    return axios.delete("/waterFunctionArea/nationalLevelWaterFunctionAreaBill/batch",{data:ids})
}

// 修改
const updateWaterFunctionAreaBill = function (data) {
    return axios.put("/waterFunctionArea/nationalLevelWaterFunctionAreaBill",data)
}
// 审核
const verifyWaterFunctionAreaBill = function (data) {
    return axios.put("/waterFunctionArea/nationalLevelWaterFunctionAreaBill/verify",data);
}
const getWaterFunctionAreaBill = function (id) {
    return axios.get(`/waterFunctionArea/nationalLevelWaterFunctionAreaBill/${id}`)
}
// -------------------------数据---------------------
const pageWaterFunctionAreaUrl = '/waterFunctionArea/nationalLevelWaterFunctionArea/page';

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

// 删除
const removeWaterFunctionArea = function (id) {
    return axios.delete(`/waterFunctionArea/nationalLevelWaterFunctionArea/${id}`,)
}
// 批量删除
const removeBatchWaterFunctionArea = function (ids) {
    return axios.delete("/waterFunctionArea/nationalLevelWaterFunctionArea/batch",{data:ids})
}

// 修改
const updateWaterFunctionArea = function (data) {
        return axios.put("/waterFunctionArea/nationalLevelWaterFunctionArea",data)
}



// -------------------------统计---------------------
const pageWaterFunctionAreaStatisticUrl = '/waterFunctionArea/nationalLevelWaterFunctionArea/statistic';
const pageWaterFunctionAreaCompare = '/waterFunctionArea/nationalLevelWaterFunctionArea/statistic/compare';
const getHistoryyears = function () {
    return axios.get("/waterFunctionArea/nationalLevelWaterFunctionArea/history-year")
}
const getColumnOptions = function(column){
    return axios.get("/waterFunctionArea/nationalLevelWaterFunctionArea/options",{params:{column}})
}

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

const getGisArea = function(data){
    return axios.get("/waterFunctionArea/nationalLevelWaterFunctionArea/gis/area",{params:data})
}
export {
    pageBillUrl,
    saveWaterFunctionAreaBill,
    saveJudgeInfoWater,
    removeWaterFunctionAreaBill,
    updateWaterFunctionAreaBill,
    removeBatchWaterFunctionAreaBill,
    verifyWaterFunctionAreaBill,
    getWaterFunctionAreaBill,
    pageWaterFunctionAreaUrl,
    saveWaterFunctionArea,
    removeWaterFunctionArea,
    updateWaterFunctionArea,
    removeBatchWaterFunctionArea,
    pageWaterFunctionAreaStatisticUrl,
    getHistoryyears,
    pageWaterFunctionAreaCompare,
    getColumnOptions,
    listAll,
    getGisBase,
    getGisArea

}
