import createAxios from '@/utils/request'
//  上传拓扑图
export const uploadTopo = file => {
    let form = new FormData()
    form.append('file', file)
    return createAxios({
        url: '/cs-device-boot/topologyTemplate/uploadImage',
        method: 'POST',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data: form
    })
}


// 查询拓扑图模板
export const getTopoTemplate = () => {
    return createAxios({
        url: '/cs-device-boot/topologyTemplate/queryImage',
        method: 'POST'
    })
}

//删除拓扑图模板
export const deleteTopoTemplate = id => {
    let form = new FormData()
    form.append('id', id)
    return createAxios({
        url: '/cs-device-boot/topologyTemplate/deleteImage',
        method: 'POST',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data: form
    })
}