// 设备台账相关接口api
import request from '../index'
import type { fixedAssetsParams } from '@/views/device/standingBook/standingBook-interface'
// 固定资产列表(分页)
export function listPageApi(data: fixedAssetsParams) {
  return request({
    url: `/meter/assets/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}
// 删除固定资产
export function assetsDeleteApi(data: object) {
  return request({
    url: '/meter/assets/delete',
    method: 'post',
    data,
  })
}
// 固定资产详情
export function assetsDetailApi(data: object) {
  return request({
    url: '/meter/assets/detail',
    method: 'post',
    data,
  })
}
// 固定资产导出到excel
export function listExportApi(data: object) {
  return request({
    url: '/meter/assets/exportExcel',
    method: 'post',
    data,
    responseType: 'blob',
  })
}
// 批量导入测量设备信息
export function listImporttApi(data: FormData) {
  return request({
    url: '/meter/assets/importMeterEquipment',
    method: 'post',
    data,
  })
}
// 更新固定资产
export function assetsUpdateApi(data: object) {
  return request({
    url: '/meter/assets/update',
    method: 'post',
    data,
  })
}
// 添加固定资产
export function assetsAddApi(data: object) {
  return request({
    url: '/meter/assets/add',
    method: 'post',
    data,
  })
}
