import request from '@/utils/httpRequest'

export default class PostService {
  list (params) {
    return request({
      url: '/sys/project/list',
      method: 'get',
      params: params
    })
  }
  queryById (id) {
    return request({
      url: '/sys/project/queryById',
      method: 'get',
      params: {id: id}
    })
  }
  save (inputForm) {
    return request({
      url: `/sys/project/save`,
      method: 'post',
      data: inputForm
    })
  }
  delete (ids) {
    return request({
      url: '/sys/project/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }
  importExcel (data) {
    return request({
      url: '/sys/project/import',
      method: 'post',
      data: data
    })
  }
  exportTemplate () {
    return request({
      url: '/sys/project/import/template',
      method: 'get',
      responseType: 'blob'
    })
  }
  exportExcel (params) {
    return request({
      url: '/sys/project/export',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
  proportion (itemType) {
    return request({
      url: '/sys/project/proportion',
      method: 'get',
      params: {itemType: itemType}
    })
  }
}
