Newer
Older
smart-metering-front / src / api / customer / sampleList.ts
dutingting on 19 Jan 2023 771 bytes 样品列表页面
/**
 * 样品列表接口
 */
import request from '../index'
import type { ISampleListQuery } from '@/views/customer/sample/list/sample_list_interface'
const prefix = '/meter'

// 列表查询
export function getSampleList(data: ISampleListQuery) {
  return request({
    url: `${prefix}/sample/listPage?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data,
  })
}

// 数据删除
export function deleteSample(data: { id: string }) {
  return request({
    url: `${prefix}/sample/delete`,
    method: 'post',
    data,
  })
}

// 导出列表
export function exportSapmleList(data: Omit<ISampleListQuery, 'limit' | 'offset'>) {
  return request({
    url: `${prefix}/sample/listExport`,
    method: 'post',
    responseType: 'blob',
    data,
  })
}