import server from '@/utils/request'

//新增
interface Addobj{
    pkId?:String
    stationCode:String	      //换电站编码
    code:String	              //机器人编码
    status:String|Number	            //状态：1-正常 2-禁用
    runMode:String|Number	    //运行模式：1-就地，2-远程
}

export function addhdz(data:Addobj) {
  return server.request({
    url: '/cloud/battery/station/robot/add',
    method: 'post',
    data
  })
}

//修改
export function update(data:Addobj) {
  return server.request({
    url: '/cloud/battery/station/robot/update',
    method: 'post',
    data
  })
}

//查询
interface Querydata{
  pageSize:String|number,	    //每页条数
  pageNo:String|number	      //页数
  stationCode:String          //换电站编码  
}
export function getjqrlist(params:Querydata) {
  return server.request({
    url: '/cloud/battery/station/robot/list',
    method: 'get',
    params
  })
}

//删除
export function delhdz(id:string) {
  return server.request({
    url: '/cloud/battery/station/robot/del',
    method: 'post',
    data:{
      id
    }
  })
}


