import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/goldenwater";

export function listDocument(query) {
  return request({ url: '/pms/document/list', method: 'get', params: query })
}

export function getDocument(docId) {
  return request({ url: '/pms/document/' + parseStrEmpty(docId), method: 'get' })
}

export function addDocument(data) {
  return request({ url: '/pms/document', method: 'post', data: data })
}

export function updateDocument(data) {
  return request({ url: '/pms/document', method: 'put', data: data })
}

export function delDocument(docId) {
  return request({ url: '/pms/document/' + docId, method: 'delete' })
}
