审查视图

src/api/empt/waterMeter.js 1.5 KB
shenhailong authored
1 2
import axios from 'axios'
3
let base = 'empt-location/water_meter';
shenhailong authored
4 5

6 7 8
export const getList = params => {
    return axios.get(`${base}/selectAll`, {params: params});
};
shenhailong authored
9
10 11 12
export const waterMeterAll = params => {
    return axios.get(`${base}/waterMeterAll`, {params: params});
};
13
shenhailong authored
14
15 16 17 18 19 20 21 22 23 24
export const remove = params => {
    return axios({
        method: 'DELETE',
        url: `${base}/del`,
        data: params,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
};
shenhailong authored
25 26

//批量删除
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
export const batchRemove = params => {
    return axios.get(`${base}/batchremove`, {params: params});
};

export const edit = params => {
    return axios({
        method: 'PUT',
        url: `${base}/edit`,
        data: params,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
};

export const add = params => {
    return axios({
        method: 'POST',
        url: `${base}/add`,
        params: params,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
};

export const findRealTime = params => {
    return axios({
        method: 'POST',
        url: `${base}/findRealTime`,
        params: params,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
};

export const update = params => {
    return axios({
        method: 'PUT',
        url: `${base}/update`,
        data: params,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
};