import request from '@/utils/request'

//左侧树
export function getArchivesTypeListApi(query) {
  return request({
      url: '/material/archives/getTypeList ',
      method: 'get',
      params: query,
  })
}

//左侧树-新增
export function getAddArchivesTypeApi(data) {
  return request({
    url: '/material/archives/add',
    method: 'post',
    data: data,
  })
}
//左侧树-编辑
export function updateArchivesTypeApi(data) {
  return request({
    url: '/material/archives/update',
    method: 'post',
    data: data,
  })
}
//左侧树-删除
export function delArchivesTypeApi(data) {
  return request({
    url: '/material/archives/deleteById',
    method: 'post',
    data: data,
  })
}
 
//右侧表格-文件数据
export function getArchivesDetailsLstApi(query) {
    return request({
        url: '/material/archives/getDetailsList',
        method: 'get',
        params: query,
    })
}
//右侧表格-新增
export function addArchivesDetailsApi(data) {
    return request({
      url: '/material/archives/addDetails',
      method: 'post',
      data: data,
    })
  }
//右侧表格-编辑
export function updateArchivesDetailsApi(data) {
    return request({
        url: '/material/archives/updateDetails',
        method: 'post',
        data: data,
    })
}
//右侧表格-删除
export function delArchivesDetailsApi(data) {
    return request({
        url: '/material/archives/deleteByDetails',
        method: 'post',
        data: data,
    })
}


//右侧表格-下载
export function downloadFileApi(data) {
  return request({
      url: '/material/archives/download',
      method: 'get',
      params: data,
      responseType: 'blob'
  })
}