import request from '@/utils/request'

// 获取接入标准列表
export function getTabFileInfoList (query) {
  return request({
    url: '/web/tab-file-info/getTabFileInfoList',
    method: 'get',
    params: query
  })
}

export function updateTabFileInfoById (data) {
  return request({
    url: '/web/tab-file-info/updateTabFileInfoById',
    method: 'put',
    data: data
  })
}

export function uploadTabFileInfoById (data) {
  return request({
    url: '/web/tab-file-info/upload',
    method: 'post',
    data: data
  })
}



export function downloadTabFileInfoById (fileId) {
  return request({
    url: `/web/tab-file-info/download/${fileId}`,
    method: 'get',
  })
}
export function delTabFileInfoById (fileId) {
  return request({
    url: `/web/tab-file-info/falseDeleteTabFileInfoById/${fileId}`,
    method: 'put',
  })
}

// 预览
export function previewFileTabFileInfoById (fileId) {
  return request({
    url: `/web/tab-file-info/previewFile/${fileId}`,
    method: 'get',
    responseType: 'blob'
  })
}