import request from '@/utils/request'

// 上传图片抠图
export function mattingImage(data) {
    return request({
        url: '/bizMattingRecords/mattingImage',
        method: 'post',
        data
    })
}

// 获取抠图记录分页
export function getMattingList(data) {
    return request({
        url: '/bizMattingRecords/listByPage',
        method: 'post',
        data
    })
}

// 查询抠图记录详情
export function getMattingDetail(params) {
    return request({
        url: '/bizMattingRecords/detail',
        method: 'get',
        params
    })
}

// 删除抠图记录
export function deleteMattingRecord(data) {
    return request({
        url: '/bizMattingRecords/delete',
        method: 'delete',
        data
    })
}

// 删除抠图的图片
export function deleteMattingImage(data) {
    return request({
        url: '/bizMattingImages/delete',
        method: 'delete',
        data
    })
}

// 获取抠图的图片分页
export function getMattingImagesPage(data) {
    return request({
        url: '/bizMattingImages/listByPage',
        method: 'post',
        data
    })
}


// 通过上传记录Id集合下载抠图文件列表
export function downFileByMattingIds(data) {
    return request({
        url: '/bizMattingRecords/downFileByMattingIds',
        method: 'post',
        data
    })
}

// 通过fileIds下载去背景图片
export function downFileByFileIds(data) {
    return request({
        url: '/bizMattingImages/downLoad',
        method: 'post',
        data,
        responseType: 'blob',
    })
}



