import request from '@/utils/request'

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

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

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

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

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