Newer
Older
xc-metering-front / src / api / laboratory / place.ts
/**
 * 地点管理
 */
import request from '../requestLab'
import type { IListQuery } from '@/views/laboratory/place/place-interface'
const prefix = 'location'

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

// 导出
export function exportLocationList(data: IListQuery) {
  return request({
    url: `${prefix}/export`,
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 新建
export function addLocationList(data: object) {
  return request({
    url: `${prefix}/add`,
    method: 'post',
    data,
  })
}

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

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