import request from '@/utils/request'
// 列表
const standardpointList = (data) => {
  return request({
    url: `/standardpoint/list?id=${data.id}&uniformcode=${data.uniformcode}&name=${data.name}&type=${data.type}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'get',
  })
}
// 添加
const addStandardpoint = (pairs) => {
  return request({
    url: `/standardpoint/add`,
    method: 'post',
    data: pairs,
  })
}
// 删除
const deleteStandardpoint = (data) => {
  return request({
    url: `/standardpoint/${data.id}`,
    method: 'delete',
  })
}
// 生成
const generateAdd = (pairs) => {
  return request({
    url: `/generate/add`,
    method: 'post',
    data: pairs,
  })
}
// 类型 联动接口  测点编码
const standardpointPointcode = (pairs) => {
  return request({
    url: `/standardpoint/pointcode?type=${pairs.type}`,
    method: 'get',
  })
}
// 设备点表
// 查询  http://localhost:7020/windturbinetestingpointnew/list?pageNum=1&pageSize=1
// 添加：ttp://localhost:7020/windturbinetestingpointnew/add
// 删除：ttp://localhost:7020/windturbinetestingpointnew/
// 列表
const windturbinetestingpointnewList = (data) => {
  return request({
    url: `/windturbinetestingpointnew/list?type=${data.type}&name=${data.name}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'get',
  })
}
// 添加
const addWindturbinetestingpointnew = (pairs) => {
  return request({
    url: `/windturbinetestingpointnew/add`,
    method: 'post',
    data: pairs,
  })
}
// 删除
const deleteWindturbinetestingpointnew = (data) => {
  return request({
    url: `/windturbinetestingpointnew/${data.id}`,
    method: 'delete',
  })
}
// 场站点表
// 查询 http://localhost:7020/windpowerstationpointnew/list?pageNum=1&pageSize=1
// 添加 http://localhost:7020/windpowerstationpointnew/add
// 删除：http://localhost:7020/windpowerstationpointnew/
// 列表
const windpowerstationpointnewList = (data) => {
  return request({
    url: `/windpowerstationpointnew/list?name=${data.name}&type=${data.type}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'get',
  })
}
// 添加
const addWindpowerstationpointnew = (pairs) => {
  return request({
    url: `/windpowerstationpointnew/add`,
    method: 'post',
    data: pairs,
  })
}
// 删除
const deleteWindpowerstationpointnew = (data) => {
  return request({
    url: `/windpowerstationpointnew/${data.id}`,
    method: 'delete',
  })
}

export default {
  deleteStandardpoint,
  standardpointList,
  addStandardpoint,
  generateAdd,
  standardpointPointcode,
  //
  windturbinetestingpointnewList,
  addWindturbinetestingpointnew,
  deleteWindturbinetestingpointnew,
  //
  windpowerstationpointnewList,
  addWindpowerstationpointnew,
  deleteWindpowerstationpointnew,
}
