import request from '@/utils/request';
export function getList(query) {
  return request({
    url: '/basedata/patrolpointmnt/patroltype/list',
    method: 'get',
    params: query
  })
}
// 新增
export function postAdd(query) {
  return request({
    url: '/basedata/patrolpointmnt/patroltype',
    method: 'post',
    data: query
  })
}

// 编辑查询
export function getItem(query) {
  return request({
    url: `/basedata/patrolpointmnt/patroltype/${query}`,
    method: 'get',
  })
}
// 编辑
export function edit(query) {
  return request({
    url: `/basedata/patrolpointmnt/patroltype/edit`,
    method: 'post',
    data: query
  })
}

// 删除
export function postRemove(query) {
  return request({
    url: `/basedata/patrolpointmnt/patroltype/remove/${query}`,
    method: 'post',
    // params: query
  })
}
// 查询巡视类型列表
export function listPatroltype(query) {
  return request({
    url: "/basedata/patrolpointmnt/patroltype/list",
    method: "get",
    params: query,
  });
}

export function getDeviceList(deviceCode, channelCode) {
  return request({
    url: `/patrol/preset/listByEqIdAndChannelId`,
    params: {
      patroldeviceCode: deviceCode,
      channelCode: channelCode,
    },
    method: "get",
  });
}