import createAxios from '@/utils/request'

import { SUPERVISION_BOOT } from '@/utils/constantRequest'

const MAPPING_PATH = SUPERVISION_BOOT + '/quitRunningDevice'


/**
 * 新增终端退运
 */
export const addRunningDevice = (data: any) => {
    return createAxios({
        url: MAPPING_PATH + '/add',
        method: 'POST',
        data: data
    })
}


/**
 * 更新终端退运
 */
export const quitRunningDeviceUpdate = (data: any) => {
    return createAxios({
        url: MAPPING_PATH + '/update',
        method: 'POST',
        data: data
    })
}

/**
 * 取消终端退运
 */
export const cancelQuitRunningDevice = (data: any) => {
    return createAxios({
        url: MAPPING_PATH + '/cancel',
        method: 'POST',
        data: data
    })
}



/**
 * 根据id获取终端的详细数据
 */
export const getRunningDeviceById = (id: any) => {
    return createAxios({
        url: MAPPING_PATH + '/getById?id='+id,
        method: 'GET'
    })
}
