// 计量组织管理接口api
import request from '../index'
import type { searchQueryType } from '@/views/measure/measureDept/measureDept-interface'
const prefix = 'meter/'
// 文件列表(分页)
export function listPageApi(data: searchQueryType) {
  return request({
    url: `${prefix}organize/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}
// 详情
export function deptDetailApi(data: object) {
  return request({
    url: `${prefix}organize/detail`,
    method: 'post',
    data,
  })
}
// 导出
export function exportApi(data: object) {
  return request({
    url: `${prefix}organize/listExport`,
    method: 'post',
    data,
    responseType: 'blob',
  })
}
// 更新
export function updateApi(data: object) {
  return request({
    url: `${prefix}organize/update`,
    method: 'post',
    data,
  })
}
// 获取标准装置列表
export function standardlistPageApi(data: any) {
  return request({
    url: `/meter/standard/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}
// 获取父级组织
export function getpDeptApi(data: object) {
  return request({
    url: '/meter/organize/deptInfo',
    method: 'post',
    data,
  })
}
