import axios from 'axios';
// -------------------区控水站水功能区数据列表-----------------------
const pageBillUrl = '/waterFunctionArea/waterStationWaterFunctionAreaBill/page';
// 判断是否有重复数据
const saveJudgeInfoStation = function (data) {
    return axios.post("/waterFunctionArea/waterStationWaterFunctionAreaBill/judgeInfo",data)
}
// 添加
const saveRiverStationBill = function (data) {
    return axios.post("/waterFunctionArea/waterStationWaterFunctionAreaBill/batch",data)
}

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

// 修改
const updateRiverStationBill = function (data) {
    return axios.put("/waterFunctionArea/waterStationWaterFunctionAreaBill",data)
}
// 审核
const verifyRiverStationBill = function (data) {
    return axios.put("/waterFunctionArea/waterStationWaterFunctionAreaBill/verify",data);
}
const getRiverStationBill = function (id) {
    return axios.get(`/waterFunctionArea/waterStationWaterFunctionAreaBill/${id}`)
}
// -------------------------数据---------------------
const pageRiverStationUrl = '/waterFunctionArea/waterStationWaterFunctionArea/page';

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

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

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



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

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

const getGisArea = function(data){
    return axios.get("/waterFunctionArea/waterStationWaterFunctionArea/gis/area",{params:data})
}
export {
    pageBillUrl,
    saveJudgeInfoStation,
    saveRiverStationBill,
    removeRiverStationBill,
    updateRiverStationBill,
    removeBatchRiverStationBill,
    verifyRiverStationBill,
    getRiverStationBill,
    pageRiverStationUrl,
    saveRiverStation,
    removeRiverStation,
    updateRiverStation,
    removeBatchRiverStation,
    pageRiverStationStatisticUrl,
    getHistoryyears,
    pageRiverStationCompare,
    getColumnOptions,
    listAll,
    getGisBase,
    getGisArea

}
