import request from '@/utils/request'
import { download } from '@/utils/request'

// 查询工作文件信息列表
export function listWorkFileInfo(query) {
    return request({
        url: '/tongzhou/workFileInfo/workFileInfo/list',
        method: 'get',
        params: query
    })
}

// 查询工作文件信息详细
export function getWorkFileInfo(fileId) {
    return request({
        url: '/tongzhou/workFileInfo/workFileInfo/' + fileId,
        method: 'get'
    })
}

// 新增工作文件信息
export function addWorkFileInfo(data) {
    return request({
        url: '/tongzhou/workFileInfo/workFileInfo',
        method: 'post',
        data: data
    })
}

// 修改工作文件信息
export function updateWorkFileInfo(data) {
    return request({
        url: '/tongzhou/workFileInfo/workFileInfo',
        method: 'put',
        data: data
    })
}

// 删除工作文件信息
export function delWorkFileInfo(fileId) {
    return request({
        url: '/tongzhou/workFileInfo/workFileInfo/' + fileId,
        method: 'delete'
    })
}

// 导出工作文件信息
export function downloadWorkFileInfo(data) {
    download(
        '/tongzhou/workFileInfo/workFileInfo/export',
        data,
        `workFileinfo_${new Date().getTime()}.xlsx`)
}
