import server from '@/utils/request'

//新增
interface Addobj{
    
    stationCode:String	            //换电站编码
    code:String	                    //充电机编码
    version:String	                //充电机软件版本
    switchType:String|Number	    //充电连接类型：1-连接器，2-充电枪
    status:String|Number	        //状态：1-正常，2-检修， 3-坏	
    pkId?:String
    dccNo?:String	                //电池仓序号
    gunNum?:String|Number	        //充电枪数量
}

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

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

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

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


