import request from '@/router/axios';

export const getPage = (current, size, params) => {
    return request({
        url: '/api/galaxy-business/rtu/base/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const getRtuKindList = (code) => {
    return request({
        url: '/api/galaxy-business/rtu/base/dict/list',
        method: 'get',
        params: {
            code,
        }
    })
}


export const remove = (ids) => {
    return request({
        url: '/api/galaxy-business/rtu/base/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

export const add = (row) => {
    return request({
        url: '/api/galaxy-business/rtu/base/save',
        method: 'post',
        data: row
    })
}

export const update = (row) => {
    return request({
        url: '/api/galaxy-business/rtu/base/submit',
        method: 'post',
        data: row
    })
}

export const getDetail = (id) => {
    return request({
        url: '/api/galaxy-business/rtu/base/detail',
        method: 'get',
        params: {
            id
        }
    })
}

