import request from '@/router/axios';

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

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


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

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

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

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

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

