import axios from 'axios';
// -------------------江河--水站水功能区数据列表-----------------------
const pageBillUrl = '/surfaceWaterSection/waterSiteBill/page';
// 判断是否有重复数据
const saveJudgeInfoSite = function (data) {
    return axios.post("/surfaceWaterSection/waterSiteBill/judgeInfo",data)
}
// 添加
const saveRiverSiteBill = function (data) {
    return axios.post("/surfaceWaterSection/waterSiteBill/importBatch",data)
}

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

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


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

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

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


const getColumnOptions = function(column){
    return axios.get("/waterFunctionArea/waterStationWaterFunctionArea/options",{params:{column}})
}
export {
    pageBillUrl,
    saveRiverSiteBill,
    saveJudgeInfoSite,
    removeRiverStationBill,
    updateRiverStationBill,
    removeBatchRiverStationBill,
    verifyRiverStationBill,
    getRiverStationBill,
    pageRiverStationUrl,
    saveRiverStation,
    removeRiverStation,
    updateRiverStation,
    removeBatchRiverStation,
    getColumnOptions,
    listAll

}
