import request from '@/utils/request'

// 查询文档

export function listDoc(query) {
  return request({
    url: '/doc/doc/list',
    method: 'get',
    params: query
  })
}

// 查询文档
export function getDoc(docId) {
  return request({
    url: '/doc/doc/' + docId,
    method: 'get'
  })
}

// 新增文档
export function addDoc(data) {
  return request({
    url: '/doc/doc/add',
    method: 'post',
    data: data
  })
}

// 修改文档

export function updateDoc(data) {
  return request({
    url: '/doc/doc',
    method: 'put',
    data: data
  })
}

// 删除文档

export function delDoc(docId) {
  return request({
    url: '/doc/doc/' + docId,
    method: 'delete'
  })
}


//  下载文档
export function downloadDoc(moduleId,kindType) {
  return request({
    url: '/doc/doc/downFile?moduleId=' + moduleId + '&kindType=' + kindType,
    method: 'get',
    responseType: 'blob'
  })
}
