import request from '@/utils/httpRequest'
import { ASSESS_PATH as prefix } from "../AppPath";

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