Newer
Older
xc-business-system / src / api / business / measure / classification.ts
/**
 * 检定项分类管理
*/
import request from '../../index'
import type { IListQuery } from '@/views/business/measure/classification/classification-interface'
const prefix = 'business/device/measureItemCategory'

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

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

// 新增
export function addClassification(data: any) {
  return request({
    url: `${prefix}/add`,
    method: 'post',
    data,
  })
}

// 编辑
export function updateClassification(data: any) {
  return request({
    url: `${prefix}/update`,
    method: 'post',
    data,
  })
}