import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/report',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/report/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/report',
    method: 'put',
    data
  })
}
export function get() {
  return request({
    url: '/api/screeView/locLayout',
    method: 'post'
  })
}

export function getJiMuReportId(name) {
  return request({
    url: `/api/report/getJiMuReportId/${name}`,
    method: 'get'
  })
}

export function downloadExcel(data) {
  return request({
    url: '/jmreport/exportAllExcelStream',
    method: 'post',
    responseType: 'blob',
    data
  })
}

export default { add, edit, del ,get}
