import createAxios from '@/utils/request'

// 新增前置机
export function addNode(data: any) {
    return createAxios({
        url: '/cs-device-boot/node/addNode',
        method: 'post',
        data: data
    })
}

//修改前置机
export function updateNode(data: any) {
    return createAxios({
        url: '/cs-device-boot/node/updateNode',
        method: 'put',
        data: data
    })
}


//删除前置机
export function delNode(data: any) {
    return createAxios({
        url: '/cs-device-boot/node/delNode',
        method: 'post',
        params: { id: data }
    })
}

//查询前置-进程-设备-设备树
export function nodeDeviceTree(data: any) {
    return createAxios({
        url: '/cs-device-boot/node/getProcessNoAndDeviceById',
        method: 'get',
        params: data
    })
}

//重启前置机进程
export function restartProcess(data: any) {
    return createAxios({
        url: '/cs-device-boot/node/restartProcess',
        method: 'post',
        params: data
    })
}

//更新进程号
export function updateProcess(data:any) {
    return createAxios({
        url: '/cs-device-boot/node/updateDevNode',
        method: 'post',
        data: data
    })
}



