import request from '@/router/axios';

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


export const getUserProjectList = () => {
    return request({
        url: '/api/galaxy-business/base/project/org/list',
        method: 'get',

    })
}


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

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

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

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

export const warnSetting = (params) => {
    return request({
        url: '/api/galaxy-business/base/project/setting/warning/submit',
        method: 'post',
        params: {
            ...params,
        }
    })
}


export const getTree = () => {
    return request({
        url: '/api/galaxy-business/base/project/tree',
        method: 'get',
    })
}
