审查视图

src/api/empt/electricityParams.js 1.2 KB
shenhailong authored
1 2
import axios from 'axios'
3
let base = 'empt-location/electricity_meter';
shenhailong authored
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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


export const getList = params => { return axios.get(`${base}/list`, { params: params }); };


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

//批量删除
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 getEEModel = params => { return axios({
    method: 'POST',
    url: `${base}/getEEModel`,
    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'
    }
})};