import request from '@/utils/request'

export function listYjjtSlData(query) {
    return request({
        url: '/yjjt/sl/list',
        method: 'get',
        params: query
    })
}

export function getYjjtSlData(id) {
    return request({
        url: '/yjjt/sl/' + id,
        method: 'get'
    })
}

export function delYjjtSlData(id) {
    return request({
        url: '/yjjt/sl/' + id,
        method: 'delete'
    })
}

export function uploadSlData(file, bizType) {
    const formData = new FormData()
    formData.append('file', file)
    formData.append('bizType', bizType)
    return request({
        url: '/yjjt/sl/upload',
        method: 'post',
        data: formData,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

export function exportYjjtSlData(query) {
    return request({
        url: '/yjjt/sl/export',
        method: 'post',
        data: query,
        responseType: 'blob'
    })
}