/**
 * 标准装置请求接口
 */
import request from '../index'
const prefix = '/meter'
// 列表查询
export function getStandardList(data: { offset: number; limit: number }) {
  return request({
    url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data,
  })
}
// 列表新增
export function getStandardListAdd(data: object) {
  return request({
    url: `${prefix}/standard/add`,
    method: 'post',
    data,
  })
}
// 列表新增
export function getStandardListDelete(data: object) {
  return request({
    url: `${prefix}/standard/delete`,
    method: 'post',
    data,
  })
}

// 详情信息
export function getStandardListDetail(data: object) {
  return request({
    url: `${prefix}/standard/detail`,
    method: 'post',
    data,
  })
}

// 更新信息
export function getStandardLisUpdate(data: object) {
  return request({
    url: `${prefix}/standard/update`,
    method: 'post',
    data,
  })
}

// 获取部门信息
export function getUsersDept(data: { offset: number; limit: number }) {
  return request({
    url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data,
  })
}

// 获取申请列表
export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) {
  return request({
    url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data,
  })
}

// 删除申请列表信息
export function getStandardLisdelete(data: object) {
  return request({
    url: '/standard/deleteStandardEquipmentApply',
    method: 'post',
    data,
  })
}

// 删除申请列表信息
export function getOperateDelete(data: object) {
  return request({
    url: '/standard/approval/operate/delete',
    method: 'post',
    data,
  })
}

// 新建申请列表信息
export function getStandardLisAdd(data: object) {
  return request({
    url: '/standard/addStandardEquipmentApply',
    method: 'post',
    data,
  })
}

// 获取到申请列表信息
export function getStandardLisdetali(data: object) {
  return request({
    url: '/standard/standardEquipmentApplyInfo',
    method: 'post',
    data,
  })
}

// 获取到到期提醒列表
export function getRemindListPage(data: { offset: number; limit: number }) {
  return request({
    url: `/meter/standard/remindListPage?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data,
  })
}

// 点击提醒
export function setRemind(data: object) {
  return request({
    url: '/meter/standard/remind',
    method: 'post',
    data,
  })
}

// 点击提交
export function submitStandardEquipmentApply(data: object) {
  return request({
    url: '/standard/submitStandardEquipmentApply',
    method: 'post',
    data,
  })
}

// 申请编辑
export function updateStandardEquipmentApply(data: object) {
  return request({
    url: '/standard/updateStandardEquipmentApply',
    method: 'post',
    data,
  })
}

// 批量添加标准装置底部计量人员
export function setBatchAdd(data: object) {
  return request({
    url: '/meter/standard/user/batchAdd',
    method: 'post',
    data,
  })
}

// 标准装置-计量人员列表（分页）
export function getuserListPage(data: object) {
  return request({
    url: '/meter/standard/user/listPage',
    method: 'post',
    data,
  })
}

// 标准装置-删除计量人员
export function getuserDelete(data: object) {
  return request({
    url: '/meter/standard/user/delete',
    method: 'post',
    data,
  })
}

// 标准装置-配套设备列表(分页)
export function getEquipmentListPage(data: object) {
  return request({
    url: '/meter/standard/equipment/listPage',
    method: 'post',
    data,
  })
}

// 添加标准配套设备
export function getEquipmenteAdd(data: object) {
  return request({
    url: '/meter/standard/equipment/add',
    method: 'post',
    data,
  })
}

// 添加检定规程
export function getRegulationAdd(data: object) {
  return request({
    url: '/meter/standard/regulation/add',
    method: 'post',
    data,
  })
}

// 标准装置-检定规程列表（分页）
export function getRegulationListPage(data: object) {
  return request({
    url: '/meter/standard/regulation/listPage',
    method: 'post',
    data,
  })
}

// 标准装置导出
export function getExportExcel(data: object) {
  return request({
    url: '/meter/standard/exportExcel',
    method: 'post',
    responseType: 'blob',
    data,
  })
}

// 标准装置申请导出
export function getExportList(data: object) {
  return request({
    url: '/standard/exportList',
    method: 'post',
    responseType: 'blob',
    data,
  })
}

// 删除标准配套设备
export function getEquipmentDelete(data: object) {
  return request({
    url: '/meter/standard/equipment/delete',
    method: 'post',
    data,
  })
}

// 批量删除计量人员
export function getUserBatchDelete(data: object) {
  return request({
    url: '/meter/standard/user/batchDelete',
    method: 'post',
    data,
  })
}

